FreeBSD 12.2 Fresh Install recommendation with UEFI

Hello All

I am trying to perform a fresh install of FreeBSD 12.2 on HP Compaq 8200 Elite SFF with UEFI.
The machine had Debian Buster earlier which I deleted for installing FreeBSD.

Specs:
Intel i5-2500 3.3Ghz, 8 GB Ram, 512 GB HDD - Internal, 4 TB WD Red - Internal, 2 TB WD My Passport - (Connected through USB along with separate power) and the machine is connected through Ethernet Cable.

The issue I am facing:
1. When I boot from FreeBSD --> USB Stick Boot Device, the ESC->F9->Boot Menu in the HP Machine shows the following under:
UEFI: Ubuntu, Ubuntu, Debian, Kingstone USB stick (maybe my old experiments are still around)
Legacy Boot: It shows Internal HDDs and Kingstone USB Stick

When I try to boot either from UEFI or Legacy Kingston, it hangs after the FreeBSD initial Boot Options Menu. Upon repeated tries sometimes / on & off I am able to boot in and once I installed FreeBSD on 512gb HDD. But, after installation upon rebooting it shows as no boot device.

My requirement:
1.Clean the EFI partition and have only FreeBSD 12.2 (remove all unnecessary entires or recreate EFI). The machine will only use FreeBSD 12.2 and none other.
2.Install FreeBSD 12.2 Fresh Install on 512 GB HDD with UFS or ZFS (Please advice for BASE System the file system to be used)
3. Use the 4 TB & 2 TB as ZFS (no redundancy required) for storing Media & Data as SMB Share
4. Install Plex and Transmission
5. Configure PF Firewall and allow Plex & Trasmission
6. I don't need jails or any extra complications, FreeNas, NextCloud, etc.
7. The machine will not be exposed outside my Home Network.

Also, tried multiple times booting through GPart ISO image and tried to delete all partitions and files systems left everything unallocated. Even then I have trouble installing the system.

Any help would be appreciated to better understand / resolve my issue. Also, please advice on the Installation as to whether while installing FreeBSD itself I need to select all the Hard Drives or selected only 512gb HDD for base installation and then subsequently add the additional drivers. If the case is later, how to do it.

Please feel free to provide additional inputs based on my requirement as you deem fit.

Have already looked for threads, bur unable to understand or grasp the concept to configure the right way.

Thank you.
sny
 
Proceed step by step. Remove all disks and try to boot on your USB stick. Again the same problem?
If no, power off and plug the 512 GB disk. Then, reboot on your USB stick and begin the installation.
If yes, try to tell us what you see on the screen when or just before it hangs.

Concerning the root file system, you will find different points of view here. Mine is that UFS is obsolete. There is too many advantages for ZFS and the most important one is boot environment.
 
Ok, it was a lot of work :) Just kidding... had to remove the PC from it's set place since the last 5 years! However, had a chance to vacuum clean inside!!! Good that I finally could do this.

Yes, I disconnected the 4TB WD Red but not the 512gb and tried to boot in UEFI from the HP Boot Menu. FreeBSD starts from USB Stick and hangs here... see attached screenshot photo taken from my phone....

How do I clean up the EFI Partition or recreate it for only FreeBSD?
 

Attachments

  • BootManuOptions.png
    BootManuOptions.png
    1.1 MB · Views: 269
  • FreeBSDBootHangsHere.png
    FreeBSDBootHangsHere.png
    836.8 KB · Views: 266
ok, now I dismantled the PC to access the cables, have disconnected all the HDDs and booted from USB Stick from the HP Boot Menu selecting UEFI USB Stick. It hangs upon boot at the same place as attached in the above screenshot!!

Next, I just booted the machine without going into the HP Boot Menu. It booted from USB Stick and Hangs here, see attached screenshot in this message.
 

Attachments

  • BootingErrorAndHangsHere.png
    BootingErrorAndHangsHere.png
    939.7 KB · Views: 168
  • BootManuOptionsAfterRemovingALLHDD.png
    BootManuOptionsAfterRemovingALLHDD.png
    1,010.9 KB · Views: 121
I had a similar problem when I went to a UEFI-only machine. At the boot screen I escaped to the prompt. Then I typed this:

  • set hint.uart.0.disable=”1″
  • set hint.uart.1.disable=”1″
Then continue booting. If it works, you can put the line into your loader file. Kind of a shot in the dark, but oh well. It won't be permanent if not in the loader file, so no harm done. The suggestion came from famicoman. Hope it works.
 
ok, now I dismantled the PC to access the cables, have disconnected all the HDDs and booted from USB Stick from the HP Boot Menu selecting UEFI USB Stick. It hangs upon boot at the same place as attached in the above screenshot!!

Next, I just booted the machine without going into the HP Boot Menu. It booted from USB Stick and Hangs here, see attached screenshot in this message.
Look into my thread:


Does it look similar? You mentioned HP computer. This is HP too. I have not managed to solve it fully. The same configuration works on another machine. I think I have to throw out that HP motherboard.
 
Last edited by a moderator:
I had a similar problem when I went to a UEFI-only machine. At the boot screen I escaped to the prompt. Then I typed this:

  • set hint.uart.0.disable=”1″
  • set hint.uart.1.disable=”1″
Then continue booting. If it works, you can put the line into your loader file. Kind of a shot in the dark, but oh well. It won't be permanent if not in the loader file, so no harm done. The suggestion came from famicoman. Hope it works.
ok this worked - Thank you. it booted and it came to the FreeBSD Install Menu. So, I powered down the machine and connected the 512 gb HDD and then rebooted the machine. This time I just did not ask for the prompt to set the values as mentioned, but instead booted in straight. To my surprise it booted in from USB. Installed FreeBSD 12.2. All ok until now.

Rebooted the machine, unplugged the USB and all seems to be ok. Something is messed up with the Boot entries in EFI, will report back after some more experiments; I think I will burn the oil to-nite.

I am studying the reference post from Argentum as pertains to the EFI issues. Will try to mount the EFI and check those as well. And update the post on the developments.
 
Look into my thread:

https://forums.freebsd.org/threads/uefi-boot-anomaly-after-update-to-12-2.77604/
Does it look similar? You mentioned HP computer. This is HP too. I have not managed to solve it fully. The same configuration works on another machine. I think I have to throw out that HP motherboard.
I think it is more or less similar issue I am facing. Have read your reference thread. However, the initial boot seems to be resolved from the quick fix solution provided by Ronaldless.

Now, I will try to fix my EFI for the unwanted entries and do few experiments before I go-ahead with the next steps to configure the machine. As I want to be dead sure that all works fine, before I commit completely!!

Just noticed that my machine had booted on BIOS Method from the output of sysctl machdep.bootmethod. and not using EFI !!
 
I think it is more or less similar issue I am facing. Have read your reference thread. However, the initial boot seems to be resolved from the quick fix solution provided by Ronaldless.
I will try this also. Maybe it helps.
 
The BIOS Method was my mistake; I had chosen the default GPT-BIOS why configuring the ZFS for the DISK. I again reinstalled with the option GPT-UEFI. Installed on just 1 512gb HDD entire disk for ZFS. Install OK.

When I rebooted after installation:
1. It said "Non-system Disk".
2. Rebooted and from the HP Boot Options I selected the 512gb HDD under UEFI, Boot failed as attached in the screen shot.
3. Rebooted as in point 2, but pressed the ESC key to choose the prompt and set the values
set hint.uart.0.disable=”1″
set hint.uart.1.disable=”1″

Boot failed as mentioned in the screen shot attached as in the case of point 2.

EFI is messed up and some flag is unfortunately incorrect, will experiment further and update. :(
 

Attachments

  • FreeBSDBootHangsHere.png
    FreeBSDBootHangsHere.png
    836.8 KB · Views: 109
The BIOS Method was my mistake; I had chosen the default GPT-BIOS why configuring the ZFS for the DISK. I again reinstalled with the option GPT-UEFI. Installed on just 1 512gb HDD entire disk for ZFS. Install OK.
In general, in such situation, one does not need to reinstall the whole drive. Look at your partition table - gpart show and modify EFI boot partition when needed. It is always a good idea to leave some un-partitioned space on disk for later GPT modifications.
/boot/boot1.efi is written to EFI FAT partition and is completely independent of ZFS storage pool. The only dependency is that it is built with base system, but can also be build and modified separately.
See my post:

But in this case, the problem seems not to be in boot1. It is somewhere else. You mentioned HP. I suspect some sort of HP bios incompatibility issue. I have another HP machine (different model) also with FreeBSD. The behavior of that machine is also "interesting" sometimes. Discrete motherboards manufacturers products tend to behave much better.

This is not a conclusion, but my hypothesis. Take the drive out and try to boot on a different machine.
 
Last edited by a moderator:
  • Thanks
Reactions: sny
In general, in such situation, one does not need to reinstall the whole drive. Look at your partition table - gpart show and modify EFI boot partition when needed. It is always a good idea to leave some un-partitioned space on disk for later GPT modifications.
/boot/boot1.efi is written to EFI FAT partition and is completely independent of ZFS storage pool. The only dependency is that it is built with base system, but can also be build and modified separately.
See my post:
https://forums.freebsd.org/threads/how-to-get-openzfs-2-0-working-on-freebsd-12-2.77912/#post-487265
But in this case, the problem seems not to be in boot1. It is somewhere else. You mentioned HP. I suspect some sort of HP bios incompatibility issue. I have another HP machine (different model) also with FreeBSD. The behavior of that machine is also "interesting" sometimes. Discrete motherboards manufacturers products tend to behave much better.

This is not a conclusion, but my hypothesis. Take the drive out and try to boot on a different machine.
Tried couple of times yesterday, but nothing worked! :(

I do not have any other Desktop machine aside from another Laptop again HP Elitebook G3 840 installed with FreeBSD 12.2 and half way configured with Plasma5 have to try out Window Manager as well. Still have lots and lots of work to do on this machine. As this is planned to be substituting my MacBook Pro going ahead --- want to move to Open Source fully!!

But, in the meantime wanted to setup my Server with FreeBSD 12.2, that's how this exercise started. Server was all well with Debian since the last couple of years... But, wanted to reduce the amount of different OS-es and the File Systems, 1 on NTFS, 3 on HFS+, 3 on ext4 ----> ZFS/FreeBSD ----- now the new complication of OpenZFS as pointed out by you in the referenced thread.

I am confused as to whether I should wait until FreeBSD 13.0 is released with OpenZFS!!! Lot of mess to deal with now; I need to somehow bring up my Server all hale and healthy. Otherwise, I will be forced to get back to Linux Server (which I can setup in few minutes). Honestly, I don't want to do this, that's why I am taking the pain of all this... As it is SAID "No pain no gain"

Back to the Original topic - Regarding UEFI:
1. Is it correct that in the EFI Partition the file from /boot/loader.efi is the one in /EFI/BOOT/BOOTx64.efi? I checked the file size it is the same. (screenshot attached)
2. Is there any-other settings required to be done to boot from UEFI option on the EFI Partition aside from setting the boot order and making it active.

I did the following settings by booting from OpenSuse Live USB Terminal: (Live could fit in less then 1 gb USB Stick)

sudo efibootmgr -c -d /dev/sdb -p 3 -l \\efi\\boot\\BOOTx64.efi -L FreeBSD
sudo efibootmgr -b <bootnum> -a


It is automatically rebooting, rebooting & rebooting after the following screen (attached) when I try to boot every time! I am missing something for sure; in my opinion this may not be HP MotherBoard or Firmware issue.....

BTW, However, my USB Stick is booting from Legacy when chosen from HP Boot Menu. I booted from FreeBSD 12.2 Installation USB Stick and took to the shell and fired the efibootmgr does not work as it was booted from Legacy I guess.Fired gpart show ada0 shows the 512gb HDD (screenshot attached).

Please help...
 

Attachments

  • FreeBSDBootHangsHere.png
    FreeBSDBootHangsHere.png
    836.8 KB · Views: 95
  • gpart output.png
    gpart output.png
    694.5 KB · Views: 106
  • Boot-EFI-Files.png
    Boot-EFI-Files.png
    317.4 KB · Views: 106
I am confused as to whether I should wait until FreeBSD 13.0 is released with OpenZFS!!! Lot of mess to deal with now; I need to somehow bring up my Server all hale and healthy. Otherwise, I will be forced to get back to Linux Server (which I can setup in few minutes). Honestly, I don't want to do this, that's why I am taking the pain of all this... As it is SAID "No pain no gain"
Read my post about OpenZFS -

But your original subject - I recommend strongly to find another system with different motherboard and try if it boots up.
 
Thanks for the OpenZFS 2.0 link, shall study the same and revert incase of issues.

Ok, I disabled UEFI and tried to boot & everything worked fine. The machine is automatically booting from 512 gb HDD normally in Legacy BIOS mode. Did also try and connect the 4tb HDD, it too worked. To check, created a zpool and few zfs with various options, all is good seems to work fine.

I don't think it's worth spending anymore time figuring out the UEFI part. I will live with Legacy BIOS as long as everything works.

Now, my question is should I use NFS built-in with ZFS or Samba for File Server. The file server is for home network use, to access from my other laptops and will be used for backup.

I tried configuring NSF, performed all the steps as follows:
on Terminal:

zpool create WDRED_DATA /dev/ada1
zfs set sharenfs=on WDRED_DATA
zfs create WDRED_DATA/Media
zfs create WDRED_DATA/Documents
zfs set compression=lz4 WDRED_DATA/Documents
zfs set copies=1 WDRED_DATA/Documents


in /etc/rc.conf:
# NFS Configuration Parameters for ZFS NFS Share
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"
rpcbind_enable="YES"
mountd_flags="-r"
mountd_enable="YES"


in /etc/exports:
# Export of WD RED HDD Files for Network Share
/WDRED_DATA/Documents -rw -maproot=myusername
/WDRED_DATA/Media -rw -maproot=myusername


on Terminal:
showmount -e
the above lists the available Exports list on localhost.

Note: pf.conf (NONE) - No Firewall configured as yet, not enabled in rc.conf. As I seek help on how to do it with NFS enabled? But before that I need to see the NFS in action, hence:

Assuming my host machine is 192.168.1.124, when I try to access the shares from my MacBook
nfs://192.168.1.09//WDRED_DATA/Documents or
nfs://192.168.1.09//WDRED_DATA/Media

Both does not work!! I get this Error Message (attached screenshot) from Finder in MacBook. However, I am able to connect through SSH from MacBook to FreeBSD machine.

What am I missing or messed up, please guide. Thank you.
 

Attachments

  • Finder-Error.png
    Finder-Error.png
    37.3 KB · Views: 81
I'm mounting NFS shares from a FreeBSD server to a Macbook Pro client myself.

nfs://192.168.1.09//WDRED_DATA/Documents or
nfs://192.168.1.09//WDRED_DATA/Media
The syntax is incorrect, change to
Code:
nfs://192.168.1.09:/WDRED_DATA/Documents
             ~~~~^^^~~~~
 
I'm mounting NFS shares from a FreeBSD server to a Macbook Pro client myself.


The syntax is incorrect, change to
Code:
nfs://192.168.1.09:/WDRED_DATA/Documents
             ~~~~^^^~~~~
tried this adding a ":" after the IP address, still doesn't work.... :(
 

Attachments

  • Showmount-Output.png
    Showmount-Output.png
    10.4 KB · Views: 106
tried this adding a ":" after the IP address, still doesn't work....
The following setups will let macOS "Finder" app mount NFS shares from a FreeBSD NFS Server.
Change IP addresses if necessary and hostnames accordingly:

NFS server setup, two variants:

- ZFS shared NFS or
- /etc/exports shared

(don't apply both at the same time):

Variant one, ZFS shared:
Code:
/etc/rc.conf

    rpcbind_enable="YES"
    nfs_server_enable="YES"
    nfs_server_flags="-u -t -n 4"    # optional
    mountd_enable="YES"
    nfsv4_server_enable="YES"        # optional

Create empty /etc/exports, otherwise mountd(8) complaints about unreadable file and no ZFS NFS
mounts are shared. If [MAN=4]nfsv4[/MAN] is configured, at least one line with V4: <rootdir> has to be set,
eg: [ICODE]V4: /[/ICODE]. You may want to keep the old exports:

    # mv /etc/exports /etc/exports.0
    # touch /etc/exports

Unset pool shares:

    # zfs set sharenfs=off WDRED_DATA

Set to share only datasets:

    # zfs set sharenfs=mapall=root,network=192.168.1.0/24 WDRED_DATA/Media     
    # zfs set sharenfs=mapall=root,network=192.168.1.0/24 WDRED_DATA/Documents

With network=192.168.1.0/24 set it may take ~10-15 seconds to mount the share in "Finder".
It's mounted immediately when the NFS client has an IP address assigned in /etc/hosts, eg.:

                    <hostname>    <alias>
    192.168.1.111        MacBook        MB        # Manually set IP address on MacBook:
                                                  # System Preferences -> Network -> (Wi-Fi, Ethernet, ...)
                                                  # Advanced -> TCP/IP -> Configure IPv4: Manually .
                                                  # Set hostname of the client from System Preferences ->
                                                  # Sharing -> Computer Name, eg. "MacBook".

MacBook Client:

    <user>:~ % showmount -e 192.168.1.100
    Exports list on 192.168.1.100:
    /WDRED_DATA/Documents        192.168.1.0
    /WDRED_DATA/Media            192.168.1.0

"Finder" app: Cmd+K (Connect to Server, Server Address)

    nfs://192.168.1.100:/WDRED_DATA/Media
    nfs://192.168.1.100:/WDRED_DATA/Documents

    <user>:~ % mount | grep nfs
    192.168.1.100:/WDRED_DATA/Media on /Volumes/Media (nfs, nodev, nosuid, mounted by <user>)
    192.168.1.100:/WDRED_DATA/Documents on /Volumes/Documents (nfs, nodev, nosuid, mounted by <user>)

Variant two, /etc/exports shared:
Code:
/etc/rc.conf - Same as above

Set all ZFS "sharenfs=off"

/etc/exports

    /WDRED_DATA/Media        -mapall=root,network 192.168.1.0/24
    /WDRED_DATA/Documents    -mapall=root,network 192.168.1.0/24
    V4: /

    # service mountd restart

/etc/hosts as above.
 
Last edited:
Hello T-Daemon

Thanks for the detailed explanation, the concept is well understood by me now. This was not found by me in any of the documents or reference I had come across until now. :) Just hoping the same will apply to OpenZFS as well.

I did try both configurations with no luck! :(
The MacBook gives the same error as before.

Any further thoughts..... Do you advise discarding NFS and install SAMBA?

sny
 
Just hoping the same will apply to OpenZFS as well.
It makes no difference, ZFS/OpenZFS share the NFS, nfsd(8), mountd(8), rpcbind(8) do the rest, "Finder" does mount the shares (I've tested on 12.2-RELEASE).

- Which macOS version are you on? I'm on High Sierra.

- Does showmount -e 192.168.1.09 in macOS "Terminal" show the NFS shares? Eg.:
Code:
Exports list on 192.168.1.09:
/WDRED_DATA/Documents        192.168.1.0
/WDRED_DATA/Media            192.168.1.0
In case it is not, run # service mountd restart on the FreeBSD server. And please post output (you can copy/paste the output from "Terminal" into forum editor, no screen shot needed).

- Check FreeBSD log for mountd(8) errors: # grep mountd /var/log/messages. If there are error messages please post them.

- There is no firewall running at the moment, right? And there is no kern_securelevel set in /etc/rc.conf, I assume (please double check).

- Try to establish as user or administrator an NFS mount from "Terminal".
Code:
MacBook "Terminal" app:

    User:
    % ping -c2 192.168.1.09        # it must return a positive response from the host
    % mkdir nfs
    % mount_nfs 192.168.1.09:/WDRED_DATA/Media nfs        # It may take 10-15 seconds.
    % mount | grep nfs
    % umount nfs
    After you are done testing:
    % rm -ir nfs   # double check before accepting!

    Administrator:
    % cd ..
    % su <admin name>
    # cd
    # mkdir nfs
    # sudo mount_nfs 192.168.1.09:/WDRED_DATA/Media nfs
    # mount | grep nfs
    # umount nfs
    # rm -ir nfs    # double check before accepting!
If the mount fails this should generate some error message. Please copy/paste that message.
Do you advise discarding NFS and install SAMBA?
I have no experience with SAMBA, it's been more than a decade or so since I configured one, NFS works just fine. I'm running a few FreeBSD VirtualBox VM's on High Sierra, mounting also NFS shares there.
 
Ok for the ZFS/OpenZFS understood.

- OSX - macOS Big Sur
- showmount -e 192.168.1.124 (in my case) shows the shares from FreeBSD - all ok

I reboot the machine everytime I make changes to Share's related config, taking no chance to just restart the service.

- No Erros in mountd log....
- NO firewall, rc.conf only has the nfs share configuration parameters aside from other defaults. pf not enabled and no /etc/pf.conf exists

On Macbook Terminal
- ping -c2 192.168.1.124 -- works like a charm
- mount_nsf 192.168.1.124:/WDRED_DATA/Media nfs -- throws error "mount_nfs: can't mount with remote locks when server (192.168.1.124) is not running rpc.statd: RPC prog. not avail"

FreeBSD is running in a dedicated machine, fyi. I would also want to use the pre-existing feature zfs supporting nfs, but these issues are the ShowStopper for now...
 
- mount_nsf 192.168.1.124:/WDRED_DATA/Media nfs -- throws error "mount_nfs: can't mount with remote locks when server (192.168.1.124) is not running rpc.statd: RPC prog. not avail"
Some progress.

Try # service lockd onestart on the FreeBSD server, retry mounting from MacBook "Terminal". If that works out make it permanent in /etc/rc.conf rpc_lockd_enable="YES".
 
  • Thanks
Reactions: sny
voilà!!! It worked! Superfast connection from Finder.... just clicked connect and it connected....
I have configured Option 1 for the Share ---> Sharing nfs Datasets alone....
Thanks a ton!

Now, I have to move to the next stage to enable (pf) Firewall.... can you help me with this as well...
 
Now, I have to move to the next stage to enable (pf) Firewall.... can you help me with this as well...
I'm afraid not. Firewalls are not my forte, but I'm sure someone with knowledge are willing to help, just start with the handbook, try, ask when you have problems.
 
Again a question. As I intend to have the FreeBSD as my main stream for daily use going forward; I have couple of USB 3.0 WD Passport & Ultra HDD presently formatted on HFS+. Half of the drivers contain Photos/Videos from my Nikon Camera. Both RAW & JPEG and the other half with Backups, Documents and Reference Materials.

I understand that FUSE can read HFS+ but I want read / write for normal usage for these storage HDDs.

What is the recommended FileSystem for these HDD's to be used with FreeBSD permanently?
 
Back
Top