Setting Up A PXE Install Server For Multiple Linux Distributions With Ubuntu Edgy Eft - Page 6

9 Add Fedora Core 6 Netboot

Next we download the Fedora Core 6 netboot files and put them in /var/lib/tftpboot/fedora/6 like this:

cd /var/lib/tftpboot
mkdir -p fedora/6/i386
cd fedora/6/i386
wget http://ftp-stud.fht-esslingen.de/pub/Mirrors/fedora.redhat.com/linux/core/6/i386/os/images/pxeboot/initrd.img
wget http://ftp-stud.fht-esslingen.de/pub/Mirrors/fedora.redhat.com/linux/core/6/i386/os/images/pxeboot/vmlinuz

(You can download the files from any other Fedora mirror as well. Use one that is close to you.)

Then add a Fedora Core 6 LABEL stanza to /var/lib/tftpboot/pxelinux.cfg/default. The file should now look like this:

vi /var/lib/tftpboot/pxelinux.cfg/default

DISPLAY boot.txt

DEFAULT edgy_i386_install

LABEL edgy_i386_install
        kernel ubuntu/edgy/i386/linux
        append vga=normal initrd=ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw  --
LABEL edgy_i386_linux
        kernel ubuntu/edgy/i386/linux
        append vga=normal initrd=ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw  --
LABEL edgy_i386_server
        kernel ubuntu/edgy/i386/linux
        append base-installer/kernel/linux/extra-packages-2.6= pkgsel/install-pattern=~t^ubuntu-standard$ pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw  --

LABEL edgy_i386_expert
        kernel ubuntu/edgy/i386/linux
        append priority=low vga=normal initrd=ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw  --
LABEL edgy_i386_server-expert
        kernel ubuntu/edgy/i386/linux
        append base-installer/kernel/linux/extra-packages-2.6= pkgsel/install-pattern=~t^ubuntu-standard$ pkgsel/language-pack-patterns= pkgsel/install-language-support=false priority=low vga=normal initrd=ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw  --

LABEL edgy_i386_rescue
        kernel ubuntu/edgy/i386/linux
        append vga=normal initrd=ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw  rescue/enable=true --

LABEL dapper_i386_install
        kernel ubuntu/dapper/i386/linux
        append vga=normal initrd=ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw  --
LABEL dapper_i386_linux
        kernel ubuntu/dapper/i386/linux
        append vga=normal initrd=ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw  --
LABEL dapper_i386_server
        kernel ubuntu/dapper/i386/linux
        append base-installer/kernel/linux/extra-packages-2.6= pkgsel/install-pattern=~t^ubuntu-standard$ pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw  --

LABEL dapper_i386_expert
        kernel ubuntu/dapper/i386/linux
        append DEBCONF_PRIORITY=low vga=normal initrd=ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw  --
LABEL dapper_i386_server-expert
        kernel ubuntu/dapper/i386/linux
        append base-installer/kernel/linux/extra-packages-2.6= pkgsel/install-pattern=~t^ubuntu-standard$ pkgsel/language-pack-patterns= pkgsel/install-language-support=false DEBCONF_PRIORITY=low vga=normal initrd=ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw  --

LABEL dapper_i386_rescue
        kernel ubuntu/dapper/i386/linux
        append vga=normal initrd=ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw  rescue/enable=true --

LABEL sarge_i386_linux
        kernel debian/sarge/i386/linux
        append vga=normal initrd=debian/sarge/i386/initrd.gz ramdisk_size=9458 root=/dev/rd/0 devfs=mount,dall rw  --
LABEL sarge_i386_expert
        kernel debian/sarge/i386/linux
        append DEBCONF_PRIORITY=low vga=normal initrd=debian/sarge/i386/initrd.gz ramdisk_size=9458 root=/dev/rd/0 devfs=mount,dall rw  --
LABEL sarge_i386_linux26
        kernel debian/sarge/i386/2.6/linux
        append vga=normal initrd=debian/sarge/i386/2.6/initrd.gz ramdisk_size=10938 root=/dev/rd/0 devfs=mount,dall rw  --
LABEL sarge_i386_expert26
        kernel debian/sarge/i386/2.6/linux
        append DEBCONF_PRIORITY=low vga=normal initrd=debian/sarge/i386/2.6/initrd.gz ramdisk_size=10938 root=/dev/rd/0 devfs=mount,dall rw  --

LABEL etch_i386_install
        kernel debian/etch/i386/linux
        append vga=normal initrd=debian/etch/i386/initrd.gz  --
LABEL etch_i386_linux
        kernel debian/etch/i386/linux
        append vga=normal initrd=debian/etch/i386/initrd.gz  --

LABEL etch_i386_expert
        kernel debian/etch/i386/linux
        append priority=low vga=normal initrd=debian/etch/i386/initrd.gz  --

LABEL etch_i386_rescue
        kernel debian/etch/i386/linux
        append vga=normal initrd=debian/etch/i386/initrd.gz  rescue/enable=true --

LABEL etch_i386_auto
        kernel debian/etch/i386/linux
        append auto=true priority=critical vga=normal initrd=debian/etch/i386/initrd.gz  --

LABEL fedora6_i386_linux
         kernel fedora/6/i386/vmlinuz
         append initrd=fedora/6/i386/initrd.img

PROMPT 1
TIMEOUT 0

Add the new installation option to /var/lib/tftpboot/boot.txt:

vi /var/lib/tftpboot/boot.txt

Available Boot Options:
=======================
edgy_i386_install      edgy_i386_linux                edgy_i386_server
edgy_i386_expert       edgy_i386_server-expert        edgy_i386_rescue
dapper_i386_install    dapper_i386_linux              dapper_i386_server
dapper_i386_expert     dapper_i386_server-expert      dapper_i386_rescue
sarge_i386_linux       sarge_i386_expert              sarge_i386_linux26
sarge_i386_expert26    etch_i386_install              etch_i386_linux
etch_i386_expert       etch_i386_rescue               etch_i386_auto
fedora6_i386_linux

When you installl Fedora Core 6 over the network, the installer will ask you about the installation method. Select HTTP and enter ftp-stud.fht-esslingen.de as the host, pub/Mirrors/fedora.redhat.com/linux/core/6/i386/os/ as the directory. Of course, you can use any other Fedora mirror as well; use one that is close to you.

Share this page:

13 Comment(s)

Add comment

Comments

From: Wim at: 2009-02-16 09:29:19

Running "sudo su - " gives you a root prompt, after typing your own password.

From: Michael Boman at: 2012-01-09 16:05:14

sudo -s

does the same thing. On some distributions may you want to do

sudo -i

instead.

From: Anonymous at: 2009-06-15 11:19:58

There is no /etc/init.d/inetd in Ubuntu 8.04.2 LTS to fix this do

 /etc/init.d/openbsd-inetd restart

 

From: at: 2007-03-18 23:57:08

First I'd like to thank you for a very useful and informative article. This has certainly helped me to get PXE set up on Linux much faster than figuring it all out myself. :)

One thing I'd like to point out is that if you intend on using PXE to deploy an OS to the hard disk of the target computers it is much easier and safer to simply press F12 during POST then muck about with the BIOS settings. F12 should make the machine perform a once-off network boot and saves a huge amount of time when deploying to multiple machines as no other configuration is required. This has long been the standard procedure for 'big-brand' corporate desktop PCs and has been adopted by most white box manufacturers as well.

From: at: 2006-12-19 13:49:18

Very nice tutorial falko, as always.

If you use this often, or if you have a large environment to maintain with a lot of servers, it might be a good idea to create a separate VLAN for the PXE stuff (Installation VLAN). That way, your live servers won't be affected when their BIOS settings are faulty.
You will have to alter the network settings or switch port after the installation has finished of course.

It is probably best to mirror the OS repositories on the PXE boot server as well, to limit bandwidth usage, not just for yourself but also for the server you download it off, and to speed up the install process. This is especially beneficial if you have to install a few servers at once. Like falko said, you will need a lot of free diskspace if you want to serve several different flavours.
When you have a local OS repository, it is also possible to tweak certain files a bit before they are used in the new installation. Things like site wide defaults and global config options etc.

From: marco at: 2010-08-19 09:04:31

Same question of banksps. Is possible to deploy windows server also?

From: at: 2006-12-20 16:37:32

I recommend the following changes in dhcpd configuration

deny unknown-clients;

as a global parameter and a

host server1 {  hardware ethernet 00:11:22:33:44:55; }

per server on the range section.

This will allow you to use another DHCP server on the same VLAN. Even if you don't have another DHCP server, this will allow you to have more control over who want to install a server via PXE.

From: at: 2006-12-20 21:18:36

Thanks a lot for this howto. It worked perfectly for me and I never even knew that something like this could be done!

From: at: 2007-09-06 12:06:08

I almost hate to ask because I'm such a Linux fanatic but I do end up having to re-install Windows systems.  Does anybody know of a way to use PXE for a Windows install?  I did some similar PXE work and I love it.  Find mine at: http://blog.banksnetworking.com/2007/08/28/pxe-for-the-masses/

 

From: at: 2008-04-18 22:00:52

On SLES (and I assume OpenSUSE) there is an install= kernel parameter where you can tell the installer where to grab the install media. It supports http and nfs and probably more.

kernel sles.kernel
append install=http://server/SLES (other options ommited)

When the installer starts it will not prompt you for the CDs any more. As a side note, there are tutorials out there on how to convert all the install CDs to a single directory tree so you can share it out.

From: Anonymous at: 2010-04-09 16:10:10

Nice recipe for setting up the DHCP + PXE end of the scheme. Would really like to see a tutorial for the next logical phase, which would be how to create local copies of the installation data. Being able to serve complete installations without leaving the LAN seems like a very good way to conserve bandwidth, but that requires setting up local mirrors/repositories/whatever-they're-calleds for each distro. My experience trying to do this for Debian Lenny has so far not worked well, and an explanation that includes a clear recipe such as this one would be most welcome.

Keep up the Good Work.

  
 

From: Anonymous at: 2010-10-01 04:44:34

can it possible to do unattend unstallation for windows operating system(xp,vista, win7) using same ubuntu PXE server

From: Leopoldo at: 2013-03-09 21:38:02

Hi. How should I set for the case to have an OpenSuse image made ??with Clonezilla, and use it to network nodes use it, I meen do not use "installers" but existing machine images. Thanks for the input, has served me well.