Hi All,
Been working on PreLinux lately… been learning lots about how to, and how not to, netboot a workstation… and so far, I’ve now got something that does something useful.
It’s now in Atomic Linux CVS (as I intend to use it for their install/live CDs). If you want to check my work out…
$ cvs -d:pserver:anonymous@cvs.atomicl.berlios.de:/cvsroot/atomicl login $ cvs -z3 -d:pserver:anonymous@cvs.atomicl.berlios.de:/cvsroot/atomicl co prelinux
It’s pretty simple… Adjust Makefile to taste, if you like, customise whatever files you like in root/ (e.g. you might like to replace the startup banner in root/etc/prelinux.d/banner), then run make. You’ll come out at the end with a file called prelinux which is your binary. You’ll need crossdev if you haven’t got an appropriate cross-compiler, and it uses the ebuild utility to fetch, unpack and patch a BusyBox tree.
Booting it, without parameters, drops you to a shell w/ init. This will be particularly of use with later netboot images for Gentoo/MIPS, as it has all the necessary components. Specifying noinit on the command line instead exec’s ash, allowing you to exec init yourself — this mode is mainly for working out exactly what commands are necessary in the script for the third mode. Specifying setup=http://some/script/file.sh tells PreLinux to download the mentioned script and execute it.
It is this third mode that I’m still trying to perfect. So far, an image made from a 2005.0 stage 3 tarball, boots fine. Ubuntu sorta boots, there’s some issues I still need to sort out… at the moment, I’m trying to see if I can netboot Knoppix via this method, as its bootup config is much simpler. (Ubuntu is straight plain weird, still trying to get my head around it) and I might look at what Gentoo LiveCDs are available too… if I can find one with X and some sort of desktop (Gnome, KDE, FluxBox, XFCE… I’m not picky) I’ll give that a try too.
The cross-compilation (for use with Gentoo/MIPS) has still not been tested yet, but I see no reason why it wouldn’t work. As well as testing that feature, I also have to work on handling dynamic libraries. For the moment, BusyBox is linked statically, as locating the necessary runtime libs seems to be a real issue. I could just do it the dirty way and assume they’re in /usr/${CHOST}/lib, but I’d rather not, and besides, this hasn’t worked all that well when I last tried it.
In short, there’s still plenty of hacking to do with this little utility, but I hope to have something useful shortly. Stay Tuned. 🙂
Recent Comments