How To Add Ubuntu 15.10 and Debian 8 To PXE Network Boot in CentOS 7

How To Add Ubuntu 15.10 and Debian 8 to PXE Network Boot in CentOS 7

In this article, we will learn how to add Ubuntu 15.10 and Debian 8 to PXE Network Boot on CentOS 7 and it requires a client and server machine to complete this process.

Step 1: To Add Ubuntu 15.10 to PXE Menu

To Download Ubuntu 15.10 ISO Image

Go to the Ubuntu 15.10 Download page, here we are downloading 64-bit ISO Image, copy it to a pendrive, and then mount it on your system by running the following command.

[root@linuxhelp ~]# mount /dev/sdb1  /mnt
[root@linuxhelp ~]# fdisk &ndash l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x2f23e80f

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 25561 204800000 83 Linux
/dev/sda3 25561 26581 8192000 82 Linux swap / Solaris

Disk /dev/sdb: 15.6 GB, 15552479232 bytes
255 heads, 63 sectors/track, 1890 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1b54e590

Device Boot Start End Blocks Id System
/dev/sdb1 1 1891 15187952 c W95 FAT32 (LBA


To Download Ubuntu 15.10 Netboot Image

Use the following command to download Ubuntu Netboot Images on to PXE Server.


For Ubuntu 15.10

------------------ On 32-Bit ------------------
# wget http://archive.ubuntu.com/ubuntu/dists/wily/main/installer-i386/current/images/netboot/netboot.tar.gz

------------------ On 64-Bit ------------------
# wget http://archive.ubuntu.com/ubuntu/dists/wily/main/installer-amd64/current/images/netboot/netboot.tar.gz


Go to the Ubuntu 15.10 Netboot Official page, download the required files and copy to PXE tftp server location.
Extract the downloaded package using ' tar' command and copy it to ' /var/lib/tftpboot/' .

[root@linuxhelp ~]# tar xfz netboot.tar.gz
[root@linuxhelp ~]# cp -rf /mnt/install/netboot/ubuntu-installer/ /var/lib/tftpboot/


Check for the final resultant path. The following structure should be achieved.

/var/lib/tftpboot/ubuntu-installer/amd64
/var/lib/tftpboot/ubuntu-installer/i386 


Copy the OS files from the pendrive to ' /var/lib/tftpboot/ubuntu-installer/amd64'

[root@linuxhelp ~]# cp -rf /mnt/* /var/lib/tftpboot/ubuntu-installer/amd64 


Open PXE default configuration file, in the text editor.

[root@linuxhelp ~]# nano /var/lib/tftpboot/pxelinux.cfg/default


To PXE Menu, add the following configuration.

On Ubuntu 15.10 64-bit
label 4
menu label ^4) Install Ubuntu 15.10 x64
kernel ubuntu-installer/amd64/linux
append vga=788 initrd=ubuntu-installer/amd64/initrd.gz -- quiet

label 5
menu label ^5) Ubuntu 15.10 Rescue Mode
kernel ubuntu-installer/amd64/linux
append vga=788 initrd=ubuntu-installer/amd64/initrd.gz rescue/enable=true -- quiet


Important: Change the architecture ' ubuntu-installer/< arch _name> /< directory_name> ' , according to your system configuration.
Now lets start with the client PXE installations, after configuring PXE menu file and unmount the pendrive.


[root@linuxhelp ~]# umount /mnt


Select the Install Ubuntu 15.10 x64

Follow the instruction to Install Ubuntu.

In the PXE Boot Menu, Select the install Ubuntu 15.10 Rescue mode.

In Rescue Mode, Select Execute a shell.

Press continue to complete the installation procedure.

To proceed with the Ubuntu installation, use the following link
www.linuxhelp.com/install-ubuntu-15-10-snapshots-2/

Step 2: To Add Debian 8 Jessie to PXE Menu

Visit the official Debian Netinstall Download page and download the netboot.tar.gz archive.
Debian supports multiple system architecture for Netboot installation sources and the procedure is same for all the architectures except for the debian-installer/$directory_architecture name.
Add the Debian 8, 64-bit Netboot archive by loging into PXE Server with the root account and run the following command.

# wget  http://ftp.nl.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/netboot.tar.gz


Execute the following command to extract and copy the debian-installer directory to tftp server path.

[root@linuxhelp ~]# tar xfz netboot.tar.gz
[root@linuxhelp ~]# cp -rf debian-installer/ /var/lib/tftpboot/


Copy the OS files from pendrive to the ' /var/lib/tftpboot/debian-installer/amd64' location

[root@linuxhelp ~]# cp -rf /mnt/* /var/lib/tftpboot/debian-installer/amd64


Open Pxe server configuration file, using nano editor

[root@linuxhelp ~]# nano /var/lib/tftpboot/pxelinux.cfg/default


Add the following PXE Label Menu for Debian Wheezy 64-bit:

label 6

menu label ^6) Install Debian 7 x64
kernel debian-installer/amd64/linux
append vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet

label 7

menu label ^7) Install Debian 7 x64 Automated
kernel debian-installer/amd64/linux
append auto=true priority=critical vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet


Important: Change the architecture ' debian-installer/< arch _name> /< directory_name> ' , according to your system configuration to add other debian architectures.

Use the following commands to clean up Debian resources.

[root@linuxhelp ~] # cd & &  rm -rf debian-installer/  netboot.tar.gz  pxelinux.*  version.info


Boot the client machine and proceed the installation procedure from PXE menu.

Follow the instruction to install Debian 8.

To proceed with the Debian installation visit,
https://www.linuxhelp.com/how-to-install-debian-8-3/

Tag : debian PXE
Comment
karimserrieyh
Apr 10 2017
nice tutorial, very clear. I hope you do tutorial for UBCD or Acronis. Keep it up.
Add a comment
FAQ
Q
What is the installation procedure for Debian 8?
A
Do check "https://www.linuxhelp.com/how-to-install-debian-8-3/" for the installation of Debian 8
Q
What is the exact syntax for adding Os to PXE boot Menu?
A
The syntax for adding them are, say for Ubuntu "' ubuntu-installer/< arch _name> /< directory_name> '" likewise you can assign the settings accordingly.
Q
How PXE Boot Works?
A
PXE Boot describes a standardized client-server environment which boots a software assembly, retrieved from a network of PXE-enabled clients
Q
What bootable media you have used for booting iso of Centos/Debian before proceeding with PXE?
A
"PowerISO" used here for that purpose, you can also try "Rufus" for booting iso images of OS.
Q
Since I am new to Linux please let me know can I be able to install Ubuntu directly or only with PXE
A
You can also install Ubuntu directly with standard procedures.