bsdinstall(8) troubles
rust xattr
I made a blog post a few days ago on my main blog about extended attributes. This reminded me that my rust patch is still in limbo, so I pinged the author, and he was nice enough to take a look and provide fantastic feedback.
https://github.com/Stebalien/xattr/pull/3/
bsdinstall
After working on fixing up my patches, I was in the mood to try and figure out why loading echo.ko was causing kernel panics. I started setting up a new FreeBSD instance in bhyve(8) to figure this one out.
Installing FreeBSD proved to be a problem.
This is the first time that I’m using the new bsdinstall over sysinstall, and I had a few problems actually make it to a successfully installed FreeBSD system.
The major issue that I encountered is that some components would either drop me back to the beginning of the installer, or drop me back to the beginning of that component. For example, partedit errors would drop me back to partedit, and zfsboot errors would restart the installation.
What made going through the installation over and over again extra frustrating, was that netconfig_ipv4 would error if you tried to configure an interface with a running dhclient. I submitted a report and simple patch to kill any dhclients if you’re configuring your installation interface to use dhcp.
Another bug that I found while proceeding through the install was that modifying a ZFS partition and just setting the mountpoint would cause partedit to segfault. Bug report and patch.
While I was looking through all this, I happened to find a potential issue that would hang the installer. When writing the bootcode to disk, partedit reads the file in a loop without checking for read(2) errors. If read(2) fails once for whatever reason, this will hang this installer, as that loop will never terminate. There was also an unchecked malloc(3) that took the result of an unchecked lseek(2) as well. I replaced all of that with an mmap(2)..














