Add the PXE network startup environment from Ubuntu/Debian to RHEL/CentOS 7
This tutorial will guide you to add the Ubuntu 14.10 Server, Ubuntu 14.04 Server, and Debian 7 Wheezy release to the PXE network startup environment of RHEL/CentOS 7.
Add Ubuntu and Debian to PXE Network
Although in this tutorial, I will only demonstrate how to add a 64-bit network installation image, but for Ubuntu or Debian 32-bit systems, or images of other architectures, the operation steps are basically the same. At the same time, for me, I will explain how to add a Ubuntu 32-bit source, but will not demonstrate the configuration.
Installing Ubuntu or Debian from the PXE Server requires that your client must activate network connections. It is best to use DHCP to dynamically allocate addresses through NAT. So that the installer can pull the required package and complete the installation process.
Pre-reading
- Install the PXE network startup server for multiple Linux distributions in RHEL/CentOS 7
- Use Kickstart to implement unattended RHEL6.0 system installation
- SUSE Linux 11 pxe + DHCP + tftp + ftp Unattended Installation
- Use PXE to enable self-built dhcp tftp service for unattended CentOS6 Installation
- Use PXE + DHCP + Apache + Kickstart to install CentOS5.8 x86_64
- Kickstart fully automated installation of CentOS 6.3
- Linux Installation notes on Kickstart
- PXE/Kickstart remote automatic installation of RedHat Linux
Step 1: add the Ubuntu 14.10 and Ubuntu 14.04 servers to the PXE menu
1. you can add a network installation source for Ubuntu 14.10 and Ubuntu 14.04 to the PXE menu in two ways: one is to download the Ubuntu cd iso image and mount it to the PXE Server machine, in this way, you can read the Ubuntu network Startup File. The second is to directly download the Ubuntu network startup archive package and decompress it to the system. Below, I will further discuss these two methods:
Use Ubuntu 14.10 and Ubuntu 14.04 cd iso Images
In order to use this method, your PXE Server needs a working CD/DVD drive (LCTT Note: No need, refer to the following content ). On a dedicated computer, go to the Ubuntu 14.10 download and Ubuntu 14.04 download pages, get the 64-bit Server Installation image, and burn it to CD, and put the CD image to the PXE Server DVD/CD drive, and then mount it to the system using the following command.
- # Mount/dev/cdrom/mnt
If your PXE Server does not have a CD/DVD drive, you can use the wget command to download the ISO images of Ubuntu 14.10 and Ubuntu 14.04 to a local device, and then run the following command (download and mount the CD) mount to the same location on the server.
On Ubuntu 14.10
- ------------------ 32-bit ------------------
-
- # Wget http://releases.ubuntu.com/14.10/ubuntu-14.10-server-i386.iso
- # Mount-o loop/path/to/ubuntu-14.10-server-i386.iso/mnt
- ------------------ 64-bit ------------------
-
- # Wget http://releases.ubuntu.com/14.10/ubuntu-14.10-server-amd64.iso
- # Mount-o loop/path/to/ubuntu-14.10-server-amd64.iso/mnt
On Ubuntu 14.04
- ------------------ 32-bit ------------------
-
- # Wget http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-i386.iso
- # Mount-o loop/path/to/ubuntu-14.04.1-server-i386.iso/mnt
- ------------------ 64-bit ------------------
-
- # Wget http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso
- # Mount-o loop/path/to/ubuntu-14.04.1-server-amd64.iso/mnt
Use Ubuntu 14.10 and Ubuntu 14.04 to start the image
For this method, use the following command to download the Ubuntu network boot image to the PXE Server.
On Ubuntu 14.04
- ------------------ 32-bit ------------------
-
- # Cd
- # Wget http://archive.ubuntu.com/ubuntu/dists/utopic/main/installer-i386/current/images/netboot/netboot.tar.gz
- ------------------ 64-bit ------------------
-
- # Cd
- # Http://archive.ubuntu.com/ubuntu/dists/utopic/main/installer-amd64/current/images/netboot/netboot.tar.gz
On Ubuntu 14.04
- ------------------ 32-bit ------------------
-
- # Cd
- # Wget http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/netboot.tar.gz
- ------------------ 64-bit ------------------
-
- # Cd
- # Wget http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64/current/images/netboot/netboot.tar.gz
For other processor architectures, visit the following Ubuntu 14.10 and Ubuntu 14.04 network startup official pages, select your architecture type and download the required files.
- Http://cdimage.ubuntu.com/netboot/14.10/
- Http://cdimage.ubuntu.com/netboot/14.04/
2. After downloading the ISO image or starting the installer archive package, run the following command to copy the entire ubuntu-installer folder to the PXE tftp server.
A) for two cd iso images (32-bit or 64-bit), use the following command after attaching the CD of A specific architecture to the PXE Server/mnt system path.
- # Cp-fr/mnt/install/netboot/ubuntu-installer // var/lib/tftpboot/
B) for network startup archiving, run the following command according to the specific Ubuntu architecture.
- # Cd
- # Tar xfz netboot.tar.gz
- # Cp-rf ubuntu-installer // var/lib/tftpboot/
If you want to use two Ubuntu server architectures on the PXE Server at the same time, download them first, and then mount or decompress the 32-bit architecture according to different situations, copy the ubuntu-installer directory to/var/lib/tftpboot, and then unmount the CD or delete the files and folders that start the archiving and decompress on the network. For a 64-bit architecture, repeat the above steps to make the final tftp path form the following structure.
- /Var/lib/tftpboot/ubuntu-installer/amd64
- /Var/lib/tftpboot/ubuntu-installer/i386
3. In the next step, run the following command to add the Ubuntu 14.10 and Ubuntu 14.04 menu labels to the default configuration file of the PXE Server.
Important: I cannot demonstrate operations on two Ubuntu versions at the same time. for demonstration purposes, I added the Ubuntu 14.04 menu label to the PXE Server. The following operations can also be applied to Ubuntu 14.10, you only need to slightly modify the version number. You only need to modify the version number and the path to the OS architecture based on your Ubuntu version.
With the help of your favorite text editor, open the default PXE configuration file, and I prefer the nano editor.
- # Nano/var/lib/tftpboot/pxelinux. cfg/default
Next, add the following configuration to the PXE menu.
For Ubuntu 14.04 32-bit
- Label 1
- Menu label ^ 1) InstallUbuntu14.04 x32
- Kernel ubuntu-installer/i386/linux
- Append vga = 788 initrd = ubuntu-installer/i386/initrd.gz -- quiet
-
- Label 2
- Menu label ^ 2) Ubuntu14.04RescueMode x32
- Kernel ubuntu-installer/i386/linux
- Append vga = 788 initrd = ubuntu-installer/i386/initrd.gz rescue/enable = true -- quiet
For Ubuntu 14.04 64-bit
- Label 5
- Menu label ^ 5) InstallUbuntu14.04 x64
- Kernel ubuntu-installer/amd64/linux
- Append vga = 788 initrd = ubuntu-installer/amd64/initrd.gz -- quiet
-
- Label 5
- Menu label ^ 6) Ubuntu14.04RescueMode
- Kernel ubuntu-installer/amd64/linux
- Append vga = 788 initrd = ubuntu-installer/amd64/initrd.gz rescue/enable = true -- quiet
Add Ubuntu to PXE to start
Note: If you want to include other Ubuntu architectures, follow the same steps above and replace the label numbers and ubuntu-installer/$ ubunture_name/directory in the PXE default menu configuration file accordingly.
4. After the PXE menu configuration file is configured, clear the source file according to the method used, and continue to install the client PXE to test whether the configuration is correct.
- -------------------- Method for CD/DVD ----------------------
-
- # Umount/mnt
- -------------------- Network startup method ----------------------
-
- # Cd & rm-rf ubuntu-installer/netboot.tar.gz pxelinux. * version.info
The following is the installation and testing of the Ubuntu 14.04PXE client.
Select Ubuntu from the PXE menu
Select Ubuntu installation Language
Select Ubuntu rescue mode
Ubuntu rescue mode Shell
For more details, please continue to read the highlights on the next page: