Talk:GRUB/Advanced storage

From Gentoo Wiki
Jump to:navigation Jump to:search
Before creating a discussion or leaving a comment, please read about using talk pages. To create a new discussion, click here. Comments on an existing discussion should be signed using ~~~~:
A comment [[User:Larry|Larry]] 13:52, 13 May 2024 (UTC)
: A reply [[User:Sally|Sally]] 19:27, 14 July 2024 (UTC)
:: Your reply ~~~~

Booting from RAID Array

Talk status
This discussion is still ongoing.

This section is all wrong. There is no (more) in /boot/grub2 directory, nor 'grub2-mkdevicemap' command in grub2. The article confuses the MD raid UUID with the filesystem UUID.As far as I know (and I just finished installing 2 such systems) grub2 "just worksTM" with MD raid on linux. Can I go on and delete the section and restart it from scratch?

I have to disagree, loading a root partition from an mdadm device did not "Just Work". For one, the mentioned module ("insmod raid") seems to be missing;
user $find /boot/grub | grep raid
I could not boot without an initramfs even though both device-mapper (with correct raid levels) and lvm are compiled-in. --Tox2ik (talk) 22:28, 31 January 2014 (UTC)

I agree that the section is wrong. First of all, the genkernel can be used, just have to --menuconfig or something, and enable that CONFIG_FHANDLE (and btw, it can all be done in a single call genkernel --mdadm --install --disklabel all, if you're not using /etc/genkernel.conf to permanently configure mdadm and such for future updates of the kernel. Second, mdadm should be merged first, as noted, yes, but grub2-mkconfig picks up the correct setup automatically. It inserts the insmods correctly and applies the correct md device UUID for root -- assuming the chroot has been set up that way and / (root) points to the md device to boot the root from. The only thing I had to do was to add domdadm to the GRUB_CMDLINE_LINUX variable. --Gruexyz (talk) 14:22, 26 February 2015 (UTC)

As the person who wrote this section, I'm quite happy for it to be rewritten, IF the rewrite is correct. Just a couple of points:

1) - initramfs - it isn't needed for SOME mdraid versions. The early versions placed the metadata at the END of the partition, so you don't need an initramfs to boot. Later versions - metadata 1.2, maybe 1.0, placed the metadata at the START of the partition, and without an initramfs, the kernel won't be able to find the root partition. Look at where I explain what insmod raidxx do.

2) - genkernel - it says why you shouldn't use genkernel - has that been fixed? That said I think, with hindsight, part of my trouble was down to a buggy mdadm.

3) - Please note that the reason I deliberately have a faulty grub boot section still applies. My root partition is NOT VISIBLE FROM USER SPACE after a normal boot and, iirc, running grub2-mkconfig will break the boot such that I need to boot from a rescue CD to recover. Any updates to my kernels etc have to be done as editor mods to grub.cfg, or by going via the broken boot config before I can safely run grub2-mkconfig. Don't ask me why - I've torn my hair out trying to debug it :-) so it is NOT a simple plug-n-play operation, my other system - with an apparently identical config - doesn't give me any trouble at all, but this situation has persisted over several kernel upgrades on both systems. The only real difference is that the working system is linux-only, the dodgy system has Vista on hda.

(The last couple of paras before the LUKS sections (basically the two notes and the two or so lines after them) are not mine and were copied from the version before that. I know it's a bit of a mess but I didn't want to delete somebody else's hard-won knowledge when I didn't have a clue about it. Same as I'd like somebody to benefit from my hard-won knowledge :-) It would be nice to have a definitive article, but it needs to be an article that works :-)


— The preceding undated comment was added by Wol (talkcontribs) 26 February 2015