FreeBSD Desktop – Part 2.1 – Install FreeBSD 12

This article is an update/rewrite to the already published FreeBSD Desktop – Part 2 – Install. With the upcoming introduction of the FreeBSD 12.0-RELESE version new possibilities arise when it comes to installation. I already talked/showed that method in my ZFS Boot Environments Reloaded at NLUUG presentation but to make it more available and obvious part of my FreeBSD Desktop series I write about it again in dedicated article entry.

You may also check earlier/other articles of the FreeBSD Desktop series:

Now (in FreeBSD 12.x) it is possible to install FreeBSD on GELI encrypted root on ZFS pool without any additional partitions or filesystems. No longer separate UFS or ZFS boot pool /boot filesystem is needed. And what is even more appealing such setup is supported both on UEFI and BIOS (also refereed as Legacy or CSM) systems. Such setup is also compatible with both new bectl(8) utility and the old proven beadm(8) tool. It is also nice that to make such setup you only need to choose the Auto ZFS option from the bsdinstall(8) so you will not have to do it by hand. I advice using GPT (BIOS+UEFI) as it will support both system types so when you are running BIOS system now and will move the disk to other system that boots with UEFI it will also just work out of the box.

The FreeBSD 12.0 is currently at the RC1 stage so we will use that one for below examples of such setup. The 12.0-RELEASE is expected to arise before Christmas if no significant problems or bugs will be found on the road to RC2 and RC3 editions.

For the record here is the FreeBSD 12.0-RC1 Availability information page and aggregated FreeBSD 12.0-RELEASE Release Notes for the upcoming new major FreeBSD version, but it is not yet complete/ready.

I will only show one install process that will work for both UEFI and BIOS systems – the crucial option here is GPT (BIOS+UEFI) to select (which is also the default one). The other option that You need to select is Yes for the Encryption part and also select the SWAP size. You may as well do not use swap and enter ‘0‘ here which means that SWAP partition will not be created. You may as well create ZFS ZVOL partition for SWAP on ZFS pool later or just create a file like /SWAP and enable it as SWAP. No matter which SWAP option you will choose if your system swaps then you are too low on memory and neither of these methods are better or worse then.

freebsd-install-01.png

freebsd-install-02.png

freebsd-install-03.png

One last thing about the default FreeBSD (no matter if 11.x or 12.x) ZFS dataset/filesystem layout. I showed it on my ZFS Boot Environments/ZFS Boot Environments Reloaded presentations but without any text comment as I talked it live.

By default both /var and /usr filesystems are part of the Boot Environment. They are protected and snapshoted during the beadm create newbe process (or by bectl(8) also). Its appears that /var and /usr are separate processes when you type zfs list commend as shown on the slide below.

zroot-layout-01.png

… but when you check the canmount parameter for all ZFS datasets, then it become obvious that /usr and /var are ’empty’ datasets (not mounted).

zroot-layout-02.png

… and also confirmation from theΒ df(1) tool.

zroot-layout-03.png

I asked FreeBSD Developers what is the reason for such construct and its for the mountpoint inheritance purposes. For example when zroot/usr has mountpoint set to /usr then when you create zroot/usr/local dataset, then it will automatically get the /usr/local for the mountpoint parameter by inheritance. At the first sight it may be misleading (I also got caught) but it makes sense when you think about it.

The only filesystems that are NOT included for the Boot Environment protection are these:

  • /usr/home
  • /usr/ports
  • /usr/src
  • /var/audit
  • /var/crash
  • /var/log
  • /var/mail
  • /var/tmp

While in most cases it is not needed to protect these in the Boot Environment protection if you want to also protect these type these two comments to move all the /usr/* and /var/* datasets/filesystems into the Boot Environment pool/ROOT/dataset. It will work on a running system without need for reboot, just make sure you use -u flag.

# zfs rename -u zroot/usr zroot/ROOT/default/usr
# zfs rename -u zroot/var zroot/ROOT/default/var

Now grab that FreeBSD ISO and install it the best possible way up to date πŸ™‚

You will probably want to get amd64 version which is suitable for both 64-bit AMD and Intel systems.

EOF

Β 

Advertisements

14 thoughts on “FreeBSD Desktop – Part 2.1 – Install FreeBSD 12

  1. Pingback: FreeBSD Desktop – Part 1 – Simplified Boot | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  2. Pingback: FreeBSD Desktop – Part 2 – Install | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  3. Pingback: FreeBSD Desktop – Part 3 – X11 Window System | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  4. Pingback: FreeBSD Desktop – Part 4 – Key Components – Window Manager | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  5. Pingback: FreeBSD Desktop – Part 5 – Key Components – Status Bar | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  6. Pingback: FreeBSD Desktop – Part 6 – Key Components – Task Bar | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  7. Pingback: FreeBSD Desktop – Part 7 – Key Components – Wallpaper Handling | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  8. Pingback: FreeBSD Desktop – Part 8 – Key Components – Application Launcher | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  9. geekosupremo

    It looks like the move to 12-RELEASE also changes/updates your thoughts on beadm usage from your intro to HardenedBSD. It’s nice to know that there is a reason for the seemingly odd decisions of the past.

    Thanks for the updates to these guides!

    Like

    Reply
  10. Pingback: FreeBSD Desktop – Part 17 – Automount Removable Media | πšŸπšŽπš›πš–πšŠπšπšŽπš—

  11. Pingback: FreeBSD Desktop (2) – OS update | 0ddn1x: tricks with *nix

  12. Pingback: FreeBSD Desktop – Part 14 – Configuration – Tint2 | πšŸπšŽπš›πš–πšŠπšπšŽπš—

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s