Skip to contentSkip to conversation

Grub2/raid quickie ...

DISCUSSION Wols Lists 3 participants 3 messages Oct 30, 2014 MD RAID

lore
Share & tools
lore

Wols Lists

author
#0 lore raw

After my last shenanigans, I've now got my main system booting successfully from a raid / partition. HOWEVER.

I'm somewhat puzzled by grub.cfg, and this is in part behind why my dev system won't boot raid properly, I think. Grub uses two different UUIDs!?!?

One of them, (mduuid/...) is dead easy to find, "mdadm -D" gives the md uuid of the array. But the other one, the "root=UUID=...", I'm damned if I can find that id anywhere! Does anyone know a command, that will tell me what that id is, so I can fix grub.cfg on my development system?

(As an aside, how do I retrospectively force a name onto an array so that I can guarantee it will be called /dev/md100, or /dev/mdhome, or whatever? I daren't use the /dev/mdxxx name at the moment, because they change and the result is a system that fails to boot, or is unusable, or some other malarkey. Dead easy for me to fix, but my wife will go spare!)

Cheers,
Wol

#1 lore raw
Quoted 10 lines · On Thu, 30 Oct 2014 00:08:43 +0000 Wols Lists <[email protected]> wrote:

After my last shenanigans, I've now got my main system booting successfully from a raid / partition. HOWEVER.

I'm somewhat puzzled by grub.cfg, and this is in part behind why my dev system won't boot raid properly, I think. Grub uses two different UUIDs!?!?

One of them, (mduuid/...) is dead easy to find, "mdadm -D" gives the md uuid of the array. But the other one, the "root=UUID=...", I'm damned if I can find that id anywhere! Does anyone know a command, that will tell me what that id is, so I can fix grub.cfg on my development system?

blkid /dev/whatever

Quoted 6 lines

(As an aside, how do I retrospectively force a name onto an array so that I can guarantee it will be called /dev/md100, or /dev/mdhome, or whatever? I daren't use the /dev/mdxxx name at the moment, because they change and the result is a system that fails to boot, or is unusable, or some other malarkey. Dead easy for me to fix, but my wife will go spare!)

mdadm --assemble /dev/mdhome --update=name list-of-devices

You cannot do this without stopping the array, sorry. Boot off a usb or CD is necessary.

NeilBrown

Quoted 7 lines

Cheers,
Wol
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to Wols Lists
Quoted 3 lines · Wols Lists

But the other one, the "root=UUID=...", I'm damned if
I can find that id anywhere! Does anyone know a command, that will tell me what that id is, so I can fix grub.cfg on my development system?

blkid

The UUID being referenced by grub-mkconfig is the first UUID reported by blkid, which is the filesystem volume UUID. It's not the same thing as the partition UUID found on GPT disks (a.k.a. unique partition GUID).

Quoted 6 lines

(As an aside, how do I retrospectively force a name onto an array so that I can guarantee it will be called /dev/md100, or /dev/mdhome, or whatever? I daren't use the /dev/mdxxx name at the moment, because they change and the result is a system that fails to boot, or is unusable, or some other malarkey. Dead easy for me to fix, but my wife will go spare!)

Pretty sure that goes in mdadm.conf and then you need to rebuild the initramfs since that mdadm.conf gets pulled in and referenced during early boot. Or I'm 100% wrong, and hopefully someone else says what's correct.

Chris Murphy