Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GPT+Grub2+RAID-1 Boot Problem
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
KayZee
Apprentice
Apprentice


Joined: 15 Oct 2003
Posts: 202
Location: Arlington, VA

PostPosted: Tue Jan 21, 2014 9:24 pm    Post subject: GPT+Grub2+RAID-1 Boot Problem Reply with quote

New install.
Using GPT partitions
RAID-1
Grub2 boot loader

After the install, rebooting shows a kernel panic

Code:
Kernel panic  - not syncing VFS: Unable to mount root fs on unknown-block (0,0)


The disk controller is
Code:
SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)

which is selected in the kernel.

blkid shows

Code:
livecd ~ # blkid
/dev/loop0: TYPE="squashfs"
/dev/sda1: PARTLABEL="grub" PARTUUID="9d0d8f4d-61ef-4558-9686-af5a4c9a9849"
/dev/sda2: UUID="06764aaa-5549-4744-cacf-3350fd6ade7f" UUID_SUB="3cc4d6a7-44bc-b387-6203-ba4c72cecf1a" LABEL="server:boot" TYPE="linux_raid_member" PARTLABEL="boot" PARTUUID="d1f865f6-1935-4710-ac89-47762a2dfdce"
/dev/sda3: UUID="d5223762-5e8c-6a63-f3e7-d454bac82a27" UUID_SUB="9c5aa2c1-5644-bf7e-972e-20c907c8f078" LABEL="server:root" TYPE="linux_raid_member" PARTLABEL="root" PARTUUID="fb7942b5-4ca6-420c-852b-cc00ae523cdd"
/dev/sda4: UUID="1690a92c-b1b4-3eed-464e-c63c383a1159" UUID_SUB="a7a56bea-b772-8cf2-3633-daa0477730dc" LABEL="server:swap" TYPE="linux_raid_member" PARTLABEL="swap" PARTUUID="4d977f34-ef1b-40ab-be07-1d01a2b4993b"
/dev/sda5: UUID="220dc311-24df-d2ae-9d47-04fb42b5e073" UUID_SUB="4e0d12d6-36f4-84f4-8cd2-d7666fdc2fd7" LABEL="server:data" TYPE="linux_raid_member" PARTLABEL="data" PARTUUID="85e9ad77-505c-4404-96b9-8cc60a781268"
/dev/sdb1: PARTLABEL="grub" PARTUUID="8d0ac7d9-eb50-40d3-a6a0-2ea7d8a9b47c"
/dev/sdb2: UUID="06764aaa-5549-4744-cacf-3350fd6ade7f" UUID_SUB="5d0ea9bf-ca17-42bc-68e4-450fccc45a51" LABEL="server:boot" TYPE="linux_raid_member" PARTLABEL="boot" PARTUUID="799ee18a-e7f4-4f12-adfb-a6b2eab2af90"
/dev/sdb3: UUID="d5223762-5e8c-6a63-f3e7-d454bac82a27" UUID_SUB="ca0512b0-6dd1-2285-9a0f-b9a39595cd3d" LABEL="server:root" TYPE="linux_raid_member" PARTLABEL="root" PARTUUID="349b8c7a-39fc-4f8d-b17e-2d479c08167f"
/dev/sdb4: UUID="1690a92c-b1b4-3eed-464e-c63c383a1159" UUID_SUB="d3ae8451-219d-de70-0ba2-fbe63779d1db" LABEL="server:swap" TYPE="linux_raid_member" PARTLABEL="swap" PARTUUID="42ff8a97-fcc3-4623-82ba-6ede347c5f7c"
/dev/sdb5: UUID="220dc311-24df-d2ae-9d47-04fb42b5e073" UUID_SUB="ee938495-be53-3c89-d04f-1310a54b7071" LABEL="server:data" TYPE="linux_raid_member" PARTLABEL="data" PARTUUID="9d198b51-4182-4407-b699-8c0a116559e6"
/dev/sr0: UUID="2013-12-26-08-09-54-00" LABEL="Gentoo Linux amd64 20131226" TYPE="iso9660" PTTYPE="dos"
/dev/md1: UUID="a844c641-2448-485d-b252-17d80305a1fd" TYPE="ext2"
/dev/md2: UUID="77ac6e5d-ecfe-43b6-a311-6fbeb20db6d9" TYPE="ext4"
/dev/md3: UUID="4a969955-6950-494d-9e55-c2800ce8b1db" TYPE="swap"
/dev/md4: UUID="26621c9c-073f-4648-be9b-65b544d2268a" TYPE="ext4"


In /etc/fstab
Code:


# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
UUID=a844c641-2448-485d-b252-17d80305a1fd               /boot           ext2            noauto,noatime  1 2
UUID=77ac6e5d-ecfe-43b6-a311-6fbeb20db6d9               /               ext4            noatime         0 1
UUID=4a969955-6950-494d-9e55-c2800ce8b1db               none            swap            sw              0 0
UUID=26621c9c-073f-4648-be9b-65b544d2268a               /data           ext4            noatime         0 0
/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0
/dev/fd0                /mnt/floppy     auto            noauto          0 0


where the UUID corresponds to the /dev/md device shown in blkid.

When Grub starts I went into the editor it see what is doing.


Code:
setparms 'Gentoo GNU/Linux, with Linux 3.10.25-gentoo'

      load_video
      insmod gizo
      insmod part_gpt
      insmod part_gpt
      insmod diskfilter
      insmod mdraid1x
      insmod ext2
      set root="mduuid=/06764aaa-5549-4744-cacf-3350fd6ade7f"
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint='mduuid=/06764aaa-5549-4744-cacf-3350fd6ade7f'  a844c641-2448-485d-b252-17d80305a1fd
      else
        search --no-floppy --fs-uuid --set=root a844c641-2448-485d-b252-17d80305a1fd
      fi
      echo   'Loading Linux 3.10.25-gentoo ...'
      linux   /kernel-3.10.25-gentoo root=/dev/md2 ro



I did run
Code:
grub2-install /dev/sda
grub2-install /dev/sdb
grub2-mkconfig -o /boot/grub/grub.cfg


so grub2 should be installed on both disks.

--Karl
Back to top
View user's profile Send private message
hydrapolic
Tux's lil' helper
Tux's lil' helper


Joined: 07 Feb 2008
Posts: 126

PostPosted: Thu Jan 23, 2014 6:32 am    Post subject: Reply with quote

I have a similar setup - boot and root are created with mdadm metadata version 0.90 and then the kernel assembles those drives.

/etc/default/grub
GRUB_CMDLINE_LINUX="md=1,/dev/sda1,/dev/sdb1 md=2,/dev/sda2,/dev/sdb2 ..."
Back to top
View user's profile Send private message
hydrapolic
Tux's lil' helper
Tux's lil' helper


Joined: 07 Feb 2008
Posts: 126

PostPosted: Thu Jan 23, 2014 6:35 am    Post subject: Reply with quote

Or another approach:

# man mdadm

Code:

       --auto-detect
              Request that the kernel starts any auto-detected arrays.  This can only work if md is compiled into
              the kernel -- not if it is a module.  Arrays can be auto-detected by the kernel if all  the  compo-
              nents are in primary MS-DOS partitions with partition type FD, and all use v0.90 metadata.  In-ker-
              nel autodetect is not recommended for new installations.  Using mdadm to detect and assemble arrays
              -- possibly in an initrd -- is substantially more flexible and should be preferred.


So maybe try creating and initrd (with genkernel for example) and let it assemble your drives.
Back to top
View user's profile Send private message
KayZee
Apprentice
Apprentice


Joined: 15 Oct 2003
Posts: 202
Location: Arlington, VA

PostPosted: Thu Jan 23, 2014 10:19 pm    Post subject: Reply with quote

/boot seems to be found as the the kernel starts to execute. But then looks like it wants files from / and everything stops.

I have metadata=1.2 on /boot and /

That may be my problem. I am going to re-create the arrays using metadata=0.90. I will report back on results.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Thu Jan 23, 2014 11:05 pm    Post subject: Reply with quote

KayZee,

/boot is read by grub. The bootlaoder has to make its own arrangements for this as the kernel and all of userspace are still on disc when it runs.

How do you assemble the root raid set before the kernel tries to use it?
This normally requires mdadm in an initramfs
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Thu Jan 23, 2014 11:34 pm    Post subject: Reply with quote

0.90 metadata is fine for /boot, but you really don't want it for anything else anymore. It doesn't support large disks (2TB) and has like a ton of other issues (confusing partitions with whole disks if the partition reaches the end of the disk).

mdadm in initramfs is the best option, you need an /etc{/mdadm}/mdadm.conf that tells it which device names to use for which array (mdadm --detail --scan, leave out NAME= or whatever, just keep UUID=)

Code:
MAILADDR your@mail

ARRAY /dev/md0 UUID=d8b8b4e5:e47b2e45:2093cd36:f654020d
ARRAY /dev/md1 UUID=845b2454:42a319ef:6ec5238a:358c365b
ARRAY /dev/md2 UUID=23cf90d2:c05d720e:e72e178d:414a8128
...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Jan 25, 2014 10:41 am    Post subject: Reply with quote

frostschutz,

With grub2, 0.90 metadata on /boot is no longer required.

I hard code my raid UUIDs into the initramfs init script but I agree an /etc{/mdadm}/mdadm.conf is a better solution as it makes the initramfs init script generic.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sat Jan 25, 2014 12:39 pm    Post subject: Reply with quote

Yes, with grub2. But you can still use 0.90 for a /boot partition; /boot is where it doesn't matter, and it gives you the option to use any other bootloader.

A static mdadm.conf in initramfs is just as hardcoded as anything else. Putting the UUIDs in the init script itself would be weird. But hey, whatever works.
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