PXE boot Ubuntu

Update:
This works with latest version – ubuntu 11.10

Once you are done setting-up PXE Server, you might need few OS booting from network / pxe for rescue purpose.

Ubuntu 10.04 can be configured to boot from network & can be used for system rescue.

Following is the procedure to boot Ubuntu 10.04 using PXE.

Mount ubuntu live iso on pxe server
mkdir /mnt/iso
mount ubuntu-10.04-desktop-i386.iso /mnt/iso

Create nfs share for ubuntu & copy all the content of live cd to it
mkdir /nfs-share/ubuntu -p
cp -rfva /mnt/iso/* /nfs-share/ubuntu/
cp -rfva /mnt/iso/.disk /nfs-share/ubuntu/

Enter following in /etc/exports
/nfs-share/ubuntu/ *(no_root_squash,rw,async)

Apply changes
exportfs -rv

Enter following in /tftpboot/pxelinux.cfg/default

LABEL Ubuntu-10.04
kernel /tftpboot/images/ubuntu/vmlinuz
append boot=casper netboot=nfs nfsroot=NFSSERVER:/nfs-share/ubuntu initrd=/tftpboot/images/ubuntu/initrd.lz

Copy initrd and vmlinuz from Ubuntu live cd to tftpboot
cd /nfs-share/ubuntu/casper
cp vmlinuz initrd.lz /tftpboot/images/ubuntu/

Credits


if you find any missing point in here, please let us know in comment section or tweet us at @linuxreaders. To get more articles like this, subscribe to our RSS feeds / Mails.

Article by Dhaval Thakar

Hi, I am Linux Admin. You'll find my articles small & without much descriptions.
Read 218 articles by
  • Pingback: blog @ pablocases.com » Setup Ubuntu PXE netbooting

  • vinterkind

    my ubuntu 10.04 amd64 disk does not have a casper directory.
    the kernel parameter boot=casper is worthless here.

    up until now i’ve tried it with (excerpt) :
    kernel /ubu/install/vmlinuz
    append netboot=nfs root=/dev/nfs nfsroot=NFSSERVER:/nfsroot/ubu ide=nodma initrd=/ubu/install/initrd.gz

    cheers,

  • http://techienote.com Vidyadhar

    You need to copy “.disk” from live cd to your pxe server.

  • lbanz

    I got it booted but when it is starting up ubuntu, it gets stuck on the following.

    Please provide a name for this Disc, such as ‘Debian 5.0.3 Disk1′:

    I have to press ctrl alt f1 and give the disc a name before it continues booting. Is there a way of fixing this? Am using 10.4 Ubuntu.

  • vongillus

    Don’t forget to copy /mnt/iso/.disk directory or it will not work properly…

Archives

Categories

Page optimized by WP Minify WordPress Plugin