Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old March 31st, 2009   #1
chrismyers
A Carafe of Ubuntu
 
chrismyers's Avatar
 
Join Date: Apr 2006
Location: Leeds, England
Beans: 133
Ubuntu
Creating a PXE boot for Jaunty Live.

Requires:
Ubuntu server for PXE environment (tested on Jaunty 9.04 server).
Wired network.
PXE boot capable network card on target machine.
On the Ubuntu server:

Login as root or sudo su -

Create the following directory structure:
/pxe

/pxe/images

/pxe/images/ubuntu

/pxe/pxelinux.cfg
Download syslinux-xxx.zip from here:

http://www.kernel.org/pub/linux/utils/boot/syslinux/

Extract the files.

Find menu.c32 & pxelinux.0 & copy them to the /pxe directory.

The other syslinux files & zip are no longer needed and can be deleted.

create a file /pxe/pxelinux.cfg/default & paste in the following:
DEFAULT menu.c32
PROMPT 0
NOESCAPE 0
ALLOWOPTIONS 0
TIMEOUT 600

MENU TITLE PXE Boot Menu

LABEL Ubuntu Jaunty Live Desktop
kernel images/ubuntu/casper/vmlinuz
append boot=casper netboot=nfs nfsroot=192.168.1.101:/pxe/images/ubuntu initrd=images/ubuntu/casper/initrd.gz -- splash

LABEL Ubuntu Jaunty Live Install
kernel images/ubuntu/casper/vmlinuz
append boot=casper netboot=nfs nfsroot=192.168.1.101:/pxe/images/ubuntu initrd=images/ubuntu/casper/initrd.gz -- splash only-ubiquity
Copy the contents of the Ubuntu live CD into /pxe/images/ubuntu

Now install dnsmasq & nfs-kernel-server
apt-get install dnsmasq nfs-kernel-server
edit /etc/dnsmasq.conf & replace all text with:
no-hosts
server=/localnet/192.168.1.1
dhcp-range=192.168.1.40,192.168.1.50,2h
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/pxe
resolv-file=/etc/nameservers
dhcp-option=3,192.168.1.1
Make sure you replace the ip addresses, netmasks etc with ones suitable for your network.

edit /etc/exports & replace all text with:
/pxe/images *(ro,sync,subtree_check)

Add your DNS nameservers by creating the new file (this example is for opendns):

nano /etc/nameservers
nameserver 208.67.222.222
nameserver 208.67.220.220
Reboot your server (or restart dnsmasq & nfs-kernel-server).


You should now be able to boot your target client machine to Ubuntu if it has a pxeboot enabled network card (usually accessed by pressing F12 at boot).

This worked for me. I hope this helps.
__________________
The Ubuntu Counter Project - User number # 6435

Last edited by chrismyers; July 28th, 2009 at 03:59 PM.. Reason: Missing DNS entry.
chrismyers is online now   Reply With Quote
Old April 4th, 2009   #2
FrozenCow
First Cup of Ubuntu
 
Join Date: Jun 2008
Beans: 1
Re: Creating a PXE boot for Jaunty Live.

Thanks for the tutorial! It worked great for me under VirtualBox (both PXE server and client). Though, it took a long time to boot and the performance isn't great, but it works .
EDIT: Just tried Xubuntu, which I setup the same way. It runs much faster.

Last edited by FrozenCow; April 4th, 2009 at 11:56 AM..
FrozenCow is offline   Reply With Quote
Old April 5th, 2009   #3
chrismyers
A Carafe of Ubuntu
 
chrismyers's Avatar
 
Join Date: Apr 2006
Location: Leeds, England
Beans: 133
Ubuntu
Re: Creating a PXE boot for Jaunty Live.

No problems.

Now you have done that, you can add other live images, such as clonezilla - for making clone images of any machine (Linux/Windows).

__________________
The Ubuntu Counter Project - User number # 6435
chrismyers is online now   Reply With Quote
Old April 5th, 2009   #4
chrismyers
A Carafe of Ubuntu
 
chrismyers's Avatar
 
Join Date: Apr 2006
Location: Leeds, England
Beans: 133
Ubuntu
Re: Creating a PXE boot for Jaunty Live.

Quote:
Originally Posted by FrozenCow View Post
Thanks for the tutorial! It worked great for me under VirtualBox (both PXE server and client). Though, it took a long time to boot and the performance isn't great, but it works .
EDIT: Just tried Xubuntu, which I setup the same way. It runs much faster.
Out of interest. Does your machine take a long time to boot, or is it slow when booted?

If it's slow to boot it could be because its running under VM (or slow network). If it's running slow, this could mean that your client has less than 384 megs of ram.
__________________
The Ubuntu Counter Project - User number # 6435
chrismyers is online now   Reply With Quote
Old May 26th, 2009   #5
mbeierl
Way Too Much Ubuntu
 
mbeierl's Avatar
 
Join Date: Apr 2006
Location: Ottawa, Canada
Beans: 287
Ubuntu 9.10 Karmic Koala
Re: Creating a PXE boot for Jaunty Live.

Hmmm... things worked but only up to a point: it "hangs" right after the squashfs message, with no further activity in the pxe client at all.

On the server I see this:
May 26 16:08:08 bootserver mountd[4469]: authenticated mount request from 192.168.0.122:1016 for /pxe/images/ubuntu (/pxe/images)

I have verified that the nfs mount is there and it looks fine from a secondary machine, but I have no idea how to debug the PXE client.
mbeierl is offline   Reply With Quote
Old May 26th, 2009   #6
mbeierl
Way Too Much Ubuntu
 
mbeierl's Avatar
 
Join Date: Apr 2006
Location: Ottawa, Canada
Beans: 287
Ubuntu 9.10 Karmic Koala
Re: Creating a PXE boot for Jaunty Live.

Urrrg... Hitting ctrl-c let something go and it booted. I am baffled at this point...
mbeierl is offline   Reply With Quote
Old June 1st, 2009   #7
senile2
First Cup of Ubuntu
 
Join Date: Feb 2008
Beans: 4
Re: Creating a PXE boot for Jaunty Live.

I guess I'll use this as a place to stop... I have gone cross eyed reading all the material on how to build a PXE server in Ubuntu, and so far none of them have worked or are missing parts or don't explain well enough how to do it.

Since your thread is dependent on PXE, I have to assume that you have one set up. Do you know of a good "how-to" document that will help setting one up? Currently have a system set up with Ubuntu 9.04 server and gnome gui, DHCP3, samba, tftfd, SSH, .... can't remember all the other packages I have installed at the direction of one doc or another.

I am part of a club that takes old computers and refurbs them then gives them to needy kids. Lots of fun, but after about 500 os installs (manually), there has got to be a better way.

Thanks in advance....
senile2 is offline   Reply With Quote
Old June 2nd, 2009   #8
chrismyers
A Carafe of Ubuntu
 
chrismyers's Avatar
 
Join Date: Apr 2006
Location: Leeds, England
Beans: 133
Ubuntu
Re: Creating a PXE boot for Jaunty Live.

Hi Senile2,

Adding other boot images, such as Clonezilla (Ubuntu version) is relatively simple.

First, add the following into /pxe/pxelinux.cfg/default

Code:
LABEL Clonezilla 
kernel images/clonezilla/live/vmlinuz1 
append boot=live initrd=images/clonezilla/live/initrd1.img boot=live union=aufs netboot=nfs nfsroot=192.168.1.xxx:/pxe/images/clonezilla
Note: Change the IP to match that of your server.

Create a directoy:

/pxe/images/clonezilla

Download Clonezilla, burn the CD & copy the entire contents of the cd to the clonezilla directory (You no longer need the CD).

Try booting from PXE. You should now have a Clonezilla option.

Cheers.
__________________
The Ubuntu Counter Project - User number # 6435

Last edited by chrismyers; July 28th, 2009 at 04:04 PM..
chrismyers is online now   Reply With Quote
Old June 7th, 2009   #9
Davie In Dubai
First Cup of Ubuntu
 
Join Date: Dec 2008
Beans: 6
Re: Creating a PXE boot for Jaunty Live.

Interesting, but would I be right in guessing that any existing DHCP server on his LAN would stop this from working?
Davie In Dubai is offline   Reply With Quote
Old July 2nd, 2009   #10
deanhopkins
Just Give Me the Beans!
 
deanhopkins's Avatar
 
Join Date: Oct 2006
Location: Wales, United Kingdom
Beans: 61
Ubuntu 9.04 Jaunty Jackalope
Send a message via MSN to deanhopkins
Re: Creating a PXE boot for Jaunty Live.

Im having a problem with this whereas the ubuntu installer is telling me that 'No common CD-ROM drive was detected', as my laptop cd rom is broken.

Obviously, the files that are needed are stored on my ubuntu install on my desktop, and the laptop needs to read from them instead of looking for the CD.

any ideas?

thanks
deanhopkins is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:06 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry