Ubuntu Server PXE Boot Guide

Which would you like to see added?


  • Total voters
    64
Yep a lot of people I know prefer to use it that way. I just prefer my ddwrt. Only thing is that in a VM, the host and the VM will always have to be on. You can pretty much run this on any old hardware. If you have a old tower around you might want to go that route of you are using it as a DHCP server also.
 
I set my fog server up to give out DHCP in a different range from my BT ADSL router. Works well.
I have followed the guide up to the menus which is all working great. I have downloaded the AV iso's but might be the weekend before I get them up and working.
One trick I found which helped is to install putty on the window PC then you can SSH to the unbuntu server from the windows PC and do everything from the one Screen & Keyboard.
 
Just working my way through the doc and found that I had to use this location for the FOG download using the sudo wget command:

http://downloads.sourceforge.net/project/freeghost/FOG/fog_0.32/fog_0.32.tar.gz

Also I noticed that you call the fog setup directory a couple of different names:
setupfog & fog-setup so you may want to tidy that up. :D

Edit: OK so have got the basic setup working! Tested network booting on a Dell Netbook and get the FOG menu.
So I started going through the menu customisation but am stuck with the WinSCP transfering of files. Whenever I try to upload a file back to the server it can't do it and says there is a permission error. What am I doing wrong?
 
Last edited:
Just working my way through the doc and found that I had to use this location for the FOG download using the sudo wget command:

http://downloads.sourceforge.net/project/freeghost/FOG/fog_0.32/fog_0.32.tar.gz

Also I noticed that you call the fog setup directory a couple of different names:
setupfog & fog-setup so you may want to tidy that up. :D

Edit: OK so have got the basic setup working! Tested network booting on a Dell Netbook and get the FOG menu.
So I started going through the menu customisation but am stuck with the WinSCP transfering of files. Whenever I try to upload a file back to the server it can't do it and says there is a permission error. What am I doing wrong?
Totally going to fix that stuff hehe thanks you fpr the heads up.

When you transfer files with WinSCP they have to go to the /home/<uourusername>/ folder you can't write to anywhere else, and you can't use WinSCP as sudo.
 
Ah thanks for that.

I've come across another issue.
The Ubuntu/FOG server is the DHCP server and it is giving out IPs and DNS OK but not the gateway.
Where do I check to see if this is set correctly?
The Ubuntu/FOG server itself has the correct gateway and can access the internet.
 
I think your problem lies in the dhcpd.conf. I was under the assumption that FOG already automatically set the correct gateway for the DHCP server to give to the clients.

Check this guide here

In the dhcpd.conf file there is a line that is "option router" line that is what tell the clients what the Gateway is, this may be either wrong or missing.

"option routers: Tells the DHCP server the gateway address it should assign to requesting clients. In our case the gateway is 192.168.0.1.
If you are not sure about your personal network settings (network, netmask, broadcast address, etc.), visit www.subnetmask.info where you can calculate your settings."

to edit dhcpd.conf use this command

sudo nano /etc/dhcp3/dhcpd.conf

Look and see if that line is correct.
 
Strange, there is no dhcpd.conf file in that folder...

There is however /etc/dhcp/dhcpd.conf and that looks like it has the correct setup for what I setup during the install.
The line for the Option Router is commented out and has x.x.x.x so I'll change that and try again.
 
Last edited:
Strange, there is no dhcpd.conf file in that folder...

type this command

whereis dhcpd.conf

if you said it is giving out addresses there must be a conf file somewhere.

if it doesn't exist you may need to reinstall the dhcp server portion, and you can do that with this command.

sudo apt-get install dhcp3-server
 
Last edited:
type this command

whereis dhcpd.conf

if you said it is giving out addresses there must be a conf file somewhere.

if it doesn't exist you may need to reinstall the dhcp server portion, and you can do that with this command.

sudo aptget install dhcp3-server

I haven't run this command, but I believe it should be "apt-get".
 
So it was the file in /etc/dhcp/ and not /etc/dhcp3/.

It's all working now.
Now to look at customising the menu!
 
Been a while but I now have Bitdefender and AVG working.
Thanks
Trying to get trinity working but get an error at this point

acs@ubuntu:/tftpboot/av/trinity/trk3$ sudo ./mkpxelinux
sudo: ./mkpxelinux: command not found

the file is there:-
acs@ubuntu:/tftpboot/av/trinity/trk3$ ls -al
total 137012
drwxrwxr-x 4 acs acs 4096 2012-02-12 20:16 .
drwxrwxr-x 5 acs acs 4096 2012-02-12 20:16 ..
drwxrwxr-x 2 acs acs 4096 2012-02-12 20:16 captive
-rw-rw-r-- 1 acs acs 1020 2010-01-20 06:45 mkpxelinux
...

Any suggestions ?
 
Try just ./mkpxelinux of course it is in a folder owned by root so it won't work, but you could always
Sudo chown acs /tftpboot/av/trinity/trk3
 
Thanks for that..
tried chown but still get...

acs@ubuntu:/tftpboot/av/trinity/trk3$
acs@ubuntu:/tftpboot/av/trinity/trk3$ sudo ./mkpxelinux
sudo: ./mkpxelinux: command not found

acs@ubuntu:/tftpboot/av/trinity/trk3$ ./mkpxelinux
-bash: ./mkpxelinux: Permission denied

acs@ubuntu:/tftpboot/av/trinity/trk3$ sudo chown acs /tftp boot/av/trinity/trk3

acs@ubuntu:/tftpboot/av/trinity/trk3$ sudo ./mkpxelinux sudo: ./mkpxelinux: command not found

acs@ubuntu:/tftpboot/av/trinity/trk3$ ./mkpxelinux -bash: ./mkpxelinux: Permission denied

acs@ubuntu:/tftpboot/av/trinity/trk3$ ls -al
total 137012
drwxrwxr-x 4 acs acs 4096 2012-02-12 20:16 .
drwxrwxr-x 5 acs acs 4096 2012-02-12 20:16 ..
drwxrwxr-x 2 acs acs 4096 2012-02-12 20:16 captive
-rw-rw-r-- 1 acs acs 1020 2010-01-20 06:45 mkpxelinux
drwxrwxr-x 3 acs acs 4096 2012-02-12 20:16 share
-rw-rw-r-- 1 acs acs 22576 2008-03-01 23:28 syslinux
-rw-rw-r-- 1 acs acs 24576 2008-04-08 13:12 syslinux.e xe
-rw-rw-r-- 1 acs acs 134811648 2011-04-12 09:49 trkramfs
-rw-rw-r-- 1 acs acs 1934764 2008-04-14 09:13 trspack-1_ 0.exe
-rw-rw-r-- 1 acs acs 1739852 2008-04-14 09:14 trsrun-1_0 .exe
-rw-rw-r-- 1 acs acs 1739312 2008-04-14 09:14 trsrun-1_0 -nq.exe
acs@ubuntu:/tftpboot/av/trinity/trk3$

=====
Will leave trinity for the moment and move on to next section.
Thanks
 
I have been wanting to setup a PXE Server for the workshop for ages but never seem to find the time/good documentation to set one up.

Same here. Thanks for all the work you are doing, I think while I have some time this week I will get started on this and let you know how it goes. Couple requests though.

Could you add Kaspersky Rescue disk, preferably with the ability to update it and keep it up to date from the last update.

Windows Install images. I have some Windows images that I have heavily modified (Got vista with all its latest updates and drivers to complete a full installation in 1.5 hours) as well as my AIO Windows 7 images that would be great to deploy over the network. I imagine (from the last time I was researching this) that the easiest way to do this would be to keep them in their ISO format, however, my ISO for vista is about 7gbs so I am not sure how well that would work . . .

Thanks
 
Judging on what's been said, I think it's worth noting that FOG works perfectly well with or without a DHCP server present!

Oh, and PCX - you should probably look into Grub4DOS and how ISO mapping works. I've used iPXE to boot 4+gb images from the DRBL server in Taiwan, without even asking! You can definitely do it, it's just that a PXE server might not be the right way to do it. Instead, an iPXE disk (or even chainload iPXE from PXE?) to pull an ISO from a full-on FTP server. PXE stacks normally use TFTP instead, which is only great for small files.
 
[start linux moron]

Code:
a.	sudo mkdir –p /opt/setupfog
~
sudo wget http://sourceforge.net/projects/freeghost/files/FOG/fog_0.32/fog_0.32.tar.gz -O /opt/[B]fog-setup[/B]/fog.tar.gz

should this be
Code:
sudo wget http://sourceforge.net/projects/freeghost/files/FOG/fog_0.32/fog_0.32.tar.gz -O /opt/[B]setupfog[/B]/fog.tar.gz

So I did that, and then this, and it says this:
2012-02-16144944.jpg


But it is in .gz format.

What am I doing wrong?

[/linux moron]
 
[start linux moron]

Code:
a.	sudo mkdir &ndash;p /opt/setupfog
~
sudo wget http://sourceforge.net/projects/freeghost/files/FOG/fog_0.32/fog_0.32.tar.gz -O /opt/[B]fog-setup[/B]/fog.tar.gz

should this be
Code:
sudo wget http://sourceforge.net/projects/freeghost/files/FOG/fog_0.32/fog_0.32.tar.gz -O /opt/[B]setupfog[/B]/fog.tar.gz

So I did that, and then this, and it says this:
2012-02-16144944.jpg


But it is in .gz format.

What am I doing wrong?

[/linux moron]

Its not you :D

Have a look at my earlier post #43 as I posted the correct download link.
It's not downloading the correct file that why you're getting an error.
 
Yep page five third post down. :) have not had a chance to update yet. Hopefully I will have a free hour or two this weekend to update and add new info. Also...I have to reinstall my server too haha.
 
Yep page five third post down. :) have not had a chance to update yet. Hopefully I will have a free hour or two this weekend to update and add new info. Also...I have to reinstall my server too haha.

Ok. I got the right FOG and extracted it. The install script runs OK but then I get to apt-get and the machine reboots.

Code:
 Here are the settings FOG will use:
         Distro: Ubuntu
         Installation Type: Normal Server
         Server IP Address: 192.168.1.10
         DHCP router Address:
         DHCP DNS Address: 192.168.1.254
         Interface: eth0
         Using FOG DHCP: 1
         Internationalization: 0

  Are you sure you wish to continue (Y/N) y

  Installation Started...

  Installing required packages, if this fails
  make sure you have an active internet connection.

  * Preparing apt-get
  * Installing package: apache2

---> at this point reboot occurs

any ideas?
 
Back
Top