Link to home
Start Free TrialLog in
Avatar of ambantin
ambantin

asked on

How do I Network Boot my Workstations?

I have Damn Small Linux Running on my workstations (30). I use it only to remote in to our Windows 2003 terminal server.

I would like to go diskless and use the "Network Boot" option available through my bios.  I understand the concept of having a server that serves the inage, but that is about as far as it goes.

I was going to try the etherboot / rom-o-matic route, but they do not have a module for my onboard lan (RTL8101L).

Is there a simple step by step on:

1) how to create the image of Damn Small Linux (Just a simple ISO?)
2) How to setup the server
      (Can I serve the image from my windows server 2003 box?)
      (I have ipcop (linux box) setup as my firewall/filter/proxy)
3) Any mods on my workstations

If anyone would like to give me the step by steps i would be willing to open seperate questions and give more points.

Thanks,
Russ
ASKER CERTIFIED SOLUTION
Avatar of alextoft
alextoft
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The first thing you'd have to do is pull the DSL filesystem to pieces. Boot off a DSL cd, then mount yourself a network drive. This little bit is from memory as I don't have a machine I can try it on right at the moment. May have chance later.

Copy the kernel (/boot/linux24 I think) to the network drive, and rename it to something useful, like dslkernel

Now you need to create a filesystem within a file, so use
dd if=/dev/zero of=/networkmount/filesystem bs=1M count=128
and format it to ext2
mkfs.ext2 /networkmount/filesystem
It will say it's not a block device, but proceed anyway.

Now create a mount point and mount the file.
mount -t ext2 /networkmount/filesystem /your/mountpoint
From a command prompt, use the mount command to list all filesystem mounts. Find the read-only cloop DSL filesystem (ie. NOT the copy in the ramdrive). Copy /bin /sbin /etc /lib (everything except /dev and /proc) to the mounted file you just created. Create empty /dev and /proc entries there aswell; these will be populated by DSL when it boots. Now unmount the file; umount /your/mountpoint, and gzip it.

You should now have 2 files: dslkernel and filesystem.gz

Now you need to configure a DHCP server with boot extensions. This is an example dhcpd.conf:

allow booting;
allow bootp;

authoritative;
default-lease-time 3600;

ddns-update-style none;
option domain-name "example.com";
option domain-name-servers 192.168.200.50;

group {
        next-server 192.168.200.50;
        filename "pxelinux.0";

subnet 192.168.200.0 netmask 255.255.255.0 {
  range 192.168.200.101 192.168.200.190;
  default-lease-time 3600;
  max-lease-time 172800;

The main thing is to ensure you have the allow boot entries, the next-server IP address, and the filename to download.

The IP address you specify must have a tftp server running on it. This can be Windows or Linux, doesn't matter. The contents of your tftp server root should look like this:

 # ls -R /tftpboot/
/tftpboot/:
boot.msg  linux  pxelinux.0  pxelinux.cfg

/tftpboot/linux:
filesystem.gz  dslkernel

/tftpboot/pxelinux.cfg:
default

You know what the files in the linux directory are, but here's what the others are:

boot.msg is just a text file. Can say anything you like, but something like "Enter 1 and push return to boot Damn Small Linux". pxelinux.0 is a binary file from the SYSlinux package - http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.36.tar.gz

In the pxelinux.cfg directory, create a file called default - this is the control file for PXElinux, and is in Grub format. It should look something like this:

default 1
prompt 1
timeout 6000
display boot.msg
F1 boot.msg
label 1
kernel linux/dslkernel
append initrd=linux/filesystem.gz rw root=/dev/ram ramdisk_size=2000000 vga=1

Then technically what should happen is you hit f12 (or whatever) to network boot, and you should get the boot.msg displayed. Press 1 and hit enter, and the kernel is downloaded and booted. The filesystem.gz is unpacked into the ramdrive and mounted. DSL then runs.

I guarantee it won't work the first time you try it, but let me know how you get on :)