The new Freebsd 11 release announcement supposed to happen Wednesday, 05 October 2016 with pending security fixes (please wait for final release 11.0-RELEASE-p1 for production upgrade) while we have images ready on ftp and its packed with a lot of new features includes faster network, improvements to NUMA, devctl to request administrative changes to individual devices, new sendfile system call to enable asynchronous I / O operations. But in this article we will not concentrate on features. Instead, we will show how to install freebsd 11 and to upgrade from freebsd 10.3 version the quickest way. So lets start.
1) Downloading FreeBSD
First browse to Freebsd 11 download page where you can find iso images for USB drive, for burning to disk, to minimal network install. There is also a memstick.img available to be copied to a USB stick using dd command. And all that for various architectures, like PowerPC, SPARC, ARM, etc. We are off course going to use AMD64 which is for 64-bit Intel and AMD processors. Since I am installing it in KVM, I will get the DVD iso with following command
wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/11.0/FreeBSD-11.0-RELEASE-amd64-dvd1.iso
After the download finishes, your course of action depend on how you want to install the FreeBSD. You can burn the image to DVD, to the USB drive, or simply connect the ISO to VM, which I am going to do.
2) Booting the Installer
After you boot your PC or VM from the FreeBSD DVD/USB/ISO, you press one to start FreeBSD installer when yo get the first screen with FreeBSD logo.
3) Starting install process
Here we got the installer fully booted and ready for you to select install and kick of the install process. Installer is called bsdinstall, it replaced earlier sysinstall which was unmaintained for a long time.
4) Choosing the keyboard layout
Here you can pick any keyboard layout you like, I am going to stick with default English one.
5) Pick a hostname
I am going to keep it simple here, just linoxide. You can set the name with a dot instead.
6) Select optional components
Here we keep the default choices, I only added doc as documentation is always a good to have.
7) Picking where to install
We chose here entire disk as this is VM and there is no other operating systems or data to save. If you are dualbooting you might want to pick partition option and specify which one to use.
8) Picking a way to partition the disk
You can pick fur options here, Guided for UFS or ZFS, manual, and shell method where you use command line utilities. We are going to stick with first option.
9) Confirm erasure of the disk
It goes without saying that you should have backed up entire disk before starting. If by any chance you did not, now it is last chance to do it. Abort the installation, backup and start over with installation. If you have all backed up or you have nothing to back up, proceed by selecting yes.
10) Picking the partition table format
Since I use KVM wthout EFI, right choice is MBR. For older computers, MBR is also right choice, while for new ones GPT is used.
11) Check partitioning and mount points
Here you can see how new partition table is going to look. You click finish after you are satisfied. You can modify the size of partitions, as well as delete them, create new ones, and set mount points.
12) Commit changes to disk
The moment you select commit is when the actual disk changes are being made. It will start the installing after it writes the new partition scheme.
13) Start of installation process
This is where actual installation of files begins. The duration of the process will depend on the speed of your computer.
14) Finish of install process
For me it went pretty quickly. Few minutes and it was installed. VM has two cores assigned.
15) Setting the root password
After the copying of files is done, it will prompt you for root password. Enter it two times.
16) Choosing a NIC to configure
Here we should get the list of network interfaces that we can configure. There is only one interface here in VM.
17) Configure IPv4 for selected interface
It will ask you whether you want to use IPv4, select yes. It will then ask you about dhcp, we also select yes here but if you want static IP you might choose otherwise.
18) Whether to configure IPv6
In this case, I chose no. In case you need IPv6, you can select yes and it will present you with offer to automatically configure it. It is made just as easy as ipv4 so you wont have any problems in case you need new version of Internet protocol.
19) Configuring dns
Installer automatically found valid DNS server, so we only need to select ok. If you want different DNS server, you can type ipadress of the server in the field or search for it.
20) Selecting a region
In this menu, you need to select continent where you reside. It is Europe in my case
21) Selecting a country
For timezone to be selected we also need to select country. In my case that is Serbia.
22) Setting up time and date
If you plan to select ntp on next screen, you might want to skip this and you will get automatic sync from ntp server. Otherwise, you can set the time and date yourself.
23) Choosing services to start at boot time
This is a list of services that will start when FreeBSD is booted. If you are installing it on the laptop, you might want to choose powerd, but since I am using VM, it doesn't make sense to change defaults.
24) System hardening options
Here you ca chose additional security and hardening options. Default is ok.
25) Select to add user accounts
If you want to add non-root users, you need to select yes on this screen
26) Adding a user
Here I am adding myself as non-root user.
27) User adding summary
After you add the user, you will get summary of what you entered and question whether to add another user. Only one user is ok for start, so I chose no. You can add more if you need.
28) Last check and reboot
Here you can revisit any of configuration options, or simply exit installer. We will choose just that, exit installer, the first option. You need to remove media from the drive, so that next boot is from HDD.
29) First boot and update
Upon first boot, we login as root and do pkg update. The pkg is not installed so it will offer to install it. We off course do that as we will need it in the future.
30) Check Version
Command freebsd-version will give you the version of running system, if you picked the right iso, it should be 11.0-RELEASE.
How to Upgrade from FreeBSD 10.3
If you already have the FreeBSD 10.3 install in place, you might want to do upgrade instead clean install. It is done with freebsd-update utility with following commands:
freebsd-update fetch
freebsd-update install
Next we need to do upgrade of the kernel to new version with following commands
freebsd-update upgrade -r 11.0-RELEASE
freebsd-update install
After this, computer must be rebooted to start new kernel:
reboot
After reboot, we have new kernel and old userland, so we need to run the update again
freebsd-update install
After it finishes, the prompt will most likely say that you need to rebuild 3rd party packages and run the update again to remove old unused dependencies. So after dealing with 3rd party programs, lets run the command for the last time
freebsd-update install
Finally, reboot to version 11 of FreeBSD
reboot
After reboot, type freebsd-version, and it should give you output 11.0-RELEASE.
Also enjoy our video on installing freebsd 11 with Mate desktop version 1.12.1.
Conclusion
We have covered how to install fresh FreeBSD 11.0 as well how to update it from 10.3. Upgrading instruction should also work for older versions of FreeBSD. Just be sure to check all release notes between your version and version you are upgrading to. The upgrade utility will ask you during upgrade to confirm if there are inconsistencies between new and old release, and reading the release notes will help you understand those questions and chose answer which will preserve your settings. Default choice will work, but might delete some of your old settings. That is all for now, stay tuned, there will be more FreeBSD articles.
The post How to Install Freebsd 11 Unix Server and Its Time to Upgrade appeared first on LinOxide.