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

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Mon, 2006-12-18 19:29. ::

12 Add OpenSuSE 10.2 Netboot

Next we download the OpenSuSE 10.2 netboot files and put them in /var/lib/tftpboot/suse/10.2 like this:

cd /var/lib/tftpboot
mkdir -p suse/10.2/i386
cd suse/10.2/i386
wget http://ftp.uni-ulm.de/pub/mirrors/opensuse/distribution/SL-OSS-factory/inst-source/boot/i386/loader/initrd
wget http://ftp.uni-ulm.de/pub/mirrors/opensuse/distribution/SL-OSS-factory/inst-source/boot/i386/loader/linux

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

Then add an OpenSuSE 10.2 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

LABEL centos4.4_i386_linux
         kernel centos/4.4/i386/vmlinuz
         append initrd=centos/4.4/i386/initrd.img

LABEL mandriva2007.0_i386_linux
         kernel mandriva/2007.0/i386/vmlinuz
         append initrd=mandriva/2007.0/i386/all.rdz

LABEL suse10.2_i386_linux
         kernel suse/10.2/i386/linux
         append initrd=suse/10.2/i386/initrd splash=silent showopts

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     centos4.4_i386_linux           mandriva2007.0_i386_linux
suse10.2_i386_linux

When you installl OpenSuSE 10.2 over the network, the installer will ask you if CD 1 (?) is in the CD drive. As gthe purpose of our PXE server is not to use any CDs, select Back. As installation method, select HTTP and enter ftp.uni-ulm.de as the host, /pub/mirrors/opensuse/distribution/10.2/repo/oss as the directory. Of course, you can use any other OpenSuSE mirror as well; use one that is close to you.

 

13 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Leopoldo (not registered) on Sat, 2013-03-09 22:38.
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.
Submitted by Anonymous (not registered) on Fri, 2010-10-01 05:44.
can it possible to do unattend unstallation for windows operating system(xp,vista, win7) using same ubuntu PXE server
Submitted by Anonymous (not registered) on Fri, 2010-04-09 17: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.

  
 

Submitted by IggiFlynn (registered user) on Fri, 2008-04-18 23:00.

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.

Submitted by banksps (registered user) on Thu, 2007-09-06 13:06.

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/

 

Submitted by Spudchat (registered user) on Wed, 2006-12-20 22:18.
Thanks a lot for this howto. It worked perfectly for me and I never even knew that something like this could be done!
Submitted by underspell (registered user) on Wed, 2006-12-20 17:37.

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.

Submitted by tmib (registered user) on Tue, 2006-12-19 14:49.

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.

Submitted by marco (not registered) on Thu, 2010-08-19 10:04.

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