Fai install Debian

Source: Internet
Author: User

It took two days for such a simple thing to encounter many pitfalls. First, let's talk about what needs to be installed. My network is two NICs (virtual machines), one of which can be connected to the Internet and the NAT network segment of VMware. Another is the 192.168.231.0/24 CIDR block. The CIDR block does not need to be connected to the Internet. It belongs to an internal network. In this experiment, machines with new operating systems need to be installed in this CIDR block.

Dhcp Service
apt-get install isc-dhcp-server

After the installation is complete, modify/etc/DHCP/DHCPD. conf (I also modified/etc/hosts to add the corresponding IP address 192.168.231.2 FOR THE faiserver, that is, the IP address of the machine in the second network segment)

subnet 192.168.231.0 netmask 255.255.255.0 {   range 192.168.231.211  192.168.231.230;   option domain-name-servers 223.5.5.5;   option routers faiserver;   option time-servers faiserver;   option ntp-servers faiserver;   server-name faiserver;   next-server faiserver; filename "fai/pxelinux.0";}

The Network has encountered many pitfalls.

Because there are two NICs, one of which is set to obtain IP addresses for DHCP (that is, eth0, which can be connected to the NAT network segment, and eth1 is static ), as a result, the IP address of the eth1 NIC will change to 192.168.231.212, because eth0 sends a DHCP request. Then, the IP address of the eth1 Nic is allocated. (This does not seem to be the reason. Later, I couldn't stand it. I uninstalled ISC-DHCP-client)

Another reason is that eth0 was originally connected to the VMware bridge mode, but the wireless Nic of the physical machine does not seem to be able to implement this function. It has been a long time, this function can be implemented with a wired NIC (why? Because at that time the machine will be thrown into the real physical environment for actual use, with bridging, I can use this virtual machine server for automatic deployment)

The final network configuration is:

auto eth0#iface eth0 inet dhcpiface eth0 inet static        address 192.168.232.129        netmask 255.255.255.0        gateway 192.168.232.2auto eth1iface eth1 inet static        address 192.168.231.2        netmask 255.255.255.0
TFTP service
apt-get install tftpd-hpa

Modify the configuration file/etc/default/tftpd-HPA

# /etc/default/tftpd-hpaTFTP_USERNAME="tftp"TFTP_DIRECTORY="/srv/tftp"TFTP_ADDRESS="0.0.0.0:69"TFTP_OPTIONS="--secure"
Fai Service

Forget it. It seems that NFS-commom and NFS-kernel-server will be installed together in this process. (if not, you can install them yourself)

apt-get intall fai-quickstart

After FAI is installed, we need to modify the configuration/etc/fai/Fai. conf.

LOGUSER=faiFAI_CONFIG_SRC=nfs://192.168.231.2/srv/fai/config

Modify nfsroot. conf

#FAI_DEBOOTSTRAP="wheezy http://mirrors.163.com/debian/"FAI_DEBOOTSTRAP="wheezy http://mirrors.zju.edu.cn/debian/"FAI_ROOTPW=‘$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1‘NFSROOT_ETC_HOSTS="192.168.231.2"NFSROOT=/srv/fai/nfsrootTFTPROOT=/srv/tftp/faiNFSROOT_HOOKS=/etc/fai/nfsroot-hooks/FAI_DEBOOTSTRAP_OPTS="--arch amd64 --exclude=dhcp-client,info"# Configuration spaceFAI_CONFIGDIR=/srv/fai/config

Modify/etc/fai/APT/sources. List to add the source you need. I directly CP/etc/APT/sources. List

Run Fai-setup-V to create basic content such as nfsroot and faiconfig.

Run Fai-chboot-IBV-u NFS: // 192.168.231.2/srv/fai/config default. The-u parameter is unnecessary and can be obtained from Fai. CONF file, but it seems to have failed. Add it forcibly. In/srv/TFTP/fai/pxelinux. cfg, the default content is

default fai-generatedlabel fai-generatedkernel vmlinuz-3.2.0-4-amd64append initrd=initrd.img-3.2.0-4-amd64 ip=dhcp  root=/dev/nfs nfsroot=/srv/fai/nfsroot aufs  FAI_FLAGS=verbose,sshd,reboot FAI_CONFIG_SRC=nfs://192.168.231.2/srv/fai/config FAI_ACTION=install

The final NFS configuration will be changed to the following, directory:/etc/exports

/srv/nfs4       134.95.9.128/25(fsid=0,ro,no_subtree_check)/srv/fai/config 10.10.82.121/24(async,ro,no_subtree_check)/srv/fai/nfsroot 10.10.82.121/24(async,ro,no_subtree_check,no_root_squash)

If the first configuration does not exist, add it! There is a huge pitfall here, look at the connection

Https://bugs.debian.org/cgi-bin/bugreport.cgi? Bug = 676883 #10

Fai install Debian

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.