The attached patch switches so that we use nash instead of the run-init from the livecd-creator for switching to the real system root. There's up and downsides to this, but I think that overall it's the right thing to do.
Pros: * Not using binaries from the "host" system when creating the live CD image. Makes building x86 and x86_64 live CDs on the same box far easier * Makes creator bits all noarch * Uses infrastructure that we use on "real" systems for the live CD * Moves more in the direction so that hopefully we can use nash for all of the initramfs bits in the live CD eventually
Cons: * Might end up being a little bigger * nash is bigger and thus debugging it instead of run-init requires a little more poking/knowledge.
Other thoughts?
Jeremy
I agree with all of this.
I noticed some network bits in nash a while back that seemed new (as in within the last 5 years).
I wonder, how hard would it be to do the http-fuse-knoppix hackage with the current nash/initramfs infrastructure? (i.e. bring up the network, use fuse to mount an http exposed iso, and use it instead the media iso)
http://unit.aist.go.jp/itri/knoppix/http-fuse/index-en.html
-dmc/jdog
--- Jeremy Katz katzj@redhat.com wrote:
The attached patch switches so that we use nash instead of the run-init from the livecd-creator for switching to the real system root. There's up and downsides to this, but I think that overall it's the right thing to do.
Pros:
- Not using binaries from the "host" system when creating the live CD
image. Makes building x86 and x86_64 live CDs on the same box far easier
- Makes creator bits all noarch
- Uses infrastructure that we use on "real" systems for the live CD
- Moves more in the direction so that hopefully we can use nash for
all of the initramfs bits in the live CD eventually
Cons:
- Might end up being a little bigger
- nash is bigger and thus debugging it instead of run-init requires a
little more poking/knowledge.
Other thoughts?
Jeremy
diff --git a/creator/livecd-creator b/creator/livecd-creator
diff --git a/creator/mayflower b/creator/mayflower index b5062bf..a6b3dcc 100755 --- a/creator/mayflower +++ b/creator/mayflower @@ -155,7 +155,7 @@ cp /sbin/insmod sbin cp /sbin/modprobe sbin cp /sbin/pidof sbin cp /sbin/killall5 sbin -cp /sbin/run-init sbin +cp /sbin/nash sbin
cp /lib/udev/vol_id lib/udev
@@ -181,6 +181,13 @@ for i in bin/* sbin/* lib/udev/*; do done done
+cat > sbin/run-init <<EOF +#!/sbin/nash +setuproot +switchroot +EOF +chmod 755 sbin/run-init
# Write out init cat > init <<EOF #!/bin/bash @@ -639,21 +646,14 @@ fi if [ -x /sysroot$init ] ; then
# Leave initramfs and transition to rootfs
#
kill `pidof udevd`
echo "" > /etc/mtab
umount -n /proc
umount -n /sys
mount -n --move /dev /sysroot/dev
if [ "$quiet" != "1" ] ; then echo "transfering control to $init" fi
exec /sbin/run-init -c ./dev/console /sysroot $init $initargs
- exec /sbin/run-init echo "---------------------------------"
- echo "WARNING: Error running run-init!"
- echo "WARNING: Error switching to real rootfs!" echo "---------------------------------" echo echo "Dropping to a shell. Good luck!"
--
Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list
____________________________________________________________________________________ TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. http://tv.yahoo.com/
On Thu, 2007-03-22 at 13:09 -0700, Jane Dogalt wrote:
I agree with all of this.
I noticed some network bits in nash a while back that seemed new (as in within the last 5 years).
I wonder, how hard would it be to do the http-fuse-knoppix hackage with the current nash/initramfs infrastructure? (i.e. bring up the network, use fuse to mount an http exposed iso, and use it instead the media iso)
I think it would make sense to extend mayflower to do this; I don't think we need the whole http-fuse thing; just use curl/wget to get the entire ISO to RAM and off you go just like it's "run from RAM" only you get the image from a PXE server. It shouldn't be too much work in mayflower I think...
Btw, uou need 1GB+ of RAM but that is getting more and more common these days and I think it's fair enough to require it for this case. The most obvious use of this I can think of includes KIOSK and OS QA. Anyway, when this is working you can do the whole http-fuse as an afterthought and you wouldn't need to require 1GB+ of RAM anymore.
Also, the PXE server could be included on the live cd itself such as to bootstrap other clients from a single computer. Perhaps with a small GNOME applet to control it. Can you have multiple PXE servers on a network? If not, maybe you want to use Avahi instead.
Is anyone interested in working this?
David
On Thu, 2007-03-22 at 15:23 -0400, Jeremy Katz wrote:
The attached patch switches so that we use nash instead of the run-init from the livecd-creator for switching to the real system root. There's up and downsides to this, but I think that overall it's the right thing to do.
Yeah, this is fine with me. Thanks.
David
livecd@lists.fedoraproject.org