Install FreeBSD remotely through PXE + NFS

Source: Internet
Author: User
Tags nfsd
To remotely install FB through PXE + NFS, you need A host A with TFTP + DHCP-Server + NFS installed. The NIC of host B must be started in PXE mode. 1. configure TFTP + DHCP-Server + NFS on host A: & nbsp; 1) configure TFTP: & nbsp; & nbsp; & n

To remotely install FB through PXE + NFS, you need A host A with TFTP + DHCP-Server + NFS installed. The NIC of host B must be started in PXE mode.

1. configure TFTP + DHCP-Server + NFS on host:

1) configure TFTP:

TFTP is installed in FB by default. you only need to enable it by enabling/etc/inetd. remove the comment before "# tftp dgram udp wait root/usr/libexec/tftpd-l-s/tftpboot" in conf; start inetd:/etc/rc manually. d/inetd start or add inetd_enable = YES to/etc/rc. conf to start automatically with FB.

2) configure NFS Server:

Manually start nfsd:/etc/rc. d/nfsd start or add nfsd_enable = YES to/etc/rc. conf to enable it automatically with FB.

Edit/etc/exports and add the file system that allows NFS output:/mnt-ro-alldirs

3) install and configure the ISC-DHCP Server:

The ISC-DHCP Server is installed in the/usr/ports/net mode.

Edit/usr/local/etc/dhcpd. conf and add the following content:

Default-lease-time 7200;

Max-lease-time 7200;

Ddns-update-style none;

Subnet 192.168.0.0 netmask 255.255.255.0 {// The Address pool must be in the same network segment as host A's address.

Range 192.168.0.2 192.168.0.254;

Server-identifier 192.168.0.1;

Next-server 192.168.0.1; // This address is the IP address of host.

Filename "/pxeboot"; // This is the pxeboot file under/tftpboot. This file is copied to the FB installation disc.

Option root-path "/mnt"; // This is the location where the loader and kernel are loaded in the root path of nfs, that is, the location containing the boot.

}

Start ISC-DHCP:/usr/local/etc/rc. d/isc-dhcpd start. Isc-dhcpd_enable = YES is added to/etc/rc. conf to enable automatically with FB.

4) pxeboot in the FB installation disc uses NFS by default to get the startup file, kernel and other files, so add option root-path "/mnt" in the ISC-DHCP Server ".

5) disable DNS resolution for host. Modify/etc/resolv. conf and comment out all rows starting with nameserver. Otherwise, mountd (because nfsd depends on this daemon, mountd will also be started with nfsd) will check the DNS, which may cause the final PXE to be unable to connect to nfs and cannot load the kernel.

 

6) copy the FB8.0 installation file to/usr/8.0-RELEASE-i386-disc1.iso and execute the following command:

Mdconfig-atvnode-f 8.0-RELEASE-i386-disc1.iso // ISO file connection to become a vnode type memory disk

Mount-t cd9660/dev/md0/mnt // mount the md node generated by the preceding command to/mnt

7) after the above configuration, host B can load loader and kernel through PXE. After loading the loader, select the first option of the loader startup option to enter the loader prompt. enter the following command:

Set vfs. root. mountfrom = "ufs:/dev/md0"

Boot

After the boot command is executed, the system loads and runs it to the installation interface.

8) in the installer, select nfs when selecting the installation media, and then enter the IP address of host A and the exported path, such as 192.168.0.1:/mnt. After confirmation, the system prompts you to set the NIC. the nic ip address must be in the same CIDR block as host A's IP address. The subsequent installation is consistent with that on the CD.

2. start host B and enter BIOS settings. select PXE as the preferred BOOT type. The



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.