Wednesday, December 22, 2010

PXE Booting Damn Small Linux

Damn Small Linux is very compact Linux distribution. This howto shows how to boot a machine via PXE boot using DSL

download the initrd ISO here:

http://ftp.heanet.ie/mirrors/damnsmalllinux.org/current/
http://ftp.heanet.ie/mirrors/damnsmalllinux.org/current/dsl-4.4.10-initrd.iso

(Thanks to heanet.ie for the very fast mirror.)

loopback mount the iso:

sudo mount -o loop dsl-4.4.10-initrd.iso /mnt/iso

sudo cp -pR /mnt/iso /tftpboot/linux-install/DSL

network settings
dhcp/pxeboot server - ip: 192.168.1.1
pxeclient - ip: 192.168.1.23
mac address: 00:18:fe:30:d1:f4


in /etc/dhcpd.conf:
#DSL boot
host LX0050 {
        next-server 192.168.1.1;
        hardware ethernet  00:18:fe:30:d1:f4;
        fixed-address 192.168.1.23;
        filename "linux-install/pxelinux.0";
}

TFTP layout:
/tftpboot/linux-install/DSL/
|-- boot.cat
|-- boot.msg
|-- f2
|-- f3
|-- german.kbd
|-- isolinux.bin
|-- linux24
|-- logo.16
`-- minirt24.gz

in /tftpboot/linux-install/pxelinux.cfg/, i have a file named dsl.cfg
with ff contents:

PROMPT 1
DISPLAY DSL/boot.msg
F1 DSL/boot.msg
F2 DSL/f2
F3 DSL/f3
LABEL dsl
KERNEL DSL/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=DSL/minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL memtest
KERNEL memtest
APPEND initrd=
LABEL dsl-txt
KERNEL DSL/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=normal initrd=DSL/minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL expert
KERNEL DSL/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=DSL/minirt24.gz nomce BOOT_IMAGE=expert
LABEL fb1280x1024
KERNEL DSL/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=794 xmodule=fbdev initrd=DSL/minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL fb1024x768
KERNEL DSL/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 xmodule=fbdev initrd=DSL/minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL fb800x600
KERNEL DSL/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=788 xmodule=fbdev initrd=DSL/minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL lowram
KERNEL DSL/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=normal initrd=DSL/minirt24.gz noscsi noideraid nosound nousb nofirewire noicons minimal nomce noapic noapm quiet BOOT_IMAGE=knoppix
LABEL install
KERNEL DSL/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=normal initrd=DSL/minirt24.gz noscsi noideraid nosound nofirewire legacy base norestore _install_ nomce noapic noapm quiet BOOT_IMAGE=knoppix
LABEL failsafe
KERNEL DSL/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us vga=normal atapicd nosound noscsi nousb nopcmcia nofirewire noagp nomce nodhcp xmodule=vesa initrd=DSL/minirt24.gz BOOT_IMAGE=knoppix
LABEL userdef
KERNEL DSL/linux24
APPEND ###############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################

these contents are from the isolinux.cfg file from the DSL ISO image
with the linux24 and minirt24.gz path modified (notice the DSL/ entries
in the lines above). of course, these paths may vary with your setup, so
keep it in mind.
this will show the menu as seen when booting DSL from a CD/DVD or ISO image.

to prep the setup, the command sequence:

as root:
cd /tftpboot/linux-install/pxelinux.cfg

./iptohex.pl 192.168.1.23

IP address 192.168.1.23, converts to Hex: C0A80117

ln -fs dsl.cfg C0A80117

service dhcpd start

chkconfig tftp on  (or service xinetd restart)


and booting up the machine:



Credits:
IPtoHex is a perl script from Yngve Berthelsen
and downloaded from BigAdmin.

1 comments:

  1. Just to let you know, you may want to look into Tiny Core Linux ( http://www.tinycorelinux.com/ ). It seems that the DSL Distro has unfortunately run into some trouble and has not been actively developed since 2008/2009. Take a look here: http://en.wikipedia.org/wiki/Damn_small_linux#Current_status_of_the_project . PXE booting Tin Core is pretty easy and some great documentation can be found here: http://wiki.tinycorelinux.com/Netbooting

    ReplyDelete