Sunday, July 17, 2011

Setting up a PXE boot environment for openSUSE

In a previous post, I discussed how to install a linux distribution via PXE boot. Part of the requirement for performing a PXE boot is the PXE boot package which contains the files of the boot environment needed to kickstart the boot and installation process. In openSUSE, such a package is not provided. However, it is not difficult to create the PXE boot environment.

Create a directory called netboot.

Download the latest syslinux package. Untar it, and search for the file pxelinux.0 and copy it to the netboot directory.

Change directory to the netboot directory and run the following commands.
% wget http://download.opensuse.org/factory/repo/oss/boot/i386/loader/linux
% wget http://download.opensuse.org/factory/repo/oss/boot/i386/loader/initrd
% wget -O initrd64 http://download.opensuse.org/factory/repo/oss/boot/x86_64/loader/initrd
% wget -O linux64 http://download.opensuse.org/factory/repo/oss/boot/x86_64/loader/linux
Create a file called netboot/pxelinux.cfg/default containing the following lines.
default install
prompt   1
timeout  30
  
# Install i386 Linux
label install
  kernel linux
  append initrd=initrd splash=silent vga=0x314 showopts install=http://download.opensuse.org/factory/repo/oss/

# Install x86_64 Linux
label install64
  kernel linux64
  append initrd=initrd64 splash=silent vga=0x314 showopts install=http://download.opensuse.org/factory/repo/oss/ 
Congratulations, you have set up a PXE boot environment for installing openSUSE.

No comments: