help-grub
[Top][All Lists]
Advanced

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

Re: Grub2 and and mdraid


From: Andrei Borzenkov
Subject: Re: Grub2 and and mdraid
Date: Thu, 1 Oct 2015 10:02:57 +0300

On Wed, Sep 30, 2015 at 3:04 PM, Patrick Begou
<address@hidden> wrote:
> Hi,
>
> for a while now I'm trying to set up grub to boot on a md array without any
> success.

What is grub version?

>                The system is actualy runing with:
> /dev/sda2 mounted on /boot
> /dev/sda3 a physical volume and /dev/mapper/pve-root mounted on /root
> (proxmox distribution)
>
> I've added a second disk /dev/sdc to move to a RAID1 config.
>
> /dev/sdc2 is part of a degraded raid1 array /dev/md2  and /dev/md2 is an
> ext4 filesystem for /boot
> /dev/sdc3 is part of a degraded raid1 array /dev/md3  and /dev/md3 is a lvm
> physical volume.
> On dev/md3 there is a logical volume /dev/mapper/pveraid-root, with ext4
> filesystem to mount as /
>
> System has been copied from sda to sdc.
>
> I try to set-up grub with:
>
> mount /dev/md2 /mnt/boot
> mount /dev/pveraid/root /mnt/root
> cp -dpRx / /mnt/root
> cp -dpRx /boot/* /mnt/boot
> update-grub  -o /mnt/boot/grub/grub.cfg
> grub-install --no-floppy --modules="biosdisk raid mdraid1x ext2 part_msdos
> part_gpt"

Why do you attempt to outsmart grub-install? It exists exactly to
detect and include in core.img all required modules as well as set
suitable prefix. If it fails to do it, it is a bug.

> --boot-directory=/mnt/boot --recheck /dev/sdc

--recheck is pretty useless, IIRC the only thing it does is to delete
device.map.

>
> I've added a menu /etc/grub.d/09_swraid1_setup to try to boot /dev/sdc using

It is irrelevant, according to your description grub is never as far
as even reading grub.cfg. Let's fix it first. Does plain grub-install
--boot-directory=/mnt/boot /dev/sdc work?

> the uuids as described in
> http://unix.stackexchange.com/questions/196212/required-grub-modules-for-booting-on-mdadm-raid1
> #!/bin/sh
> exec tail -n +3 $0
> # This file provides an easy way to add custom menu entries.  Simply type
> the
> # menu entries you want to add after this comment.  Be careful not to change
> # the 'exec tail' line above.
> menuentry 'proxmox with RAID1' --class proxmox --class gnu-linux --class gnu
> --class os {
>   load_video
>   set root=(mduuid/c65cfbac-c874-4d3b-9b43-47e9d539db35)
>   echo 'Loading Proxmox with RAID...'
>   linux /vmlinuz-2.6.32-32-pve root=64342e2a-867b-421a-b5e1-062558c782f0 ro
> quiet
>   echo 'Loading initial ramdisk...'
>   initrd /initrd.img-2.6.32-32-pve
> }
>
> Or without the UUIDs as discribed in
> https://www.howtoforge.com/how-to-set-up-software-raid1-on-a-running-system-incl-grub2-configuration-debian-squeeze-p2
> #!/bin/sh
> exec tail -n +3 $0
> # This file provides an easy way to add custom menu entries.  Simply type
> the
> # menu entries you want to add after this comment.  Be careful not to change
> # the 'exec tail' line above.
> menuentry 'proxmox with RAID1' --class proxmox --class gnu-linux --class gnu
> --class os {
>   load_video
>   insmod raid
>   insmod raid1
>   insmod mdraid
>   insmod part_msdos
>   insmod ext2
>   set root='(md/2)'
>   echo 'Loading Proxmox with RAID...'
>   linux /vmlinuz-2.6.32-32-pve root=/dev/mapper/pveraid-root ro quiet
>   echo 'Loading initial ramdisk...'
>   initrd /initrd.img-2.6.32-32-pve
> }
>
>
> But every time I get in the a rescue shell, saying the disk is not found. In
> the "ls" command of the rescue shell no md devices seams available.
>
> When I try to boot on the raid config, I set /dev/hdc to be the first in the
> device order at boot time via the bios.
>
> I can of course restart the server on /dev/sda  to keep it runing.
>
> I do not find any help in the grub2 manual nor on the web, just an old
> discussion (2013) on a problem with degraded arrays...
>
> Thanks for your advices
>
> Patrick
>
>
>
> --
> ===================================================================
> |  Equipe M.O.S.T.         |                                      |
> |  Patrick BEGOU           | mailto:address@hidden |
> |  LEGI                    |                                      |
> |  BP 53 X                 | Tel 04 76 82 51 35                   |
> |  38041 GRENOBLE CEDEX    | Fax 04 76 82 52 71                   |
> ===================================================================
>
>
> _______________________________________________
> Help-grub mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-grub



reply via email to

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