Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub2 on mdadm RAID 1 (and EFI)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
yarug
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 104

PostPosted: Tue Mar 10, 2015 8:07 am    Post subject: grub2 on mdadm RAID 1 (and EFI) Reply with quote

Hi everyone,

I'm in the process of installing Gentoo and want to utilize RAID 1 using mdadm. I'm following the handbook and http://www.gentoo.org//doc/en/gentoo-x86+raid+lvm2-quickinstall.xml.

The handbook uses Grub2, but the RAID guide still refers to old grub (1).

I have partitioned /dev/sda and /dev/sdb using parted as per the handbook:

1 grub bios_grub
2 boot
3 swap
4 rootfs

Then used mdadm to create a the RAID devices as per the RAID guide:

$ mknod /dev/md1 b 9 1
$ mknod /dev/md2 b 9 2
$ mknod /dev/md4 b 9 4

$ mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
$ mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2
$ mdadm --create /dev/md4 --level=1 --raid-devices=2 /dev/sda4 /dev/sdb4

Back to the handbook to install Grub2, the handbook says to emerge grub (done) and then to install Grub using grub2-install /dev/sda.

This is where I am not sure what to do. Install Grub to /dev/md1?

Many thanks,
Nes


Last edited by yarug on Mon Mar 23, 2015 11:14 am; edited 1 time in total
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2288
Location: near Augsburg, Germany

PostPosted: Sat Mar 14, 2015 7:16 pm    Post subject: Reply with quote

You may read through the Grub2 manual here: http://www.gnu.org/software/grub/manual/
Back to top
View user's profile Send private message
yarug
Tux's lil' helper
Tux's lil' helper


Joined: 01 Dec 2004
Posts: 104

PostPosted: Mon Mar 23, 2015 10:31 am    Post subject: Reply with quote

I've read all sorts of guides and forum threads now, but still can't sort this out. Doesn't help that my system utilizes (U)EFI so that adds another level of abstraction.

I've added GRUB_PLATFORMS="efi-64" to /etc/portage/make.conf before emerging grub.

My fstab looks as follows:

/dev/md2 /boot vfat noauto,noatime 0 2
/dev/sda3 none swap sw,pri=1 0 0
/dev/sdb3 none swap sw,pri=1 0 0
/dev/md4 / ext4 noatime 0 1

When installing grub I get the following error:

$ grub2-install --target=x86_64-efi
Installing for x86_64-efi platform.
grub2-install: error: cannot find EFI directory.

I'm just completely lost what the right approach is here. I've installed the system now 4 times but can't figure out what I need to do.

Any further pointers much appreciated.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Mon Mar 23, 2015 2:26 pm    Post subject: Reply with quote

I use old style RAID 1 for /boot (i.e. metadata 0.90 or 1.0) and then install Grub normally to both sda and sdb (or whatever your disks are).

This way, the bootloader doesn't need not be aware of RAID at all. Only the kernel...

You should not be specifying efi as a platform if you're not planning to use efi. I go with bios_grub myself, it works fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum