Install Debian 7 (Wheezy) over the network)
This tutorial guides you to directly use DNSMASQ as the PXE Server (pre-start execution environment) and install Debian 7 (Wheezy) on the network ), in this case, assume that your server does not provide any CD/DVD/USB media drive, or that it can only be operated through the connected monitor, keyboard, and mouse.
Debian 7 network installation on the client
DNSMASQ is a lightweight network infrastructure server that provides key services such as DNS, DHCP, and network startup through built-in DNS, DHCP, and TFTP servers.
Once the PXE Server starts and runs, you can instruct all your clients to start directly from the network, provided that your client must have a network card that supports Network startup, network startup can be enabled from the BIOS network startup or startup service options.
Use the systemd Management System On Debian
Install Mate 1.8 In CentOS 7/Debian Jessie/Debian Wheezy
Upgrade glibc to 7.6 In Debian 2.15
How do users of Debian 7 and Debian 8 install Oracle Java 8?
Use CentOS 6.5 to create a Docker image for Debian 7 Wheezy
Debian 7.0 Wheezy test experience
Install Debian 7.0 Wheezy on a USB flash drive
Pre-reading
- Debian 7 (Wheezy) Installation Guide
Step 1: install and configure the DNSMASQ Server
1. First, after installing the Debian server, make sure that your system uses a static IP address. In addition to starting the network, you must also provide the DHCP service for your entire network segment. After the static IP address is set, run the following command with the root account or user with the root power to install the DNSMASQ server.
- # Apt-get install dnsmasq
Install the Dnsmasq package
2. After the DNSMASQ package is installed, You can edit the configuration file. First, create a backup of the master configuration file, and then use the following command to edit the dnsmasq. conf file.
- # Mv/etc/dnsmasq. conf/etc/dnsmasq. conf. backup
- # Nano/etc/dnsmasq. conf
Back up Dnsmasq Configuration
3. The above backup process is suitable for renaming the configuration file, so the new file should be empty. You can use the DNSMASQ configuration file section described below.
- Interface = eth0
- Domain = debian. lan
- Dhcp-range = 192.168.1.3, 192.168.1.253, 255.255.255.0, 1 h
- Dhcp-boot = pxelinux.0, pxeserver, 192.168.1.100
- Pxe-prompt = "Press F8 for menu.", 60
- # Pxe-service types: x86PC, PC98, IA64_EFI, Alpha, Arc_x86, Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
- Pxe-service = x86PC, "Install Debian 7 Linux from network server 192.168.1.100", pxelinux
- Enable-tftp
- Tftp-root =/srv/tftp
Dnsmasq Configuration
- Interface-the network interface that the server listens.
- Domain-replace it with your own domain name.
- Dhcp-range-Use your own network mask to define the network IP address range.
- Dhcp-boot-retain the default value, but replace the IP address statement with your own server IP address.
- Pxe-prompt-keep default-Wait 60 seconds when you press F8 to enter the menu.
- Pxe = service-use x86PC as the 32-bit/64-bit architecture, and enter the menu description prompt of the quotation mark string. Other values may be PC98 or IA64.EFI, Alpha, ArcX86, IntelLeanClient, IA32EFI, BCEFI, XscaleEFI and X86-64EFI.
- Enable-tftp-enable the built-in TFTP server.
- Tftp-root-use/srv/tftp as the storage location of the Debian network Startup File.
Step 2: Download the Debian network Startup File and open the Firewall Connection
4. Now, download the Debian network Startup File. First, modify the path of your current working directory to the location of the TFTP root directory, which is defined by the final configuration Statement (/srv/tftp system path ).
Go to the official page image of the network startup section of Debian network installation and capture the following files. The files to be crawled depend on the system architecture you want to install on the client.
Download the netboot.tar.gz file and extract the file for archiving (the process description is only applicable to 64-bit files, but also for other system architectures ).
- # Cd/srv/tftp/
- # Wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz
- # Tar xfz netboot.tar.gz
- # Wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/SHA256SUMS
- # Wget http://ftp.nl.debian.org/debian/dists/wheezy/Release
- # Wget http://ftp.nl.debian.org/debian/dists/wheezy/Release.gpg
At the same time, make sure that all files in the TFTP directory can be read by the TFTP server.
- # Chmod-R 755/srv/tftp/
Download the Debian network Startup File
Use the following variables to install the image and architecture on the Debian network.
- # Wget http: // "$ YOURMIRROR"/debian/dists/wheezy/main/installer-"$ ARCH"/current/images/netboot/netboot.tar.gz
- # Wget http: // "$ YOURMIRROR"/debian/dists/wheezy/main/installer-"$ ARCH"/current/images/SHA256SUMS
- # Wget http: // "$ YOURMIRROR"/debian/dists/wheezy/Release
- # Wget http: // "$ YOURMIRROR"/debian/dists/wheezy/Release. gpg
5. Next, start or restart the DNSMASQ daemon and run the netstat command to obtain the list of ports listened to by the server.
- # Service dnsmasq restart
- # Netstat-tulpn | grep dnsmasq
Start the Dnsmasq Service
6. Debian-based releases usually come with UFW firewall packages. Run the following command to open the desired DNSMASQ port: 67 (Bootps), 69 (TFTP), 53 (DNS) 4011 (proxy DHCP) udp and 53 tcp (DNS ).
- # Ufw allow 69/udp
- # Ufw allow 4011/udp # Only if you have a ProxyDHCP on the network
- # Ufw allow 67/udp
- # Ufw allow 53/tcp
- # Ufw allow 53/udp
Enable Dnsmasq Port
Now, the PXE loader on your client network interface will load the pxelinux configuration file from the/srv/tftp/pxelinux. cfg directory in the following order.
- GUID File
- MAC files
- Default file
For more details, please continue to read the highlights on the next page: