[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Disk setup to boot both RAID1 disks



Le 11/05/2019 à 12:18, Rory Campbell-Lange a écrit :
I wish to configure a server with two SATA connected SSD disks in
software RAID1.

I'm not sure how best to configure the disks for boot, particularly in
UEFI boot mode, to ensure that /dev/sdb can be booted if (for example)
/dev/sda fails.

I have been configuring each disk as follows:

Device     Boot ...   Size Id Type
/dev/sdb1  *    ...   476M ef EFI (FAT-12/16/32)
/dev/sdb2       ... 119.2G  5 Extended
/dev/sdb5       ...   953M fd Linux raid autodetect -> /md0 (/boot)
/dev/sdb6       ...   1.9G fd Linux raid autodetect -> /md1 (swap)
/dev/sdb7       ...   4.7G fd Linux raid autodetect -> /md2 (/tmp)
/dev/sdb8       ... 111.8G fd Linux raid autodetect -> /md3 (/)

For EFI boot, I would have chosen GPT instead of DOS/MBR.
Some broken UEFI firmwares won't boot from DOS/MBR.

I would also have used LVM for anything but /boot and left some free space in the volume group for future unforeseen needs. Actually even /boot can be on LVM, but it is a bit less safe. Managing logical volumes is easier than RAID arrays.

I have the following questions:

* is it advisable to have a separate EFI boot partition and separate
   /boot,

Yes.

or are they effectively the same thing?

Not in Debian. The EFI partition is mounted on /boot/efi and must be FAT. /boot on FAT may cause trouble when installing or upgrading a kernel.

* is there any benefit at all to having UEFI booting on a pure Linux
   server?

Not to my knowledge.

* is there a way to ensure that if there is a grub or kernel upgrade
   that grub-install will operate on both /dev/sda and /dev/sdb?

A kernel upgrade does not run grub-install, only update-grub.
I think it is possible with grub-pc (GRUB for BIOS) if both locations have been registered with dpkg-reconfigure.

I do not think it is possible with grub-efi-* because only one EFI partition can be mounted on /boot/efi and you cannot register another location. GRUB upgrades are not so frequent, so you can do it manually when that happens. But it has caveats. By default grub-install creates an EFI boot entry labelled "debian", and replace any boot entry with the same label. So you must use the --bootloader-id option to force a different label for the second EFI partition, or --no-nvram to not update EFI boot variables and use efibootmrg to create a custom boot entry.

My method of choice would be to install GRUB in the "removable path" location of each EFI partition with the --removable option because it does not need to register EFI boot entries. But I have observed an UEFI firmware (the same which requires GPT for EFI boot) which ignores the removable path location if an EFI boot entry pointing to the same disk exists (even though not functional) so beware. Actually the most difficult part is to work around the UEFI firmware bugs.


Reply to: