Booting DSL via PXE


Forum: Other Help Topics
Topic: Booting DSL via PXE
started by: alextoft

Posted by alextoft on Aug. 22 2005,15:01
Hi. I'm trying to get DSL to boot via PXE to do workstation imaging with partimage. I have pxelinux all setup and happy, and grabbed the linux24 and minirt24.gz and put them in the pxelinux.cfg/default config file. It boots just fine, but I'm a little stuck as to how to create the root filesystem though and as a result you get the obligatory kernel panic.

I don't want to do the standard knoppix terminal service thing or mounting the iso over nfs/smb. As it's so small surely there must be a way of booting the kernel, dropping the root fs in a ramdisk and pointing it to what it needs ?

Has anyone ever done this who can give me any pointers ?

Posted by alextoft on Aug. 23 2005,12:39
Ok, I've got this cracked now. Here's a quick how-to :

Make yourself a 150Mb ext2 image file and mount it.
Mount the KNOPPIX cloop image.
Copy the contents of the cloop image to your new image file.
Decompress and mount minirt24.gz, and copy its files into the new image file aswell (has stuff like checkroot.sh etc etc..)
Dismount KNOPPIX and minirt24 and forget about them.
In the new image, edit /etc/innit.d/checkroot.sh and disable FS checking.
Disable Automounting in /etc/init.d/knoppix-autoconfig (unless you need it).
Disable the CD eject and prompt in /etc/init.d/knoppix-reboot.
I copied partimage to /usr/local/sbin at this point.
I also edited /etc/init.d/inittab to set default runlevel to 3 since I have no need for the gui.
Add your custom shell scripts to /etc/rc3.d and +x them.
Unmount the image file and gzip it. It should be around 45Mb now.

I won't go into setting up dhcpd and pxelinux - plenty of docs online for that.
Copy your image-ext2.gz to the tftproot along with the linux24 kernel from the DSL cd (/boot/isolinux/linux24).
In your pxelinux.cfg/default file, put the following :

default 1
label 1
kernel linux24
append initrd=image-ext2.gz rw root=/dev/ram ramdisk_size=200000 vga=1

Obviously you need enough ram to accomodate the expanded root filesys. If you have 256Mb you're way fine.

Now when you PXE boot a workstation it should boot the kernel, mount the root fs, do all the hardware detection DSL usually does, probably give you a few errors, and drop you to a shell with full networking.

No doubt a little more editing of the knoppix scripts would tidy things up even further. When I have time I plan on doing this, aswell as stripping out X and associated apps that are not required.

With some basic shell scripts I can now do 1-touch imaging and restoring of linux workstations ! Took a while, but got there in the end :)

Cheers

Posted by cbagger01 on Aug. 23 2005,16:18
With a "normal" linux24 and minirt, it should be possible to create a ramdisk and download the compressed KNOPPIX image into RAM.

basically, this would be a PXE + "toram" network bootup, and this would give you the same effect as booting from livecd with the "toram" cheatcode.

The advantage of this approach is a lower memory requirement (128MB) and also more free RAM available for other uses.

Just a thought.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.