PXE booting DSL


Forum: DSL Ideas and Suggestions
Topic: PXE booting DSL
started by: mattias

Posted by mattias on Sep. 16 2005,14:22
I just made some minor modifications to the linuxrc script to incorporate the KNOPPIX-file one th initrd (yes, that's right, a 50MB initrd). This makes for very easy network booting that does not even require an NFS server to mount the KNOPPIX file.

If you want to try it out, take a look here:

< http://www.damnsmalllinux.org/talk/node/248 >

And download the files necessary her:

< Download directory >

Since the changes in the linuxrc are marginal, I suggest including them to upcoming releases. It would help building the PXE version from any new release within five minutes.

It might be possible to use a windows box as boot server, I will figure out the configuration soon.

Regards,
Matt

Posted by cbagger01 on Sep. 19 2005,05:09
Sounds like a good idea.

If you can automate this process into a user-friendly script, it would be a great way to build a PXE-DSL.

1) Boot livecd
2) Download script
3) Execute script.
4) Move newly generated file(s) over to PXE server.

Posted by mattias on Sep. 19 2005,14:06
Quote (cbagger01 @ Sep. 19 2005,01:09)
Sounds like a good idea.

If you can automate this process into a user-friendly script, it would be a great way to build a PXE-DSL.

I will do this soon. It might require that the bootbox has at least 192MB RAM, but on the other side the changes might be so small that they can be easily integrated in the "standard" DamnSmall distribution.

In the meantime please try the prepared ZIP or tar.gz file with a "normal" (harddisk installed) Linux or even with Windows as a boot box.

Regards,
Mattias

Posted by chickenman on Sep. 20 2005,13:57
This is a concept that could prove very usefull to me, as i have a P3 that refuses to recognise any IDE devices (most of the time, its really messed...) If I could boot via network then I wouldnt need a HDD right?, the box would also be very quiet without a noisy HDD or CDROM.

What do I need in terms of network hardware to pull this off?, do i need boot roms etc and are they all the same or do i need something specific?

cheers, keep up the good work -this is just one more feature that will distinguish DSL from the others, it would be amazing to see incorporated on the 50mb disk.

Posted by mattias on Sep. 30 2005,17:00
Quote (chickenman @ Sep. 20 2005,09:57)
What do I need in terms of network hardware to pull this off?, do i need boot roms etc and are they all the same or do i need something specific?

No, you do not need a boot ROM. You either invest about 15 Euros in a PXE capable network card or you create a Etherboot floppy (this is essentially a minimal OS for initializing the network card and starting the boot process). Rom-o-matic helps:

< Rom-o-matic >

You might need to change the boot file from "pxelinux.0" to "etherboot.nbi" when using Etherboot instead of PXE.

Regards,
Matt

Posted by chickenman on Oct. 03 2005,14:13
OK, I've downloaded the disk image for a 3Com Etherlink III, this is the card i have (i dont know if I'm supposed to get the corrisponding rom, but it should do fine otherwise anyway i figure. It was on the top of the download listbox - creepy, must have known it was me..). The disk boots and it searches for a DHCP server, I have tftp32 setup in what I think is a correct configuration but you mentioned i would need an "etherboot.nbi" -what does it take to get this file?, is it a reconstitution of the file "pxelinux.0"?

I have two network cards in my "server" machine, i am hoping that they wont interfere with each other (they have been so far, mainly because XP is crap..., but i can play gta:sa... (almost, damn radeon)) anyway, is it that simple -how do i know what part of the system is not correct?, stuck.

When the floppy boots it just bitches about not finding a DHCP and tells me FIVE times that it does not have an IP address (well duh). How do i get around this? -i thought tftpd32 was setup for dhcp...

I really dont understand much of how this works, but I would really like to get it going, sorry if its frustrating to explain.

Posted by mattias on Oct. 04 2005,11:40
[quote=chickenman,Oct. 03 2005,10:13][/quote]
Quote
The disk boots and it searches for a DHCP server, I have tftp32 setup in what I think is a correct configuration but you mentioned i would need an "etherboot.nbi" -what does it take to get this file?, is it a reconstitution of the file "pxelinux.0"?


No, "etherboot.nbi" is also included in the ZIP-file:

< Download >

Just pack all the files in the ZIP-file together with all the files from TFTPD32 in a single directory and select "etherboot.nbi" as boot file.

Quote

When the floppy boots it just bitches about not finding a DHCP and tells me FIVE times that it does not have an IP address (well duh). How do i get around this? -i thought tftpd32 was setup for dhcp...



< Screenshot >

- Select the IP starting address to a value that fits your network
- Select a pool size greater than 0
- Select the netmask according to the output of "ipconfig /all"

Quote

I have two network cards in my "server" machine, i am hoping that they wont interfere with each other (they have been so far, mainly because XP is crap...,


Just pull the plug on one of them...

Regards,
Mattias

Posted by chickenman on Oct. 04 2005,12:39
ok, I found etherboot.nbi (sorry i was so stupid as to overlook it previously)
I set that as the boot file, I set the other options -i'm fairly sure they are correct.

When I go to boot I get the same error, it displays:

"Searching for server (DHCP)....No IP address"
".No IP address"
".No IP address"
".No IP address"
".No IP address"

Two things I noticed;
-It does this weather or not I have tftpd32 running (!).
-The light corrisponding to the client's computer on the switch does not illuminate (No.2 as if it mattered -and no, the light is not broken). So I tried another 3Com Etherlink III card I happened to have lying around, it did the same.

Just about the only thing I can seem to get this thing to do is display other errors...

Thanks for your on-going help, dont stop now - I must be so close...

Posted by mattias on Oct. 04 2005,13:15
Please post a screenshot of the output of the command "ipconfig /all" along with the DHCP configuration from TFTPD32. I will take a look at them and tell you if the configuration fits together...

If posting the screenshots here does not work, just send them by email mattias at schlenker-webdesign dot de.

Regards,
Matt

Posted by chickenman on Oct. 04 2005,15:16
Heres a screenshot of the two configurations:



I hope you can make something from it, perhapse I should have just given the image URL. Tftpd32 is set to the incorrect card -it isnt when I disable the wireless card (but how am I going to connect to the net through it to make this post otherwise...)

I got a clip of the C:\tftp32 folder in there aswell -incase that helps.

Thanks again, oscar

Posted by mattias on Oct. 04 2005,15:48
Ooops, what is this 3com thing doing in the server?

First, disable or disconnect the 3com thing. I assume this wireless adapter is associated to an access point, the accesspoint has a cat5 connection to the etherbootable clien, right?

In this case, first disable dhcp on the wireless interface. Just statically assign the values from the screenshot for IP address, netmask and gateway, the configure TFTPD32 the following way:

server interface: 192.168.123.198
ip pool starting address: 192.168.123.220
size of pool: 10
boot file: etherboot.nbi
WINS/DNS: 192.168.123.254
Default Router: 192.168.123.254
Mask: 255.255.255.0
Domain Name: dsl.test

You might want to take care that the addresses 192.168.123.220 to 192.168.123.229 are not assigned by your Gatway/Router box. These boxes usually can be configured to assign a range from maybe 192.168.123.100 up to 192.168.123.200.

Then create a floppy that fits the clients network card and have fun!

Regards,
Mattias

Posted by chickenman on Oct. 05 2005,01:33
Sorry, I probably should have explained this better.

I have an XP computer (using as boot server), It has two network cards -a wireless (that the internet comes off allong with the rest of the houses networked computers) and an ethernet (this is the 3Com 3C905tx in the screenshot). From the ethernet it connects to an 8port switch that my client computer comes off. The client computer has the "3Com Etherlink III" network card.

OK, i hope that was coherrent...

I had been trying previously to run a headless server as a hardend firewall (from some old computer) that would act as an internet gateway for my 8-port so that I would only require one network card in my XP machine, because as i said previously XP ocationally has problems with having two cards (like it will ignore one of them, sometimes to the point it wont even recognise the hardware is installed...). But because the firewall programs i was using didnt like my wireless card i gave up.

hope you can straighten this out for me, thanks again for your help so far,

Oscar

Posted by cbagger01 on Oct. 05 2005,18:10
Does you have the built-in "Windows Firewall" running or some third party software firewall installed on your Windows XP computer?

If so, you may need to configure your firewall to allow the tftp server application to be accessed by other PCs on the network.

Posted by mattias on Oct. 06 2005,06:37
If you insist on running the TFTPD on the wired interface, keep those parameters, they will work. Just change the interface to listen on to "192.168.1.81" (in the TFTPD32 configuration window). You might not be able to reach the internet from the TFTP booted DSL client (just the local net), but I think this is secondary.

Try this, and if booting works, we can fix the rest of the configuration.

Regards,
Matt

Posted by chickenman on Oct. 07 2005,06:08
That is the configuration I was using (The wirless card allways comes up first for some reason when I startup tftpd and it happend to be up when i too the screenshot), My windows firewall is most definatly off on that connection. Sorry about the large silence from me, my primary hard drive just died...

Is there any way of me telling if its the client or the server incorrectly configured?

Can I boot off my wireless connection?, Wont I need drivers (DSL wont recognise it, but it should be a RT2500 (chipset) card, its branded "Cnet" -but its just imported - here < http://www.bb-zone.com/misc/rt2500/ > is how to do it, but i havent tried as i would need a floppy specifically for the card i assume)

thanks for all your help again.

Posted by mattias on Oct. 07 2005,10:31
I just created a script and a tarball that allows to setup the PXEDSL server on a normal DSL 1.5 run from CD. To try it do the following:

* Start DSL 1.5 from CD (USB stick and harddisk are not yet supported, I will fix this).
* Download this script:
< http://cdprojekte.schlenker-webdesign.de:8080/Public....edsl.sh >
* Run it: sudo bash pxedsl.sh
* The script will now download a tarball (3.8MB), ask you for configuration and bring up the daemons.
* Boot your PXE bootable clients with at least 128 Megs RAM.
* Have fun!

There is lots of redundancy and file that are not necassarily needed. I am sure that it will be possible to include the complete terminal server functionality in less than 300k. Might ist possible to include it in DSL if reduced this far?

Regards,
Mattias

Posted by chickenman on Oct. 07 2005,11:44
Very cool indeed, I am going to try it out in just a sec (need to use another comp to have net under dsl -see wireless problems)

This should be added to the DSL cd, its a really cool feature.

Posted by Hallio on Oct. 13 2005,10:12
Hi,
I've downloaded your PXE-bootable DSL and it's great - worked first time via my TFTP server and PXE bootable clients.

However, I have a question.  If I boot using the LiveCD and make my own, remastered, DSL how can I boot this remastered version of DSL, via PXE, instead of "yours".  I think you (or someone in this thread) hinted as to a way to convert a "new" DSL to a PXE-bootable one via a script.  Does this exist?

Thanks,
Steve

Posted by mattias on Oct. 14 2005,07:05
[quote=Guest,Oct. 13 2005,06:12][/quote]
Quote

However, I have a question.  If I boot using the LiveCD and make my own, remastered, DSL how can I boot this remastered version of DSL, via PXE, instead of "yours".  I think you (or someone in this thread) hinted as to a way to convert a "new" DSL to a PXE-bootable one via a script.  Does this exist?


The script < pxedsl.sh > does this. It also downloads and starts the TFTPD etc., but you might just make a tarball out of the directory /opt/pxedsl/tftpboot/. If your remastered DSL is larger than about 53 Meg, you need to create an own template for the new initrd by creating a container file, formatting it and copy the content of my modified initrd to it.

This will be the next thing I will make more flexible by adjusting the script.

Regards,
Mattias

Posted by Hallio on Oct. 14 2005,11:13
Thanks Mattias, that (mostly!) makes sense.  I'll keep an eye out for any new info.

I have another question now though perhaps you can help with.  I want to add some stuff to /opt/bootlocal.sh to mount a filesystem and do some other stuff.  How can I make these changes to a PXE bootable DSL?  I don't want to "backup" to a USB drive or IDE drive as my nodes are completely diskless.

Or, put another way, I want the machines that boot using PXE-DSL to run a different bootlocal.sh to the default.  Where and how do I change the file to make sure it's in the PXE bootable version?

Thanks for the help, i'm pretty new to DSL and PXE...

Thanks
Steve

Posted by Hallio on Oct. 17 2005,13:43
Hi,

I've made some, limited, progress on this myself.   All I want to do is provide a non-default /opt/bootlocal.sh to my pxe booted DSL systems.

I've looked at the "pxedsl.sh" script and, just after the KNOPPIX image is copied into the "/cdrom" folder added a "read" to pause the script.  At this point when the script is running I've switched to another session and tried these two things :

1) changed the symlink for the "/opt" directory to link to a writetable exact copy of the previous one and then editted "bootlocal.sh" appropriately.  

or

2) made a "backup.tar.gz" containing the "/opt/bootlocal.sh" and copied it to the root of the "initrd" filesystem

However neither of them seem to do as i'd hope.  When booting via 1) my changed bootlocal.sh simply doesn't exist on my clients, yet i've verified it's existence in the "minirt24.gz" file (by extracting it and mounting it. Method 2) does successfully place the "backup.tar.gz" on to my PXE booted client (in the root directory), but isn't being extracted.  After reading the remastering document I hoped I could just copy a ".tar.gz" to the root filesystem and it would be extracted for me....

Can someone help me out here?
Thanks,
Steve

Posted by tftp32 on Oct. 17 2005,16:26
Great idea.

I installed tftp32 and downloaded zip and copied files in tftp32root folder and set dhcp server in tftp32.
When I boot from 2 different computers with pxe network card I get an error message the the NBP is too large to fit into memory.

Does it mean the etherbbot.nbi is too large or the minirt24.gz?
Does anybody know how to work around it.

Does anybody know how fast DSL starts over a 1000MBIT network connection?

I hope the PXE functionality will be included in the DSL standard distribution.

Posted by mattias on Oct. 18 2005,06:38
Quote (Guest @ Oct. 17 2005,12:26)
Great idea.

I installed tftp32 and downloaded zip and copied files in tftp32root folder and set dhcp server in tftp32.
When I boot from 2 different computers with pxe network card I get an error message the the NBP is too large to fit into memory.

Does it mean the etherbbot.nbi is too large or the minirt24.gz?
Does anybody know how to work around it.

Does anybody know how fast DSL starts over a 1000MBIT network connection?

I hope the PXE functionality will be included in the DSL standard distribution.

When booting via PXE you have to load pxelinux.0 (the file etherboot.nbi is for booting via etherboot).

Regards,
Matt

Posted by tftp32 on Oct. 18 2005,14:38
I set the pxelinux.0 as Boot File.
Now the computer load that file, but stop when
TRYING TO LOAD PXELINUX.CFG
cannot find kernal image:linux

Posted by Riley on Nov. 07 2005,23:42
mattias: Any progress on a HD install setup?

Live-CD is great for portability, rescue, or trying a distro, but not for a permanant network setup, too slow & unchangeable.

A CD image copied to the HD for installing the base system as a starting point is a good idea, other packages etc. can be added after that.

Posted by jdog on Nov. 11 2005,03:57
Omg! Copy the modified files for dsl over to a linux ramdisk and set the default tftpboot directory to the ramdisk.

Now pxe boot dsl over a 1000 mbit connection. Wow!

:)

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