I have a LiveCD built using Kadischi and would like to move this to a CF flash. I've tried both syslinux and grub to boot up from the CF flash and get to the same place with either method. Basically I see the initial splash screen, but it fails someplace in the linuxrc scripts I believe it has to do with the find_live_cd program not finding the image on the flash drive. I've tried changing the lines in the linuxrc from:
find-live-cd /cdrom
To
# find-live-cd /cdrom mount /dev/hda1 /cdrom
But have had no luck. I guess the find-live-cd program searched the CD devices for the images and mounts the one it finds to /cdrom.
This isn't working for me.
Any idea as to what I'm doing wrong?
Any help would be greatly appreciated.
Lucius.
Junevicus, Lucius R CTR NAVFAC SE wrote:
I have a LiveCD built using Kadischi and would like to move this to a CF flash. I've tried both syslinux and grub to boot up from the CF flash and get to the same place with either method.
I think the easier method is not to actually move the image to the flash card but to move the SquashFS image and build a specialized initrd. I have done this with USB flash sticks already and I can provide you with the linuxrc script I use if you wish.
What we do is mount the Squash image via loopback, and simply go on to pivot_root. We don't use find-live-cd. Furthermore the rc scripts are slightly reworked. I did this creating my own SquashFS image by hand however, not using Kadischi. It can be done in the same method as Kadischi however.
What I'd like to see is a Kadischi-USB fork to support installing to USB Flash devices.
J. Hartline
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.
How would I setup grub so it would know how to get to it?
Thanks again for the help, any other resources on how best to do this would be great.
One problem I have is that if I get error messages during the boot process, I cant scroll up to see what started it.
Is there a way of pausing the messages --maybee a sleep command?
Thanks again, Lucius.
-----Original Message----- From: fedora-livecd-list-bounces@redhat.com [mailto:fedora-livecd-list-bounces@redhat.com] On Behalf Of Jasper O'neal Hartline Sent: Friday, August 11, 2006 10:38 To: fedora-livecd-list@redhat.com Subject: Re: [Fedora-livecd-list] LiveCD on Compact flash
Junevicus, Lucius R CTR NAVFAC SE wrote:
I have a LiveCD built using Kadischi and would like to move this to a CF flash. I've tried both syslinux and grub to boot up from the CF flash and get
to the same place with either method.
I think the easier method is not to actually move the image to the flash card but to move the SquashFS image and build a specialized initrd. I have done this with USB flash sticks already and I can provide you with the linuxrc script I use if you wish.
What we do is mount the Squash image via loopback, and simply go on to pivot_root. We don't use find-live-cd. Furthermore the rc scripts are slightly reworked. I did this creating my own SquashFS image by hand however, not using Kadischi. It can be done in the same method as Kadischi however.
What I'd like to see is a Kadischi-USB fork to support installing to USB Flash devices.
J. Hartline
-- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
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
#!/bin/ash
#set -x if [ "${INITRD_DBG}" = "x" ]; then set -x; fi
echo Mounted proc filesystem mount -t proc /proc /proc
echo Mounting sysfs filesystem mount -t sysfs none /sys mount -t tmpfs none /tmp
cd /
#find-live-cd /cdrom
# Make kernel don't mount root fs echo 0x100 > /proc/sys/kernel/real-root-dev
echo "Mounting root filesystem" modprobe loop modprobe squashfs modprobe ohci-hcd modprobe uhci-hcd modprobe ehci-hcd modprobe usb-storage modprobe scsi_mod modprobe sd_mod modprobe sg sleep 12 mknod /dev/sda b 8 0 mknod /dev/sda1 b 8 1 mount -t ext2 /dev/sda1 /sysroot mount -t squashfs -oloop,ro /sysroot/usbroot.squash /liveusb sleep 5
echo "Doing the pivot_root" cd /liveusb pivot_root /liveusb /liveusb/initrd cd /
umount /initrd/proc umount /initrd/sys
# # FIXME: make this work with udev #
# Mount a (writeable) ramfs at dev and populate it with nodes: mount -n -t ramfs initrd_dev /dev
cd /dev for node in mem kmem null port zero core full ram ptmx tty pty shm cpu input agpgart dri cdrom console; do /initrd/sbin/MAKEDEV $node done
# Mount pseudo-terminal fs at /dev/pts: mkdir /dev/pts mount -n -t devpts initrd_devpts /dev/pts
# readonly echo "Setting up readonly-root" /etc/rc.readonly linuxrc
# rc.readonly will umount both /initrd/tmp and /initrd
Hello,
On 12/08/06, Jasper O'neal Hartline jasperhartline@adelphia.net wrote:
If it is neccessary any USB related questions should be taken care off off-list as this is the Kadischi/Fedora LiveCD list.
Or make it simply "fedora-live" list. 8-)
On 9/7/06, Filip Tsachev filip.tsachev@fedoraproject.org wrote:
Hello,
On 12/08/06, Jasper O'neal Hartline jasperhartline@adelphia.net wrote:
If it is neccessary any USB related questions should be taken care off off-list as this is the Kadischi/Fedora LiveCD list.
Or make it simply "fedora-live" list. 8-)
I see absolutely no damage if LiveUSB discussions are held here.
If Kadischi can be enhanced in one way or another, I see no trouble to talk about liveUSB :)
Chitlesh
livecd@lists.fedoraproject.org