Wednesday, June 10, 2009

Knoppix via PXE

On the heels of my recent semi-success with getting DSL to work via PXE. I mean it works... I just cant get it to recognize the hard drives, so it's basically useless to me. Anyways.

I was able to get knoppix to boot through my PXE and it recognizes the hard drives, which is the most important thing when you want to do hard drive recovery :)


I had to piece together a few "how-to's" to get it to work for me but here is a rough outline and I'm not good at taking notes and I'm not really sure what worked.. I just know it works.


Things you'll need that aren't covered here:
Working PXE/TFTPBOOT service
Working NFS service

From this guys directions I followed STEP 1 and set up a terminal service while running a knoppix live CD on one workstation:
http://pxe.dev.aboveaverageurl.com/index.php/PXE_Booting/Knoppix

_____________________________________________________________________________________
Step One: Generating the needed files

Knoppix has the built-in ability to auto-configure itself to network boot itself, and this makes the process rather easy. In the "KNOPPIX" submenu, select the "Start Terminal Server" option.

IMPORTANT NOTE! By doing this, it will start up dhcp, and many other services! Running two DHCP servers on the same subnet is generally a very bad idea!

When prompted, select the menu item to configure the terminal server, and run through that.


1. If at all possible, start the terminal service on a different NIC. This will prevent a LOT of possible mayhem. If you only have a single NIC, then before you click the final "OK" button, be sure to unplug your ethernet cable.

2. For the IPs, just a low number of IPs (must be specified as "192.168.0.2 192.168.0.3") is fine. You cannot enter a single IP, and the range is inclusive of what you input.

3. Be sure to select all needed kernel modules on the slaves!

4. Be sure NOT to check the NX thin client button! The other software does not matter, however, if you check the secure box, by default your clients will not be able to access the root user. (Note: The "secure" option is easily changable later on.)

5. Specify any needed kernel paramaters for your slaves. If you don't need any, do as the box says and just click ok.

5b. If you only have one NIC in the computer running knoppix, and an existing DHCP server on the network, unplug the knoppix computer now.

6. Click the final ok, all done.

6b. If you unplugged your ethernet cable, be sure to stop the DHCP server on knoppix before plugging it back in.

_____________________________________________________________________________________


Before I started I issued a "ifconfig eth0 down" to ensure I wasn't setting up a DHCP server on a network that already has a DHCP server.

Once I was done I copied vmlinuz and miniroot.gz to the /tftpboot/knoppix directory in my PXE server. I also copied the pxelinux.cfg/default file to get the labels to add to my current pxelinux.cfg/default file


For my working NFS service I added this line to my /etc/exports:

/path/to/share 192.168.1.0/255.255.255.0(ro,no_root_squash,async)

in /path/to/share I copied over the KNOPPIX directory from knoppix live CD


For my pxelinux.cfg/default I added these lines:

LABEL knoppix
KERNEL knoppix/vmlinuz
APPEND secure nfsdir=ipaddress.to.nfs/server:/path/to/share nodhcp nodma noudev 2 lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 initrd=knoppix/miniroot.gz quiet BOOT_IMAGE=knoppix


I had to add nodma and noudev because when I booted it locked up looking for hardware. Edit these "cheatcodes" as needed.


Booted up using Network boot and typed: knoppix


And it booted up to a "live" knoppix!

1 Comments:

Blogger Digininja said...

Who plagiarised who here?

http://pxe.dev.aboveaverageurl.com/index.php/PXE_Booting/Knoppix

7:29 PM  

Post a Comment

<< Home