You are not logged in.
Pages: 1
Hello I want make a ramdisk filesystem on slitaz,
every thing is ok, but at last step, I want to gzip the ramdisk, I found the file in the ramdisk is empty after gzip.
the following is my step:
dd if=/dev/zero of=rootfs.img bz=1024 count=131072
mkfs.ext3 -F -m 0 -b 1024 rootfs.img 131072
mkdir img
mount -oloop rootfs.img img
//here copy my rootfs files to img
//and after copy, i check the img size is about 100M
sync
umount img
//above everything is ok
gzip rootfs.img // this step, will zip my rootfs.img to very small size, about 300K
so I unzip the rootfs.img.gz, and mount again, found there's nothing, the rootfs files I copied here is disappear.
and the same step I can make the ramdisk successfully on ubuntu or centos.
thanks
Offline
Not sure why you do that
I seem to remember that there is a tmpfs (ram) file in Slitaz... ??
Offline
it seems that gzip works wrong, but I don't know the reason.
I appreciate your help.
thanks.
Offline
not sure i helped
I checked what you did
You mount the file as loopback filesystem, not ram filesystem.
I do not think it is the gzip command which failed, i think it might be the mount command OR you believe you have copied the file in the img fs, while you have NOT, hence you should check what really has worked or not.
try this:
mkdir /img
mount -o loop,rw rootfs.img /img
once you have copied the files to /img do
cd /img
check that your files are there
then
umount /img
mount -o loop,rw rootfs.img /img.
ls -l /img
and check that your files are still there
if that worked so far then proceed with gzip
Offline
Pages: 1
[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]