GPT and raidframe aware bootstrap
[email protected] (Emmanuel Dreyfus)
| Newsgroups | gmane.os.netbsd.ports.x86-64,gmane.os.netbsd.ports.i386 |
|---|---|
| Message-ID | <1oc2r0n.1amdk5uoqt2ylM%[email protected]> |
Hello After some frustration booting off raidframe based filesystem larger than 2 TB [1], I worked on x86 bootstrap to make it fully GPT and raidframe aware. The goal is to be able to boot off partitions defined by a GPT inside a RAID1 raidframe set. While there I added the ability to use raidframe device names and GPT label names in the bootstrap; with the idea that it helps making boot.cfg files that are stable when disks are added or removed. Here is the patch for review and feedback: ftp://ftp.netbsd.org/pub/NetBSD/misc/manu/raidgpt5.patch Here are a examples of dev command output on a few testing setups: 1) A raidframe with a GPT inside. raid9 appears in the available devices, and the GPT partition in contains appear with their label. One can boot NAME=root@raid8:/netbsd > dev disk hd0 size 1024 MB hd0a(4.2BSD) hd0e(RAID) disk fd0 fd0a disk fd1 fd1a raidframe raid9 serial 20190807 in hd0e size 535 MB NAME=root@raid8(NetBSD FFS) NAME=scratch@raid8(NetBSD FFS, bootme) default hd0e 2) A raidframe with a disklabel (no GPT), We support raid9a:/netbsd > dev disk hd0 size 1024 MB hd0e(RAID) disk fd0 fd0a disk fd1 fd1a raidframe raid9 serial 20190918 in hd0e size 1023 MB raid9a(4.2BSD) raid9b(swap) raid9e(4.2BSD) default hd0e 3) EFI boot with a GPT that has a raidframe partition and a GPT inside the raidframe. Here we can use boot NAME=root@qemu:/netbsd > dev disk hd0 mediaId 0 size 1024 MB NAME=efi@qemu(EFI System) NAME=ffs@qemu(NetBSD FFS) NAME=raid9@qemu(NetBSD RAID) raidframe raid9 serial 20190730 in NAME=raid9@qemu size 383 MB NAME=root@qemu(NetBSD FFS) NAME=scratch@qemu(NetBSD FFS, bootme) In the three examples, booting the RAID device itself is possible (boot hd0e or NAME=raid9@qemu in last example). This will use the first partition in the RAID, or the partition that has the bootme attribute. [1] http://mail-index.netbsd.org/netbsd-users/2019/07/25/msg023215.html -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz [email protected]