Mailinglist Archive: opensuse (1620 mails)

< Previous Next >
Re: [opensuse] grub2 installation onto mdraid raid device
Andrei Borzenkov írta:
В Wed, 12 Nov 2014 17:01:11 +0100 (CET)
Istvan Gabor пишет:

Istvan Gabor írta:

Here is what I would like to do:
<I have a system with two linux OSs, both are installed on mdraid raid1. I
would like to install grub2 on the root partitions/devices of the given
OSs, and a grub2 on MBR. The MBR grub2 would only chainload the other grub2
on the root partition. Is this possible, how?


Looking at it second time - why would you want it? What are you trying to
achieve? At >the end grub-install does exactly the same - it installs
mini-bootloader in MBR that >chainloads full grub from Linux MD boot partition.

Thanks. Here is what I would lie to achieve:

Previously, when I used lilo or grub 1/legacy I always installed the boot
loader for the given OS on the root device of the OS. I installed another
instance of the boot loader on MBR. This boot loader only linked/loaded the
other boot loader on the root device. I lie this approach to make clear
separations of different OSs. The mbr boot loader only list major types of OSs
I can select. Eg:

openSUSE 12.2
openSUSE 12.1
openSUSE 11.2
Gentoo
Windows XP
Windows 2000

Here I select the major flavor. In the second boat loader I can select
different options too. Eg in case of openSUSE 11.2:

openSUSE 11.2 default
openSUSE 11.2 pae
openSUSE 11.2 custom kernel

I don't want to put all different options in one menu/boot loader.

It is also easier to dd the OS partitoin if the boot options/boat loader on the
root partition.

Please note that the above menu points are only examples. I did similar thing
previously with lilo and grub legacy on non-raid devices.

I would like to know how to make similar structure using grub2 and on mdraid
raid devices.



Not really. grub2 does not support installation of core.img on Linux MD
device. What is possible is to build core.img but not install it as
first stage (grub2-install --no-bootsector) and build special core.img
that will load and boot directly another /boot/grub2/i386-pc/core.img
from Linux MD and use it as first stage loader. I'm not sure if either
is directly supported by YaST. If you are interested to do it
manually, I could explain how.

Thanks, Andrei. Yes, please, am interested. I also would like to know what
is the correct method to install grub2 on the raid MBR. I read that I should
install it on the devices that form the array, eg: grub-install /dev/sda,
grub-install /dev/sdb. But I am not sure if this method is current or
obsolete. And what is the case when I have partition arrays and not the
whole disks are arranged to form the array? Eg. /dev/sda1 and /dev/sdb1
forms /dev/md0 etc.


To install grub2 in raid MBR you simply run

grub2-install /dev/sda
grub2-install /dev/sdb

assuming your /boot is on mdXX=(sda1,sdb1) (or any other
partitions on these disks). That is what YaST does anyway.

So again - what are you trying to accomplish?

I wanted to know this only for setting up my system until figuring out how to
do what I wanted originally, see above.

Thanks again,

Istvan
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References