[Fedora-livecd-list] LiveCD on Compact flash

Jasper O'neal Hartline jasperhartline at adelphia.net
Fri Aug 11 22:23:11 UTC 2006


Junevicus, Lucius R CTR NAVFAC SE wrote:

>I'd love to get a copy of your linuxrc script.
>
>So to do this I'd move the Squashfs image to the flash drive.  
>
>  
>
This is what I've done to run LiveUSB Fedora Core..

Use yum's --installroot= to install some things kernel, mkinitrd, X.org 
Gnome Fluxbox all to a fake root.
After all your packages are installed, simply create as Kadischi would: 
/initrd, /liveusb/{moved,ramfs,tmpfs}, /liveusb/moved/var/lib/rpm
Move everything from /var/lib/rpm/* to /liveusb/moved/var/lib/rpm. tar 
up from the fake rootfs etc home media mnt opt var tmp root into
/liveusb/kadischi.tar and gzip it. rm -rf etc/* var/cache/yum/* (or yum 
clean all using the installroot) and Squash it.
(You can also rm -rf boot/* if you wish to save more space)
cd (fakeroot) ; mksquashfs . ../usbroot.squash -b 65536 leaves you with 
the usbroot.squash fakerootfs.
(This is going to be easier than trusting a CD worked image to run from 
a Flash card.)
Simply make your initrd now.
Here attached is the linuxrc script I use from the initrd which is a 
gzip'ed Ext2 image:
(attached)

Then create a directory: mkdir /tmp/usbroot
Move the Squashed image to /tmp/usbroot/
Make another directory: mkdir -p /tmp/usbroot/boot/grub
Place your kernel and modified initrd in /tmp/usbroot/boot
Then cp -R the /tmp/usbroot/* to the compact flash formatted Ext2 card's 
root.
Finally run grub-install, e.g. grub-install --root-directory 
/media/usbdrive /dev/sda
If your compact flash is mounted at /media/usbdrive for instance. This 
installs Grub's files and the
MBR for booting if you machine boots from USB or CF media.

You can see the simple trick is loading USB hub modules and mass storage 
modules during the initrd phase.
If it is neccessary any USB related questions should be taken care off 
off-list as this is the Kadischi/Fedora LiveCD list.

If you have more questions just ask.
J. Hartline
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: linuxrc
URL: <http://listman.redhat.com/archives/fedora-livecd-list/attachments/20060811/5c699a74/attachment.ksh>


More information about the Fedora-livecd-list mailing list