[Bug 271262] bsdinstaller in AutoZFS + MBR mode always wipes disklabel - rendering system non-bootable

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 30 Jun 2023 17:46:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271262

--- Comment #9 from R. Christian McDonald <rcm@rcm.sh> ---
(In reply to Allan Jude from comment #8)
Allan,

Thanks for the reply. I'm pretty novice when it comes to low-level storage,
GEOM, CAM, etc...but I wanted to use this opportunity to learn something even
if MBR is indeed on the path to being removed :)

A few notes:

1. I tweaked bsdinstall/scripts/zfsboot to offset the first freebsd-zfs label
(the boot pool partition) by `-b 8` (4096 bytes). This at least preserves the
labels that were getting clobbered (noted earlier in this report).
2. After making the above tweak the /boot/mbr just sits at a blinking cursor,
and /boot/boot0 just prints a `#`...but it no longer says "Missing operating
system"
3. Booting back into the installer and breaking out into a shell, I confirm
bsdlabel is able to read /dev/ada0s1 without any issues. Without the tweak in
#1, this failed (again, as noted earlier in this report).
4. Also I reinstalled zfsboot using `dd if=/boot/zfsboot of=/dev/ada0s1
count=1`and `dd if=/boot/zfsboot of=/dev/ada0s1 skip=1 seek=1024`

After doing this I am able to boot.

-- 
You are receiving this mail because:
You are the assignee for the bug.