# Installing FreeBSD for the first time! Questions



## therue (Jan 30, 2018)

*System Specs*:
cpu: Intel i7-4770K
gpu: Nvidia Geforce GTX 780
ram: 16 GB
ssd: 250 GB
*
Type of usage*:
Home Desktop

Originally I thought about  setting it up as a Dual Boot with Win10, but decided to just make it easier on myself and dedicate the whole drive to FreeBSD, since it will be my first time with the system.

I do have a few questions regarding the installation process and package management though, and if it's not too much trouble, I would really appreciate a few clarifications.

*1. UEFI or BIOS? GPT or MBR?*
Should i always go UEFI and GPT unless i have a need that calls for MBR? (just out of curiosity, could someone perhaps go over what combinations work for what kind of dual booting setup? This is actually why I decided to just single boot in the first place haha.... like if i go gpt and uefi, then grub wont work or something? but if i go gpt and mbr then it would?)

*2. Should I go UFS or ZFS? *(I hear ZFS is particularly useful for servers with a raid setup, but what about home computer?) What are some deciding factors when it comes to choosing between the two if I'm only using the computer for everyday use and for torrenting, etc?

*3. Auto partitioning or Manual partitioning?*
The AUTO partitioning option seems to only create 3 partitions:
boot
file system
swap
* And With 16 GB of ram, I don't even need a swap partition right?

Or is it still better to manually create the classic partioning scheme of:
boot
file system
swap
var
tmp
usr

*4. Packages vs Ports*: In regards to installing software. I hear that it is best to pick a method and stick with it and not mix packages and ports together. However, while software usually have both a package and port version available, that is not always a gurantee.... so in the end, it's still probably better to learn to install from ports?


----------



## CraigHB (Jan 30, 2018)

I'm new to FreeBSD myself, but as far as partitioning for a desktop, I just use the GPT scheme.  MBR would be fine for me, but GPT has some advantages.  I can see where ZFS is of great benefit for server stuff, but for a desktop system it seems like more than I need.

Using the partition tool in auto mode works for me, but I like to set up an extra partition to store things like installation images and software.  It's possible to preserve a partition using the partitioning tool in manual mode so I may keep stuff I don't want to erase in an extra partition.  Splitting things up over multiple partitions is for servers so if something happens that fills up a partition it won't crash the server, really not necessary for a desktop system.

I still run a swap partition, but just 4GB which is what auto mode assigns.  I've read the FreeBSD kernel doesn't use swap much, but it ~can~ use it.  No reason to deny any use of it and it's not that much space.

So far I've just been using packages.  I'm not going to mess with ports until I have a specific need.  I was under the impression there's no issue in using either one as the need arises.


----------



## eyegor (Jan 30, 2018)

1. GPT
2. If you have 1 hdd - UFS, if you have 2 same hdd and more- you may try ZFS, but read about minimum system requirements for ZFS.
3.Auto is normal, but you may try manual
4. Packages is prefered. If you did not find software in packages - try ports collection. But remember - packages are more convenient in administration, but if you want more flexible configuration - you may choose appropriate port.

UPD. Switch trim to ON for your SSD


----------



## ralphbsz (Jan 30, 2018)

1. Definitely GPT.  And label your partitions with human-readable and sensible text strings, which makes later debugging and maintenance easier.

2. In general, ZFS.  The one big advantage, even if you don't use RAID, is the checksums.  But for a small file system (like the boot/root file system) where there aren't many modifications after install, and where damage to the files can be rectified in emergencies by reinstalling, UFS is just fine.  A lot depends on what you are more comfortable administering: using ZFS requires you to read the documentation and learn new concepts (like pools) and new commands.

3. It depends.  What kind of system are you building?  A server, which is supposed to run reliable and most unattended?  Then I would segregate out at least the /var and /tmp file systems, so the whole system doesn't go down if those run out of space.  Personally, I also segregate out /usr, /usr/src and the home directories from the root file system.  But anytime you segregate something, you need to have an educated guess as to the required size; that guess will always be inaccurate, leading to wasted space.  And getting a halfway accurate guess requires experience.

On the other hand, if you are building a personal workstation (for example laptop), that is not intended for durable storage of data (the real data repository is in the cloud or on a separate server), and that you will use with intense system administration, which will probably require re-installing somewhat frequently, then a single file system for everything is just fine.

While with 16 GB your system is unlikely to ever swap, I feel more comfortable with a small swap partition.  Just because systems have used swap for ages, and not having swap is unusual, and might tempt a rare bug to hit you.

4. My personal answer is that packages are faster, more efficient, easier, and cover 99.9% of all needs, so I use them.  On my previous system (I think it was FreeBSD 9.x), I had two items where packages wouldn't work, and I had to get the port and hand-compile it.  Mixing packages and ports is possible, if you are careful, and remember that both need to be updated.  On my current 11.1 system, there is no compiled packages at all.

However, I know that purists say that one should use all ports, and compile everything.  That's probably more true if one has a lot of things installed, which is particularly true on a machine with a GUI (I run a headless server).


----------



## therue (Jan 31, 2018)

(Auto) Root-on-zft
which pool type should i pick though? 
Riad0,1,2,3 as name suggested i'm sure are for server, but if i'm installing on an entire 255 gb ssd,  is it better to pick striping or mirror? what exactly is the difference? 

Striping: Provides maximum storage and no redundancy ?
Mirror: best performance, smallest disc space ?


----------



## rigoletto@ (Jan 31, 2018)

Using the automatic with one disk, the only valid option is striping. You can create more than one partition in a single disk and mirror them, but (as far I am aware) you can not do that using the automatic mode.


----------



## Snurg (Jan 31, 2018)

OT: 





lebarondemerde said:


> ... mirror them, but (as far I am aware) you can not do that using the automatic mode.


AFAIK it's easy to mirror with zfs. Just attach a second drive to a pool created using a single disk with the auto installer and bingo you have a mirrored zpool.


----------



## PacketMan (Feb 2, 2018)

I've always used BIOS mode, and GPT. (Well apparently I goofed one of my last installs and used BSD partitions. Don't do that. Use GPT.)
Use USF.  ZFS has special requirements, including using ECC ram I understand. Also ZFS is more complex, generates a fair bit more "issues" discussion, and so for a first time user using it for desktop I say use UFS.
I have used auto-partition all the time for my desktop and home server buillds, and no issues there. You always 'need' a bit of swap, for insurance purposes. You never know when a program might go a little piggy on ya and gooble up ram. Create the swap and if it never gets used then so what!
First never mix the use of the ports and packages systems. One slip and down the hole you fall.  I suggest using ports for a while to help you learn the system. But that will likely generate some "issues" discussion, maybe some annoyance if you are short on patience, etc.  Afterwards you can decide to switch to packages or use your own packages builder.  The ports system lets you customize the programs you install, the packages system does not.  However if you use a builder manager like ports-mgmt/synth or ports-mgmt/poudriere you get the best of both worlds.
Just dive in, do it, and have fun! FreeBSD has a bit of a learning curve, and requires a bit of discipline but its well worth it.


----------



## Handsome Jack (Feb 2, 2018)

1) UEFI. Because nVidia there is a chance to get some annoyances as described here.
3) Auto. _If I remember correctly_, with 24GB of RAM, my auto-created swap was only 2GB (or 4)

Also, If You got 2 or more disks, Dual boot with "rule": _One disk - One OS_ (for Home Desktop) is relatively safe and clean.
Those are opinions; Experimentation will lead You to the best results FOR YOU.


----------



## herrbischoff (Feb 2, 2018)

Snurg said:


> Just attach a second drive to a pool created using a single disk with the auto installer and bingo you have a mirrored zpool.



Wouldn't this just grow the pool, writing files to both disks, actually raising the danger of catastrophic disk failure instead of mirroring it?


----------



## Snurg (Feb 3, 2018)

herrbischoff said:


> Wouldn't this just grow the pool, writing files to both disks, actually raising the danger of catastrophic disk failure instead of mirroring it?


I am no zfs expert at all. It is a while ago when I did that when I was waiting for a good ebay offer for a second drive and didn't want to wait with installing until I got that delivered.
When I finally got the new drive, I just zeroed it, copied the partition table from the first drive to the new one (first 40 blocks plus a few megabytes to get grub and the like in, too), and then followed the steps described in the Oracle documentation.
It was really easy, and i am sure it didn't grow the pool, I would have noticed.

Edit: Later I wondered why gpart complained about broken partition table. I forgot to copy the last sectors with the backup partition table, but gpart recover did the job nicely.


----------

