Using Squashfs on a bootable cd to compress /usr

Kevin Annies anniesk at coventry.ac.uk
Sat Feb 3 08:24:27 PST 2007


Hi,

I have a bootable cd which I am regularly updating but now space is a concern I would like to implement squashfs. I have implemented it on a static system ans totally understand the theory of how it works. The part I can't work out is the following:

I am using an initial ram disk. As usual I have a file called linuxrc which gets executed,

Most of the file executes successfully. However here we go....

The following last few lines of the file are key to what make the livecd live

 mount -n -o ro -t iso9660 $LFS_CDROM_DEVICE $TMP_MOUNT
  cd $TMP_MOUNT
  pivot_root . mnt
  umount -n /mnt/proc >/dev/null 2>&1
  mount /usr.sqsh /usr -o loop
  exec chroot . sh -c 'umount -n /mnt >/dev/null 2>&1;
                exec -a init.new /sbin/init 3' <dev/console >dev/console 2>&1

I have inserted the mount usr.sqsh command at this point because the following chroot command is executed from the just newly mounted / system. The pain is the chroot binary happens to be in /usr/bin which at this time is compressed. However, the archive does not uncompress at this time becuase the loop device does not exist on the initrd. I could try adding it but then woulit not become invalid as soon as I chroot? SO should I put the mount command in twice as a result or perhaps use a mount bind type of command? In addition could I add a second mount into one of the rc.d scripts?

Appreciate any comments.

Thanks

Kevin
 
 
--------------------------------------------------------

NOTICE

This message and any files transmitted with it is intended for the addressee only and may contain information that is confidential or privileged. Unauthorised use is strictly prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise use this message, except for the purpose of delivery to the addressee. 

Any views or opinions expressed within this e-mail are those of the author and do not necessarily represent those of Coventry University.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3781 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-support/attachments/20070203/791c9194/attachment.bin>


More information about the blfs-support mailing list