Solved Installing FreeBSD 14.0-RELEASE on Dell OptiPlex Micro (GPT+ZFS on NVMe SSD)

DISCLAIMER:
Along this thread I cannot know at large if what particularly happened to me could be in fact general, nor could I state that the workaround would be the best practice or the right thing to do in a similar case. Thus, what I'm trying to share here is to be taken as a mere contribution which may or may not work under other circumstances or scenarios and I shall not be held responsible for anything that could go wrong, that is, if you try what I've successfully did, in part or in its entirety, do at your own risk. Thank you.

The beginning of the story
I've got a new hardware, Dell OptiPlex Micro Form Factor 7010, on which I was willing to perform a "relatively minimal" :-/ FreeBSD 14.0-RELEASE installation. After having successfully created & tested the "recovery media" following Dell recommendations I've burned the installation image following the instructions for the memstick option. While I was creating the Dell's "recovery media" I've innocently (just for fun meanwhile ?) performed general "updates" on the factory installation (which came with Ubuntu pre-installed). But the updates also caused the firmware (UEFI) to be updated, which caused the so called "Dell Safe BIOS" to be installed and activated setting up some sort of "secure boot" which I initially thought to be the cause of both F2 or F12 be ignored so that I couldn't use the memstick with the FreeBSD installation image. "Of course" applying the recovering media didn't solve anything. After struggling with the issue for some time I've finally noticed that somehow the problem of F2 or F12 being ignored was in fact due to the "gaming" keyboard I was using. Then I took an old USB keyboard (which I luckily happened to have at my disposal) and could finally have access to the firmware configurations and disable the "secure boot" for allowing me to use F12. But before finally overcoming this initial difficulty a reboot was required and the firmware prompted me to input a configuration-change validation code (number), but I could not get to the input field with the Tab or Arrow keys! To make things more difficult, together with this prompt there was a timeout, short enough to not let me figure out what to do except to start from the scratch until I finally note that by pressing F12 again at that configuration-change prompt would (imperfectly I would say) bring me some sort of focus to which I could use the Arrow keys to get to the input field and type the required number before the timeout! Wow!

Installing FreeBSD
Finally I could boot from the FreeBSD installation image on the USB memstick and proceeded as usual until I came to Allocating Disk Space at which point if I chose "Auto (ZFS)" it mysteriously fails during the "Archive Extraction" of base.txz with the following message ?:
Error while extracting base.txz: Can't replace existing directory with non-directory
From this point on the installation seems doomed. Thus, I started over thinking I could possibly choose something different sub-option of "Auto (ZFS)", but I haven't succeeded in any different way I've experimented with. Again I've got stuck in the issue for some time. Puzzled, I've decided to wipe out my NVMe SSD and start over and for that I've rebooted from another memstick with GParted, but that didn't solve either! For some reason I can't explain I've decided to wipe the disk once more but this time I additionally created the EFI partition by hand using GParted. More specifically I did the following:
  1. Wiped the disk
  2. Recreated the GPT partitioning scheme
  3. Created a 256 MB FAT16 partition and set its BOOT and ESP flags.
With all that work the "Auto (ZFS)" still kept failing but the "Auto (UFS)", guided partitioning, worked fine if choosing "Partition" instead of "Entire Disk". So I could successfully complete the installation using UFS as above described. I don't know if the BSD installer could handle well all that I did myself with the help of GParted because I didn't take the time for experimenting with that as I was focused on succeeding with ZFS. As I have succeeded with UFS I was on the belief that I would also succeed with ZFS. But no matter how much I've tried by myself I couldn't figure out what else do. So I reverted back to researching the Internet where I've found the savior wiki article: Installing FreeBSD Root on ZFS using GPT. It's slightly outdated but it still has all the essential information on what to do on this particular case where "Auto (ZFS)" isn't working (and I suspect it may be a bug or, if not, that it could receive some further refinement in order to cope with issues such as the one I was facing). Nevertheless, I've performed a slight variation of the recipe which seems to be working fine for me:
  1. I preferred to wipe the disk with the help of GParted and create the "bootcode partition" as previously mentioned (using 256 MB on FAT16).
  2. For a NVMe SSD the disk would probably be nda0.
  3. I've used zfs0 instead of disk0.
  4. I prefer to use the name system instead of zroot.
  5. I had to use the -f flag on zpool create -f -o altroot=/mnt system nda0p3.
  6. Instead of creating zfs create system/usr/home I've used zfs create -o mountpoint=/home system/home.
    (and didn't make the symbolic link anymore)
  7. While dropped at the shell I've interactively used vi instead of the copying of a "here-document" to create the /tmp/bsdinstall_etc/fstab.
  8. The post-install step related to /boot/loader.conf was redundant and I had to undo it before the final reboot.
Bottom Line
Yes!
? It's possible to install and ZFS-boot FreeBSD 14.0-RELEASE on a Dell OptiPlex MMF 7010 with a NVMe SSD. As with the installation memstick, the "state three" of the loader a beautiful (high-resolution) beast image is displayed along the default 10s count-down for the boot (On the previous FreeBSD release I didn't achieve that and I love it's now working for me). I imagine (haven't reached that point yet) that installing X wouldn't be an issue as I've already succeeded on an older OptiPlex MMF and FreeBSD 13.2-RELEASE.

PS
I would suspect that (at least) one of the causes for the "Auto (ZFS)" failure could be related to the lack of the -f flag just mentioned.
 
Last edited:
Auto (ZFS)

If I recall correctly:
  • this disregards (or should disregard, as currently designed) whatever you do to a drive prior to targeting the drive in bsdinstall(8)
  • It's intended to use the drive in its entirety (including creation of partitions).
 
Last edited:
I've never had to dig into bsdinstall(8) for more details until this time when it didn't work for me out of the box.
I'm not sure if I really understood, perhaps, but I tend to say "yes" and "no" to your first point.
I suspect that the issue was the lack of the -f flag when attempting to create the zfs pool.

For the second point, yes, I wanted to use the entire drive just for ZFS.
I'm not sure that FreeBSD does not support ZFS on partitions coexisting with other file-systems as Solaris does with disk slices.
Everything would work fine for AutoUFS on a partition and the system seemed a bit more responsive.

In my particular case ZFS would better fit my goals.
But if instead the system would be "expendable" I would go for UFS for possibly better performance.
 
A simple example, a non-root pool on a mobile hard disk drive:

Code:
root@mowa219-gjp4-zbook-freebsd:~ # lsblk da2
DEVICE         MAJ:MIN SIZE TYPE                                          LABEL MOUNT
da2              1:96  932G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da2p1          1:99  932G freebsd-zfs                           gpt/Transcend <ZFS>
  <FREE>         -:-   712K -                                                 - -
root@mowa219-gjp4-zbook-freebsd:~ # zdb -l gpt/Transcend | grep whole
        whole_disk: 1
root@mowa219-gjp4-zbook-freebsd:~ #

The first sentence of <{link removed}> is no longer true for FreeBSD:

Whole disks should be given to ZFS rather than partitions. …

{link removed} there's a comment from bsdimp.
 
Last edited:
I have FreeBSD 14.0 on an Optiplex 7050 Micro but it's installed on a sata ssd rather than the nvme ssd. For some reason FreeBSD is not detecting the nvme ssd on my optiplex. You could try installing to a sata ssd. There should be a space available for one. I'm running mine with wayfire window manager and the system performs nicely with a 1080 display.
 
In the past when I've tried to install FreeBSD 13.2-RELEASE on an OptiPlex 3000 Micro I didn't succeed and I couldn't spare enough time to delve into the issue and although I cannot recall what went wrong by that time there was no NVMe in the equation. All in all I suspect that if I repeat the procedure I've described at the start of this thread I shall succeed (this time with FreeBSD 14.0-RELEASE) if I find some time for reinstalling it.
 
Last edited:
Back
Top