Re: Notes on improving the installer

From: Willem Jan Withagen <wjw_at_digiware.nl>
Date: Tue, 17 Jun 2025 20:19:12 UTC
On 17-6-2025 18:50, David Chisnall wrote:
> I recently used the installer for the first time in ages (most of my FreeBSD installs have been around for many years) and was quite surprised that there is absolutely no support for non-trivial ZFS installs. If you want to partition the disks yourself and then use ZFS, you have to:
>
>   - Drop to the console.
>   - Manually create the partitions.
>   - Manually create each dataset (the list of the ones you need from the wiki is stale).
>
> I would expect to be able to create the partitions in the partitions GUI, tell the installer the kind of ZFS pool to create (mirror, strip, RAID-Z[2]), and then have it create all of the datasets for the install. It took me four attempts to get this right (well, rightish. I missed a dataset and needed to create it and shuffle files around later).
Long time since, but once I got so fed up with this typical problem.
That I did create a patch that allows to actually size the first boot
partition that BSD-install creates.

That allows you to do all the other partitions after the install.
I did submit the patch through bugzilla. Maybe it is still there.
But like I said, quite some time since. Perhaps I can still dig it up 
someware.

What I remember is that hackking at BSD-install is not the most 
enjoyable things.

--WjW

> Ideally, if you are partitioning multiple disks. It would be nice if there were some way of saying ‘this partition map on all disks please’. Creating the same partition layout on every disk in a RAID set is tedious.
>
> On top of this, there is no support (in the installer or, as far as I can tell, in freebsd-upgrade or pkgbase) for putting a UEFI partition on *each* disk and keeping them all up to date. It’s not so useful having a RAID-Z or strip set if the bootloader isn’t mirrored (can gmirror manage this transparently?).
>
> If you enable encrypted swap in the installer, it creates fstab entries that create the GELI devices. It does not label the partitions (swap0, swap1, or something useful) but uses the raw device nodes. Nothing in the system appears to check the underlying partition type when enabling swap on these devices, so if you plug in another device and things are renumbered then swapping will write nonsense over a different partition (I was fortunate that, when this happened to me, the destroyed partition was one I was planning to delete anyway).
>
> I think I have filed bugs about all of these issues. It would be great if folks looking to improve the installer could consider some of them.
>
> David
>
>> On 17 Jun 2025, at 16:17, Joseph Mingrone <jrm@freebsd.org> wrote:
>>
>> Yesterday at the Kitchener-Waterloo hackathon, we spent a few hours
>> reviewing the FreeBSD installer and identifying areas for improvement.
>> We've documented our observations and suggestions on the wiki:
>>
>> https://wiki.freebsd.org/ImproveInstaller
>>
>> Feedback and contributions are welcome.
>>
>> Joe
>> <signature.asc>