This time I've made more careful investigation and documentation of the whole process
TLDR: boot(8) says that only RAID1 is supported for boot, I've tried to setup it following the same procedure as I was following with RAID0, but failed on boot attempt. I don't think I will continue with RAID1, since the goal was to have a stripe. But also if there's any way to have RAID0 for most of the system and essential for booting stuff outside of it (something similar to /boot on linux, i guess), it would really great.
Also, the commands I was using:
# Make EFI partition
gpt create wd0
gpt add -a 2m -s 512m -t efi -l "EFI System" wd0
newfs_msdos /dev/rdk0
mount -t msdos /dev/dk0 /mnt
mkdir -p /mnt/EFI/boot
cp -v /usr/mdec/*.efi /mnt/EFI/boot
umount /mnt
# Configure RAID
gpt add -a 2m -s 4g -t raid wd0
gpt add -a 2m -s 4g -t raid wd0
raidctl -vC /tmp/raid.conf raid0
raidctl -vI "$(date +%Y%m%d)01" raid0
raidctl -vi raid0
raidctl -vA forceroot raid0
And /tmp/raid.conf contents:
START array
2 0
START disks
/dev/dk1
/dev/dk2
START layout
# Swapped last column for 0 when was doing RAID0
128 1 1 1
START queue
fifo 100
More detailed story of this fail
I've made EFI partition and copied the EFI files to it.
Made RAID0 manually, then proceeded with install using installer and choosing RAID as disk for installation this time, rather than using wedges like in my previous attempts.
When asked for partitions, I've choose default NetBSD partition sizes. Although it includes making EFI and swap partitions besides just root, I didn't removed them and decided to go one step at a time. The installation finished and I've rebooted as usual.
When loaded the bootloader, I wasn't able to get further, even although I was able to check the raid0 drive with corresponding partitions is present with dev
command.
I've tried using ls or boot on appropriate (and not only) partitions (ls raid0b:netbsd
, boot raid0b:netbsd
), and always was given the warning about file that doesn't exists, besides EFI partitions, where I've got warning about currently unsupported msdos filesystem or something like that.
I've also checked boot(8) manpage and noticed that only RAID1 is currently supported for boot device.
That's about a time I should've done that 🙂
Once again, but with RAID1
So the next step was to reproduce all the setup but now using RAID1, to at least confirm that I at least can do that and the whole plan wasn't totally useless (although the initial goal was to make a stripe/raid0, so I guess it's already failed).
I was able to use ls command on the same partitions I've had errors with RAID0 (ls raid0b:/
), and even boot and see all the beautiful green messages, with one exception that it fails to execute /sbin/init.