# Newbie with some pre-install questions



## therue (Jul 3, 2018)

Do most people still do the classic partition scheme of /boot / swap /tmp /var /usr these days for home computer (not server) ? or just use the guided partition ?

Also, what exactly is the root on zfs option? I did read the part about it in the handbook but still a little confused about it.

Lastly, currently I have a desktop set up as dual boot running win10 and archlinux via grub. I plan on deleting the archlinux partition and replace it with freebsd. Will this leave me with a messed up grub or something? In addition, my win10 i don't think it's installed as uefi, so if i was to install freebsd, i should keep it as bios as well and not uefi right? 

thanks in advance


----------



## jef (Jul 3, 2018)

ZFS is a "completely different" file system than classic FreeBSD (or Linux, or ...) file systems. Many find its features very valuable in day-to-day operations, even on personal systems. A few that immediately come to mind include; on-the-fly compression, "trivially easy" RAID management (including increasing the size of the pool and device replacement), snapshots that allow diffs, "instant" roll-back capabilities, and incremental image backups to other systems/media, and easy "by-subdirectory-tree" management of features. There's a lot more, but that's a hint as to what is there. The downside is that it "requires" a minimum of 2 GB of RAM for the system.

Personally I use it on all of my FreeBSD systems and Debian boxes (with the exception of the Raspberry Pi units, that don't have enough memory).


----------



## therue (Jul 3, 2018)

jef said:


> ZFS is a "completely different" file system than classic FreeBSD (or Linux, or ...) file systems. Many find its features very valuable in day-to-day operations, even on personal systems. A few that immediately come to mind include; on-the-fly compression, "trivially easy" RAID management (including increasing the size of the pool and device replacement), snapshots that allow diffs, "instant" roll-back capabilities, and incremental image backups to other systems/media, and easy "by-subdirectory-tree" management of features. There's a lot more, but that's a hint as to what is there. The downside is that it "requires" a minimum of 2 GB of RAM for the system.
> 
> Personally I use it on all of my FreeBSD systems and Debian boxes (with the exception of the Raspberry Pi units, that don't have enough memory).



but i can set the file system of partitions to ZFS too with guided or manual right? but what exactly is root-on-zfs for though


----------



## jef (Jul 3, 2018)

I'd stick with the "partitioning" that is used by default, if you go with ZFS. One of the "bits of magic" of ZFS is that you've got great flexibility in "re-partitioning" after-the-fact. Basically, you allocate space on the disk for the boot loader, swap, and "all the rest" -- then ZFS lets you allocate as appropriate, _even if your needs change with time. _

"Allocate" is really not the right word -- unless you explicitly set up quotas, ZFS uses what it has to of its available storage to meet your needs. No more "well, /var needs to be 100 GB, even though I may not use that for a long time" -- it just grows as needed. What ZFS does is let you _manage _segments of your file system independently, such as snapshots, compression, executables allowed, read-only, remounting to other points, ...

The layout provided by the default ZFS install lets you use sysutils/beadm which is a valuable tool for managing system upgrades and "experiments" without losing your core OS configuration.

_Edit: "Root on ZFS" basically means that you're using ZFS for "everything" for your running system. Unless you have very specific needs, it "does the right thing", including being able to create a mirror from the start. With ZFS you can "trivially" change a single-drive pool into a mirrored pool by adding a drive. The partition table is very simple -- here from a 16 G VM_

```
$ sudo gpart show /dev/ada0
=>      40  33554352  ada0  GPT  (16G)
        40      1024     1  freebsd-boot  (512K)
      1064       984        - free -  (492K)
      2048   4194304     2  freebsd-swap  (2.0G)
   4196352  29356032     3  freebsd-zfs  (14G)
  33552384      2008        - free -  (1.0M)
```
_The _file systems _themselves are independent of the disk _partitioning. _Note that all file systems show 12 G available -- it will be allocated _as needed.

```
$ zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
zroot                778M  12.3G    88K  /zroot
zroot/ROOT           672M  12.3G    88K  none
zroot/ROOT/default   672M  12.3G   672M  /
zroot/tmp             88K  12.3G    88K  /tmp
zroot/usr            105M  12.3G    88K  /usr
zroot/usr/home       105M  12.3G   105M  /usr/home
zroot/usr/ports       88K  12.3G    88K  /usr/ports
zroot/usr/src         88K  12.3G    88K  /usr/src
zroot/var            580K  12.3G    88K  /var
zroot/var/audit       88K  12.3G    88K  /var/audit
zroot/var/crash       88K  12.3G    88K  /var/crash
zroot/var/log        140K  12.3G   140K  /var/log
zroot/var/mail        88K  12.3G    88K  /var/mail
zroot/var/tmp         88K  12.3G    88K  /var/tmp
```


----------



## ShelLuser (Jul 3, 2018)

therue said:


> Do most people still do the classic partition scheme of /boot / swap /tmp /var /usr these days for home computer (not server) ? or just use the guided partition ?


I never rely on the guided schemes because they usually don't provide an optimal setup. This, in my opinion, also definitely includes ZFS.

But yeah, people still separate filesystems. But it's based on the needs. If you don't think much is going to happen then you might want to use one huge root and perhaps a separated /home. But as soon as you're going to do more (or the system needs a certain dependency) then it makes sense to separate things.

For example: splitting / ('root') and /var can make sense because when your root partition has been filled up then there would still be space left in /var so that the system can continue writing logfiles. Whether this is an advantage for you or not depends on your setup.



therue said:


> Also, what exactly is the root on zfs option? I did read the part about it in the handbook but still a little confused about it.


It means that FreeBSD can now directly boot from ZFS. So the ZFS filesystem contains everything, including the kernel and the base system. It's somewhat of a legacy description I suppose because one would deem it normal that you can fully boot from a setup   But there was a time when booting from ZFS was "troublesome".



therue said:


> Lastly, currently I have a desktop set up as dual boot running win10 and archlinux via grub. I plan on deleting the archlinux partition and replace it with freebsd. Will this leave me with a messed up grub or something?


Most likely yes, because the FreeBSD boot sequence is quite different from that of Linux. The good news is that Grub is available on FreeBSD as well so you should be able to fix the damage afterwards.

Still... it might be a better idea to try a virtual installation first (VirtualBox for example) so that you'll get a bit of an idea how this thing works before you apply it onto your machine for real. Do not think of FreeBSD as "another Linux" because then you're in for a very nasty surprise.



therue said:


> In addition, my win10 i don't think it's installed as uefi, so if i was to install freebsd, i should keep it as bios as well and not uefi right?


That seems the safest approach to me, yes.


----------



## therue (Jul 4, 2018)

ShelLuser said:


> I never rely on the guided schemes because they usually don't provide an optimal setup. This, in my opinion, also definitely includes ZFS.
> 
> But yeah, people still separate filesystems. But it's based on the needs. If you don't think much is going to happen then you might want to use one huge root and perhaps a separated /home. But as soon as you're going to do more (or the system needs a certain dependency) then it makes sense to separate things.
> 
> ...



thanks so much for the clarifications. i will install ufs this time around just to be safe until i am more familiar with BSD 

by the way, what's the cleanest way to set up the bootloader for uefi dual-boot with windows? in the past when i ran linux it was always through legacy so i've always used grub, but this time around i reinstalled windows 10 in uefi mode. it seems that one way to do this is via rEFInd and EasyUEFI, but that requires a third party software to be installed.  Is there a cleaner way to do this?


----------



## rufwoof (Jul 4, 2018)

therue said:


> Do most people still do the classic partition scheme of /boot / swap /tmp /var /usr these days for home computer (not server) ? or just use the guided partition ?


There's good reason for the choice of default. Here's a OpenBSD link for instance https://www.openbsd.org/faq/faq4.html#Partitioning that outlines some of the potential reasons for leaving things as 'suggested'. Maybe not the optimal, but a good/reasonable choice - unless you know better.


----------



## ShelLuser (Jul 4, 2018)

therue said:


> by the way, what's the cleanest way to set up the bootloader for uefi dual-boot with windows? in the past when i ran linux it was always through legacy so i've always used grub, but this time around i reinstalled windows 10 in uefi mode.


I have no hands on experience with UEFI yet so keep in mind that all I have to go on here is what I read on the Net. The UEFI wiki page tells me that the default UEFI image on FreeBSD (/boot/boot1.efifat) is fully aimed at booting FreeBSD and not much else.

Still, this thread might be useful for this task.


----------



## sko (Jul 4, 2018)

ShelLuser said:


> I have no hands on experience with UEFI yet so keep in mind that all I have to go on here is what I read on the Net. The UEFI wiki page tells me that the default UEFI image on FreeBSD (/boot/boot1.efifat) is fully aimed at booting FreeBSD and not much else.



With UEFI no bootloader should be required to load anything else than "its own" OS, because usually the UEFI itself should provide a mechanism to choose between multiple OS, which just put their loaders on the EFI partition. There's one little "but" though... _A LOT_ of consumer-grade hardware either has broken/buggy UEFI menus/loaders or just completely lacks this functionality.
IMHO the best choice on desktop/client systems to mitigate this is rEFInd - regardless of what the mainboards UEFI might offer, because it "just works"™ and still works if you put the disk in another system (e.g. Hardware upgrade) that might lack a proper EFI loader.

One caveat though: Windows (esp. 10) tends to nuke everything it finds on the same hard disk, especially during larger updates like rollups or service packs. This often includes other bootloaders within the EFI partition and especially loaders in the MBR. The only advice to give here: either just nuke Windows for good or put it on its own disk to at least minimize the risk. Another (popular) and much more safe variant if you absolutely *have* to touch Windows for some tasks: put it into a VM like e.g. VirtualBox. Backed by ZFS zvols this also makes it extremely easy to roll back the VM if Windows borks itself for the umpteenth time...


----------

