I’ve just want to share what I did last nite, after some attempts finally I could remote install the FreeBSD server. The location of server in other city, I just ask my friend who belong with server to plug the LAN connection to one of port Mikrotik RB750. Just for information, we need to setup DHCP server on RB750 which use interface where the server connect to.
Okay,let’s begin to remote install. For the first time we need bootable image ISO file that burn already into CD and insert in to cdrom in server and boot through the CD. The bootable image ISO contains a set of scripts that generates a bootable image (and/or ISO file), that creates a working minimal installation of FreeBSD. It is completely loaded into memory.
Remote the server which already loaded with mfsBSD bootable image, than please follow the instruction below;
# gpart show
to showing the existing partition on HDD, if any partition inside HDD just delete the partition then destro the geometry of HDD.
# gpart delete -i 1 ad6
# gpart delete -i 2 ad6
# gpart delete -i 3 ad6
gpart delete command to delete partitionon HDD which stated by mfsBSD as ad6, so please edit the command depend on your HDD.
# gpart destroy ad6
after gpart delete completed, so ensure everything gone in HDD by destroying the geometry of HDD.
# mount_cd9660 /dev/acd0 /cdrom
Mount the CD to /cdrom before we install the freeBSD into HDD
# zfsinstall -d /dev/ad6 -t /cdrom/8.1-RELEASE-i386.tar.xz -s 4G -V 14
please edit /dev/ad6 depend to your current system. 4G is for swap file system,just adjust with your requirement. for AMD64 version using this command,
# zfsinstall -d /dev/ad0 -t /cdrom/8.1-RELEASE-amd64.tar.xz -s 1G -V 14
if anything goes well, so we got the message like below,
Creating ZFS pool tank on ad6p3 … done
Creating tank root partition: … done
Creating tank partitions: var tmp … done
Setting bootfs for tank to tank/root … done
NAME USED AVAIL REFER MOUNTPOINT
tank 164K 143G 18K none
tank/root 56K 143G 20K /mnt
tank/root/tmp 18K 143G 18K /mnt/tmp
tank/root/var 18K 143G 18K /mnt/var
Extracting FreeBSD distribution … done
Writing /boot/loader.conf… done
Writing /etc/fstab…Writing /etc/rc.conf… done
Copying /boot/zfs/zpool.cache … done
The system will boot from ZFS with clean install on next reboot
You may type “chroot /mnt” and make any adjustments you need.
For example, change the root password or edit/create /etc/rc.conf for
for system services.
now, start to configure the server to boot from HDD but before you reboot the server, we need do some configuration to ensure we could remote the server. So, before reboot the server please do some steps below;
# chroot /mnt
# passwd root
ensure you type the new password and the conformation of new password, if no, you could not login through remote to server
# ee /etc/ssh/sshd_config
edit the ssh configuration to allow us to remote the server by uncomment the conf and change no to yes
# PermissionRootLogin no ==> change with PermissonRootLogin yes
and then save the configuration file by ctrl+C and type exit
and now, we need to configure the networking of server, once again please edited the IP and networking interface
echo ‘defaultrouter=”192.168.3.1″‘ >> /etc/rc.conf
echo ‘gateway_enable=”YES” ‘ >> /etc/rc.conf
echo ‘hostname=”proxy.hotspot.com”‘ >> /etc/rc.conf
echo ‘ifconfig_fxp0=”inet 192.168.3.13 netmask 255.255.255.0″‘ >> /etc/rc.conf
echo ‘sshd_enable=”YES”‘ >> /etc/rc.conf
put name server to /etc/resolv.conf
echo ‘nameserver 192.168.3.1′ >> /etc/resolv.conf
Just double check the configuration and instruction above before you reboot the server. If you follow the instruction thoroughly, the server could boot from HDD and now ready to configure with your needs. The server has already ZFS support that just support after freeBSD 8.0 version and above.