Thanks your solution. It seems work but after unmounting all file systems it will show umount: /etc: device is busy. these error messages.
So what I think is is there any better way to ignore such error? I mean I don't wanna just simply do ">/dev/null 2>&1" such thing. Thanks. Eric On Tue, Jul 20, 2010 at 8:35 PM, Joey Boggs <[email protected]> wrote: > On 07/19/2010 11:11 PM, Lee Eric wrote: > > Hi all, > > I make a LiveCD by my self(not using livecd-tools) which is based on > Fedora 12. And I download an official LiveCD from Fedora website for > study. What I found is the root filesystem of LiveCD is in rw mode. I > noticed that there's an image named osmin.img in LiveOS folder of > Fedora LiveCD ISO image. It seems a LVM snapshot, for further > information I found there's a sentence in Wikipedia says: "Some > Linux-based Live CD systems also use snapshots to simulate read-write > access on a read-only compact disc.". So what I feel confused is how > to make it available in a LiveCD. > > Here are steps how do I make my own LiveCD. > > 1. Create a folder in /tmp called LiveOS. > 2. Using yum to create a small base system in LiveOS folder. > 3. Modify /etc/sysconfig/readonly-root. READONLY=no, TEMPORARY_STATE=yes > 4. Add some folders in /etc/rwtab like /etc, /home, /root. > 5. Make a squashfs image by using mksquashfs and rename the image as > ext3fs.img. > 6. Create a folder in /tmp called iso. > 7. Using isolinux as boot loader for the image and copy necessary > files including initramfs and vmlinuz in /tmp/iso/isolinux. > 8. Copy the ext3fs.img to /tmp/iso/LiveOS folder. > 9. Burning the ISO image. > > After these steps the ISO image boots up okay by using qemu. And > /root, /home, /etc are in rw mode, services start okay. But when I > wanna restart or stop the system, it shows > > umount: /etc: device is busy. > /etc: > init: rc0 main process (935) killed by KILL signal > > Then system hangs. > > So my question is what I shall I do for this LiveCD then can make the > root fs in rw mode like official Fedora LiveCD? Do I need to use LVM > snapshot as Wiki said "Some Linux-based Live CD systems also use > snapshots to simulate read-write access on a read-only compact disc."? > If yes, could anyone tell me how to achieve that? I really appreciate > that. > > Thanks, > > Regards, > > Eric > > P.S. Please do not just reply "Using livecd-tools them make yourself > easier", I ask questions here for study. Thanks. > -- > livecd mailing list > [email protected] > https://admin.fedoraproject.org/mailman/listinfo/livecd > > > The /etc hang is due to it attempting to be unmounted. > > For ovirt-node we've used the following to work around it in the %post of > kickstart. There's also a few other readonly-root items in there you may be > interested in. > > http://git.fedorahosted.org/git/?p=ovirt/node.git;a=blob;f=recipe/common-post.ks;h=c6ef496a1d0bfc86adde7d3a402f2116320c6c81;hb=66af4c5cf33419ab26a11a5760939cc38b78cac6 > > # prevent node from hanging on reboot due to /etc mounts > patch -d /etc/init.d/ -p0 <<\EOF > --- halt.orig 2009-12-05 00:44:29.000000000 +0000 > +++ halt 2010-03-24 18:12:36.000000000 +0000 > @@ -138,7 +138,7 @@ > $"Unmounting pipe file systems (retry): " \ > -f > > -LANG=C __umount_loop '$2 ~ /^\/$|^\/proc|^\/dev/{next} > +LANG=C __umount_loop '$2 ~ /^\/$|^\/proc|^\/etc|^\/dev/{next} > $3 == "tmpfs" || $3 == "proc" {print $2 ; next} > > > /(loopfs|autofs|nfs|cifs|smbfs|ncpfs|sysfs|^none|^\/dev\/ram|^\/dev\/root$)/ > {next} > {print $2}' /proc/mounts \ > EOF > -- livecd mailing list [email protected] https://admin.fedoraproject.org/mailman/listinfo/livecd
