[Top][All Lists]

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

Re: grub.cfg for RAID devices

From: Stéphane Delaunay
Subject: Re: grub.cfg for RAID devices
Date: Wed, 15 Sep 2021 09:48:02 +0000

Hello Pascal,

on Tuesday, September 14th, 2021 at 9:39 PM, Pascal Hambourg 
<> wrote:
> Is there a /grub/grub.cfg file in the boot RAID array ?

There indeed isn't one. I had opted-out of installing a bootloader, because 
GRUB was already there and I don't know how to mirror it onto the second drive 

The /boot-partition currently only contains the kernel/init files.

Pascal Hambourg <> wrote:
>> It is also unable to read the boot partitions by themselves
>> for an "error: unknown filesystem."
> What do you mean exactly by "read by themselves" ?

What I meant was that I couldn't access the RAID partition by reading any 
(ahciX,msdosX) partition, because it would give that error. However, this does 
not seem to be important and is probably just normal behavior, because they 
were formatted in that way.

Pascal Hambourg <> wrote:
> You must pass root=/dev/mapper/rootvgname-rootlvname

You were right, the root-parameter was my initial issue. I don't know what I 
had entered, but with the correct partition, I was able to boot into the system.

In my case, this was "root=/dev/mapper/md1_crypt", because I did not set up 
LVM. I just have one root partition and a swapfile inside and saw no use.

Unfortunately, even after adding "insmod mdraid1x" to the config I had, the 
default boot option would not find the md-devices, so I added my own:

menuentry 'Boot Internal'{
    set root=md1_crypt
    linux (md/0)/vmlinuz-* root=/dev/mapper/md1_crypt
    initrd (md/0)/initrd.img-*

This setup automatically boots my system now and even survives a drive failure 
(even though cryptsetup is upset for a bit when I remove one of the drives).

What I am unappy with is the wildcard for the kernel and initrd files. It does 
work right now, but I don't know what happens after a kernel update.

Is there a more elegant way to improve this?

Or is there maybe a config file that already accounts for this case somewhere? 
I couldn't find any that even automatically load the mdraid-drivers.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]