Last active
May 5, 2016 01:45
-
-
Save ashevchuk/8e9d43277f30ffb993d5 to your computer and use it in GitHub Desktop.
FreeBDS installation process @cloudatcost VPS provider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For example, we need two VMs in the same network: | |
104.1.1.5 - debian linux | |
104.1.1.6 - host, where we want to install FreeBSD | |
00:50:66:be:70:c9 - ethernet address, where we installing FreeBSD | |
Network: | |
104.1.1.0 - our network | |
255.255.255.0 - our network mask | |
104.1.1.255 - our network broadcast address | |
104.1.1.1 - our network gateway | |
The first step to installing FreeBSD via netboot is to acquire FreeBSD. We'll be using the bootonly-iso, this can be fetched at your nearest ftp. | |
Download the bootonly-iso: | |
fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-bootonly.iso | |
Mount the iso-image and copy the contents to some location: | |
mount -o loop FreeBSD-10.1-RELEASE-amd64-bootonly.iso /mnt | |
mkdir /pxeboot | |
cp -R /mnt/ /pxeboot | |
umount /mnt | |
Configure nfs root: | |
echo '104.1.1.5:/tftpboot / nfs ro 0 0' >> /pxeboot/etc/fstab | |
and dns: | |
echo 'nameserver 8.8.8.8' >> /pxeboot/etc/resolv.conf | |
Install dhcp and tftp servers at your cloudatcost server like described in this manual: https://www.debian.org/releases/stable/i386/ch04s05.html.en | |
Install nfs-kernel-server and portmap packages at your cloudatcost server. | |
Make /tftpboot available via nfs: | |
echo "/tftpboot 10.1.1.0/255.255.255.0(r0,no_root_squash,subtree_check)" >> /etc/exports | |
Write your own /etc/dhcpd/dhcpd.conf: | |
=== | |
option domain-name "example.net"; | |
option domain-name-servers 8.8.8.8; | |
option subnet-mask 255.255.255.0; | |
default-lease-time 1440; | |
max-lease-time 7200; | |
ddns-update-style none; | |
server-name "bootp.example.net"; | |
server-identifier 104.1.1.5; | |
next-server 104.1.1.5; | |
allow booting; | |
allow bootp; | |
subnet 104.1.1.0 netmask 255.255.255.0 { | |
option broadcast-address 104.1.1.255; | |
option routers 104.1.1.1; | |
pool { | |
range 104.1.1.6; | |
deny unknown-clients; | |
} | |
} | |
host freebsdhost { | |
filename "/tftpboot/boot/pxeboot"; | |
server-name "freebsd.example.net"; | |
next-server 104.1.1.5; | |
option root-path "/tftpboot"; | |
hardware ethernet 00:50:66:be:70:c9; | |
fixed-address 104.1.1.6; | |
} | |
=== | |
and /etc/default/tftpd-hpa: | |
=== | |
TFTP_USERNAME="tftp" | |
TFTP_DIRECTORY="/tftpboot" | |
TFTP_ADDRESS="0.0.0.0:69" | |
=== | |
Restart nfs, dhcp and tftp servers. | |
Open the Console from your panel and restart the destination host, sending Ctrl+Alt+Del by the button in the console window or by the reboot command in the command line. While boot process, press F12 key, then select Network boot. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment