-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I wonder what the feasibility is of instead of putting a linux kernel in
> the kernel portion of the flash image and essentially what's an initrd
> in the filesystem portion (because remember, all the / in the flash
> image does for me is mount USB storage on /), putting a simple boot
> loader that can load the kernel from the USB storage based filesystem.
> Given that model the kernel is coupled with the rest of the system on a
> single USB storage device which you just plug in and boot. Pull the
> device and replace with another and get the kernel that goes along with
> it.
here is the script we use to boot an Openwrt from a running Openwrt.
Make sure to have kexec-tools installed....
it assumes an ext2 partition on $1 (usually /dev/sdaX) which contains an
OpenWRT *and* a kernel in /
You may need to modify it a bit, since some filenames are hardcoded....
- --- snip launch-guest.sh ---
#!/bin/sh
if [ -z $1 ]; then
echo "You must specify a root device"
exit 1
fi
dumpe2fs -h $1 | grep -e 'Filesystem state:.*not clean' && ERROR=1
mount $1 /mnt | grep -e 'Device or resource busy' && ERROR=1
if [ $ERROR -eq 1 ]; then
echo "Mount returned error, bailing out"
umount /mnt
exit 1
fi
# atheros cards freak out on warm-reboot otherwise:
rmmod ath_pci
kexec -l /mnt/openwrt-avila-zImage --append="rtc-ds1672.probe=0,0x68
root=$1 rootfstype=ext2 noinitrd console=ttyS0,115200 init=/etc/preinit"
umount /mnt
sync
kexec -e
> It's worth recognizing and mentioning that perhaps this boot loader
> could actually be a full linux kernel and a very small / that simply
> "kexec"s a new kernel from the USB storage once it's mounted at /. I
> wonder how portable kexec is amongst the processors Linux runs on.
kexec runs on mips,arm,i386
- --
Harald Schiöberg
Technische Universität Berlin | T-Laboratories | FG INET
www: http://www.net.t-labs.tu-berlin.de
Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJd1Fvy8wrZ9OvkU0RArpeAKDPFMmdWocJfvLgKlkO7pJfOVfZjwCfQ6bL
hDzlVqTdTwpCF1wRm8/hyg4=
=9V1D
-----END PGP SIGNATURE-----
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel