How can I configure FreeBSD network installation in DRBL server ? |
Take FreeBSD 7.0 as an example, and here we assume the client IP address is 192.168.120.2:
1. Download FreeBSD 7.0 boot ISO:
wget ftp://ftp.twaren.net/BSD/FreeBSD/releases/i386/ISO-IMAGES/7.0/7.0-RELEASE-i386-bootonly.iso
2. mount -o loop 7.0-RELEASE-i386-bootonly.iso /mnt
3. mkdir /pxeroot/
4. cp -a /mnt/boot /pxeroot/
cp /mnt/boot/pxeboot /tftpboot/nbi_img/FreeBSD-7.0-pxeboot.0
(You must have the file end with .0, since this tells pxelinux that it is a PXE image)
Add the following in /pxeboot/boot/loader.conf:
---------
vfs.root.mountfrom="ufs:/dev/md0c"
---------
which means that the later booting process will use a ramdisk as root instead of NFS.
5. append the following in /tftpboot/nbi_img/pxelinux.cfg/default
---------
label FreeBSD 7.0 netinstall
# MENU DEFAULT
# MENU HIDE
MENU LABEL FreeBSD 7.0 netinstall
# MENU PASSWD
kernel FreeBSD-7.0-pxeboot.0
---------
6. Append one line by edit /etc/exports:
---------
/pxeroot/ 192.168.120.2(ro,sync,async,no_root_squash,subtree_check)
---------
then restart nfs service (Ex. /etc/init.d/nfs-kernel-server restart)
PS. If you want to assign different PXE root, you can set an option in dhcpd.conf like this:
option root-path "/freebsd7.0-pxeroot/";
Remember to modify /etc/exports and put the files in the corresponding dir.
Ref: http://www.hack.org/mc/freebsd-x60.html; http://www.fefe.de/netboot/how-to-netboot-installer.html
|
|