On Mon, Oct 23, 2023 at 11:04:07AM +0000, Klemens Nanni wrote: > 10/16/23 04:02, Klemens Nanni ??????????: > > The current check implies one could use, e.g. SWAP or MSDOS partitions > > as softraid(4) chunks, but sys/dev/softraid.c always expects FS_RAID, > > thus using chunks with different partition types is not possible: > > > > # vmctl create -s100M disk.img > > # vnd=`vnconfig disk.img` > > # echo 'swap *' | disklabel -wAT- vnd0 > > > > # disklabel $vnd | grep swap > > a: 204800 0 swap > > # bioctl -c c -l ${vnd}a softraid0 > > softraid0: invalid metadata format > > > > Correct the check. > > I don't expect this to break anything. > > amd64 biosboot boots off standard RAID 'a' as before. > > > > Feedback? Objection? OK? > > Ping.
This breaks booting off of a RAID that is not on partition 'a', on amd64. Was this intentional? For example, if you have a RAID on 'd', with no 'a' partition at all, then with your patch the machine becomes unbootable. The second stage bootloader doesn't automatically find the softraid volume. Manually booting the kernel from it results in a kernel panic when the kernel can't find the root filesystem. Although booting from a RAID on a non-'a' partition is not supported on all archs, it has worked fine on amd64 for a long time, so it's quite possible that people have machines deployed that boot from other RAID partitions. This change would unexpectedly break them, and it would potentially be quite painful for any users who upgrade to 7.5 and find out afterwards that their machine doesn't boot, because the work-around would likely be to boot the ramdisk kernel, and unpack mdec/boot from the base package of the previous release then re-run installboot specifying the old mdec/boot. That wouldn't be at all obvious to users without a lot of OpenBSD experience.