2

I have a Dell Optiplex for which I purchased four 4TB disks. I am trying to install Debian 10 on this machine. I'm hitting a wall when it comes to installing GRUB. I get vague error at this point of the installation:

Executing 'grub-install /dev/sda' failed.

This is a fatal error.

This is my first time trying to install Debian on a RAID array. In the past, I have only done single-disk installs.

All four disks are connected to a PCIe RAID controller. The controller is compatible with the Linux kernel and I am able to see and partition the drives no problem. When I get to the partitioning stage, I am presented with four empty disks. I do the following (at this point all disks have no partitions):

  • Manual
  • Configure software RAID
  • Create MD device:
    • RAID 5
    • active devices = 4
    • spare devices = 0
    • partitions = sda, sdb, sdc, sde

At this point my partitions look like this:

partition table figure 0 partition table figure 1

  • RAID5 device #0 - 12TB software RAID
    • #1 - 12TB
  • SCSI1, sda - 4TB
    • 1MB FREE SPACE
    • #1 - 4TB K raid
    • 859.6 kB FREE SPACE
  • SCSI1, sdb - 4TB
    • 1MB FREE SPACE
    • #1 - 4TB K raid
    • 859.6 kB FREE SPACE
  • SCSI1, sdc - 4TB
    • 1MB FREE SPACE
    • #1 - 4TB K raid
    • 859.6 kB FREE SPACE
  • SCSI1, sde - 4TB
    • 1MB FREE SPACE
    • #1 - 4TB K raid
    • 859.6 kB FREE SPACE

Next, I select: guided partitioning > guided - use entire disk > RAID5 device #0 > All files in one partition. The partitions now look like this:

partition table figure 2 partition table figure 3

  • RAID5 device #0 - 12TB software RAID
    • #1 - 1MB K biosgrub
    • #2 - 12TB f ext4 /
    • #3 - 17.1GB f swap swap
  • SCSI1, sda - 4TB
    • 1MB FREE SPACE
    • #1 - 4TB K raid
    • 859.6 kB FREE SPACE
  • SCSI1, sdb - 4TB
    • 1MB FREE SPACE
    • #1 - 4TB K raid
    • 859.6 kB FREE SPACE
  • SCSI1, sdc - 4TB
    • 1MB FREE SPACE
    • #1 - 4TB K raid
    • 859.6 kB FREE SPACE
  • SCSI1, sde - 4TB
    • 1MB FREE SPACE
    • #1 - 4TB K raid
    • 859.6 kB FREE SPACE

At this point, I select "finish partitioning and write the changes to disk". The installer then proceeds unpacking and installing software, which seems to go fine. When it is time to install GRUB I selected sda, and this fails. I have also tried selecting sdb and manually entering /dev/md as GRUB installation locations. These have also failed.

At this point I suspect I am not partitioning things correctly. I have searched around the web and I have found several articles and blogs with guides but none are focused on RAID5. I read them anyway looking for useful information but found nothing.

enter image description here

0

2 Answers 2

2

Move the BIOSGRUB flag from inside the RAID5 partition to the otherwise-spare /dev/sdX1 "free space" partition on each physical disk. You can then install grub on all four disks.

4
  • In between posting and seeing your answer, I took another shot-in-the-dark and attempted a partition scheme that did wind up working. It is almost the same as you suggested but I only created 1 biosgrub partiton on sda and that's it. Computer doesn't seem to mind as it will boot now. But now you've got me thinking - why install grub on every disk if installing on the first disk is sufficient? Commented Aug 7, 2020 at 23:28
  • @PatMcTookis let me push that back - why are you using RAID? What are you protecting against? Commented Aug 8, 2020 at 8:18
  • I am using this machine as a home file/media server. Seemed like a good reason to use RAID, i thought. @roaima Commented Aug 9, 2020 at 18:45
  • I was trying to get you to remember that RAID helps protect against a disk failure. If you put grub only on one disk and that disk fails you've an unbootable system. Put it on all four of your disks and something will let you boot Commented Aug 9, 2020 at 21:08
2

I suspect I am not partitioning things correctly.

You created partitions inside the RAID device, which is possible but unusual. Consider using LVM instead, or a filesystem that provides its own volume logic, or create more partitions for multiple separate RAID devices to be used directly as root, home, swap.

The "biosgrub" partition inside the RAID5 device can not possibly work as intended. It's invisible to the BIOS/UEFI which doesn't support MD-RAID. For this partition to make any sense, it has to be on disk directly.

Basically you have confused the installer in this case. It tries to treat the RAID5 like a regular disk when it's a bit more involved than that (for the bootloader in any case) and so the installation fails.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .