View previous topic :: View next topic |
Author |
Message |
Frautoincnam Guru
Joined: 19 May 2017 Posts: 330
|
Posted: Thu Dec 19, 2024 8:36 pm Post subject: grub2 boot MBR and raid error [solved] |
|
|
[solution below]
Hi,
I am seeking your help because I can't figure this out on my own.
I have a computer running Gentoo for many years, working perfectly, with a software RAID 1 setup. It has six partitions on each disk (MBR), each configured as a RAID array.
The first partition on each disk is a boot partition, in ext2, and the rest are in ext4.
Code: | /etc/mdadm.conf:
DEVICE /dev/sd[ab][123567]
ARRAY /dev/md123 metadata=0.90 UUID=f3a1266a:b8a3d1c0:58f2f8e7:254eabdb
ARRAY /dev/md122 metadata=0.90 UUID=b98a2770:1b208d6e:58f2f8e7:254eabdb
ARRAY /dev/md125 metadata=0.90 UUID=526e6df9:9f1fd15b:58f2f8e7:254eabdb
ARRAY /dev/md124 metadata=0.90 UUID=0627d9a2:9b8f1319:58f2f8e7:254eabdb
ARRAY /dev/md126 metadata=0.90 UUID=60e93244:ca06e195:58f2f8e7:254eabdb
ARRAY /dev/md127 metadata=0.90 UUID=87af9f2a:1ad04950:58f2f8e7:254eabdb |
Code: | /etc/fstab:
/dev/md123 /boot ext2 noauto,noatime 1 2
/dev/md122 / ext4 noatime,acl,user_xattr 0 1
/dev/md125 none swap sw 0 0
/dev/md124 /tmp ext4 nodev,noexec 1 2
/dev/md126 /home ext4 noatime,acl,usrquota 1 2
/dev/md127 /var ext4 noatime,acl,user_xattr 1 2 |
Code: | /boot/grub/grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/b98a27701b208d6e58f2f8e7254eabdb'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/b98a27701b208d6e58f2f8e7254eabdb' 4242e078-8721-49cc-b7c4-78ad222b0e13
else
search --no-floppy --fs-uuid --set=root 4242e078-8721-49cc-b7c4-78ad222b0e13
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=1600x1200x32
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=fr_FR
insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4242e078-8721-49cc-b7c4-78ad222b0e13' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
else
search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
fi
echo 'Chargement de Linux 6.6.62-gentoo…'
linux /vmlinuz-6.6.62-gentoo root=/dev/md122 ro irqpoll fbcon=nodefer
}
submenu 'Options avancées pour Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-4242e078-8721-49cc-b7c4-78ad222b0e13' {
menuentry 'Gentoo GNU/Linux, avec Linux 6.6.62-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.62-gentoo-advanced-4242e078-8721-49cc-b7c4-78ad222b0e13' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
else
search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
fi
echo 'Chargement de Linux 6.6.62-gentoo…'
linux /vmlinuz-6.6.62-gentoo root=/dev/md122 ro irqpoll fbcon=nodefer
}
menuentry 'Gentoo GNU/Linux, avec Linux 6.6.62-gentoo (mode de dépannage)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.62-gentoo-recovery-4242e078-8721-49cc-b7c4-78ad222b0e13' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
else
search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
fi
echo 'Chargement de Linux 6.6.62-gentoo…'
linux /vmlinuz-6.6.62-gentoo root=/dev/md122 ro single
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
insmod bli
fi
### END /etc/grub.d/25_bli ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
fi
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/39_memtest86+ ###
submenu 'Memtest86+' {
if [ "x$grub_platform" = xpc ]; then
menuentry 'Memtest86+ 64bit' {
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
else
search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
fi
linux "/memtest86plus/memtest64.bios"
}
fi
if [ "x$grub_platform" = xefi ]; then
menuentry 'Memtest86+ 64bit UEFI' {
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid09
insmod ext2
set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
else
search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
fi
chainloader "/memtest86plus/memtest.efi64"
}
fi
}
### END /etc/grub.d/39_memtest86+ ###
### BEGIN /etc/grub.d/40_custom ###
# 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.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ### |
Everything was working perfectly.
However, as the usage of this computer has completely changed, I wanted to reconsider the partitioning. I aimed to have only a single partition, including boot, without separate /var, /home, and /tmp, and no swap.
So, I booted into the Gentoo live CD (in Legacy BIOS mode) and played with the partitions until I ended up breaking everything.
But that's not a problem since I obviously have backups of everything.
I then:
- deleted everything
- created a single partition per disk (/dev/sda1 and /dev/sdb1)
- assembled them in RAID
- formatted /dev/md127 in ext4
- mounted it on /mnt/gentoo
- fully restored my backup
- chrooted into /dev/md127
- reinstalled GRUB on both disks
- regenerated the grub.cfg
- updated mdadm.conf and fstab
- exited the chroot, unmounted everything, and rebooted
And then, it was impossible to boot, with the infamous message:
Code: | /dev/root: Can't open blockdev
VFS: Cannont open root device "/dev/md127" or unknown-block(0,0): error -6
Please append a coorect "root=" boot option; here are the available partitions:
0800 117220824 sda
driver : sd
0801 117219800 sda1 0fed8d8f-01
0810 117220824 sdb
driver : sd
0811 117219800 sda1 0fed8d8f-01
0b00 1048575 sr0
driver: sr
List of all bdev filesystems:
ext3
ext4
ext2
vfat
msdos
iso9660
udf |
Since then, I have tried many things, all without success.
- I thought it might be due to the RAID version. I redid everything with version 0.90, still no success.
- I thought it might be the ext4 partition (even though on another PC, I can boot from an ext4 partition on MBR without any problem, but it's not in RAID). So I redid everything with a boot partition in ext2, like I had before, but still no success.
Note that:
- I do not use an initrd; I never have, and I do not want to. It has always worked this way, and there’s no reason it should change.
- My system has been fully backed up, so the kernel, GRUB, RAID, and everything else has the same configuration as before.
- GRUB2 does detect my partitions: (hd0) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos2) (hd1,msdos1) (md/md127) (md/md126)
- I was able to boot from /dev/sda1 (when I had only one ext4 partition), but that's not my goal.
- Apart from the UUIDs and the name of /dev/md changing, I don't see any differences between the two GRUB setups:
Code: | @@ -63,11 +63,11 @@
insmod diskfilter
insmod mdraid09
insmod ext2
-set root='mduuid/b98a27701b208d6e58f2f8e7254eabdb'
+set root='mduuid/6e88fa375f36404acb201669f728008a'
if [ x$feature_platform_search_hint = xy ]; then
- search --no-floppy --fs-uuid --set=root --hint='mduuid/b98a27701b208d6e58f2f8e7254eabdb' 4242e078-8721-49cc-b7c4-78ad222b0e13
+ search --no-floppy --fs-uuid --set=root --hint='mduuid/6e88fa375f36404acb201669f728008a' c136d2da-2704-46d1-ae3b-b528d7b87212
else
- search --no-floppy --fs-uuid --set=root 4242e078-8721-49cc-b7c4-78ad222b0e13
+ search --no-floppy --fs-uuid --set=root c136d2da-2704-46d1-ae3b-b528d7b87212
fi
font="/usr/share/grub/unicode.pf2"
fi
@@ -89,10 +89,11 @@
else
set timeout=5
fi
+play 60 800 1
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
-menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4242e078-8721-49cc-b7c4-78ad222b0e13' {
+menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c136d2da-2704-46d1-ae3b-b528d7b87212' {
load_video
set gfxpayload=keep
insmod gzio
@@ -101,17 +102,17 @@
insmod diskfilter
insmod mdraid09
insmod ext2
- set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
+ set root='mduuid/ff816f4d8b3d8692cb201669f728008a'
if [ x$feature_platform_search_hint = xy ]; then
- search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root --hint='mduuid/ff816f4d8b3d8692cb201669f728008a' b12427c1-b289-462e-9e9c-6723c9e01425
else
- search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root b12427c1-b289-462e-9e9c-6723c9e01425
fi
echo 'Chargement de Linux 6.6.62-gentoo…'
- linux /vmlinuz-6.6.62-gentoo root=/dev/md122 ro irqpoll fbcon=nodefer
+ linux /vmlinuz-6.6.62-gentoo root=/dev/md126 ro irqpoll fbcon=nodefer
}
-submenu 'Options avancées pour Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-4242e078-8721-49cc-b7c4-78ad222b0e13' {
- menuentry 'Gentoo GNU/Linux, avec Linux 6.6.62-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.62-gentoo-advanced-4242e078-8721-49cc-b7c4-78ad222b0e13' {
+submenu 'Options avancées pour Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-c136d2da-2704-46d1-ae3b-b528d7b87212' {
+ menuentry 'Gentoo GNU/Linux, avec Linux 6.6.62-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.62-gentoo-advanced-c136d2da-2704-46d1-ae3b-b528d7b87212' {
load_video
set gfxpayload=keep
insmod gzio
@@ -120,16 +121,16 @@
insmod diskfilter
insmod mdraid09
insmod ext2
- set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
+ set root='mduuid/ff816f4d8b3d8692cb201669f728008a'
if [ x$feature_platform_search_hint = xy ]; then
- search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root --hint='mduuid/ff816f4d8b3d8692cb201669f728008a' b12427c1-b289-462e-9e9c-6723c9e01425
else
- search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root b12427c1-b289-462e-9e9c-6723c9e01425
fi
echo 'Chargement de Linux 6.6.62-gentoo…'
- linux /vmlinuz-6.6.62-gentoo root=/dev/md122 ro irqpoll fbcon=nodefer
+ linux /vmlinuz-6.6.62-gentoo root=/dev/md126 ro irqpoll fbcon=nodefer
}
- menuentry 'Gentoo GNU/Linux, avec Linux 6.6.62-gentoo (mode de dépannage)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.62-gentoo-recovery-4242e078-8721-49cc-b7c4-78ad222b0e13' {
+ menuentry 'Gentoo GNU/Linux, avec Linux 6.6.62-gentoo (mode de dépannage)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.62-gentoo-recovery-c136d2da-2704-46d1-ae3b-b528d7b87212' {
load_video
set gfxpayload=keep
insmod gzio
@@ -138,14 +139,14 @@
insmod diskfilter
insmod mdraid09
insmod ext2
- set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
+ set root='mduuid/ff816f4d8b3d8692cb201669f728008a'
if [ x$feature_platform_search_hint = xy ]; then
- search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root --hint='mduuid/ff816f4d8b3d8692cb201669f728008a' b12427c1-b289-462e-9e9c-6723c9e01425
else
- search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root b12427c1-b289-462e-9e9c-6723c9e01425
fi
echo 'Chargement de Linux 6.6.62-gentoo…'
- linux /vmlinuz-6.6.62-gentoo root=/dev/md122 ro single
+ linux /vmlinuz-6.6.62-gentoo root=/dev/md126 ro single
}
}
@@ -180,11 +181,11 @@
insmod diskfilter
insmod mdraid09
insmod ext2
- set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
+ set root='mduuid/ff816f4d8b3d8692cb201669f728008a'
if [ x$feature_platform_search_hint = xy ]; then
- search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root --hint='mduuid/ff816f4d8b3d8692cb201669f728008a' b12427c1-b289-462e-9e9c-6723c9e01425
else
- search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root b12427c1-b289-462e-9e9c-6723c9e01425
fi
linux "/memtest86plus/memtest64.bios"
}
@@ -196,11 +197,11 @@
insmod diskfilter
insmod mdraid09
insmod ext2
- set root='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb'
+ set root='mduuid/ff816f4d8b3d8692cb201669f728008a'
if [ x$feature_platform_search_hint = xy ]; then
- search --no-floppy --fs-uuid --set=root --hint='mduuid/f3a1266ab8a3d1c058f2f8e7254eabdb' e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root --hint='mduuid/ff816f4d8b3d8692cb201669f728008a' b12427c1-b289-462e-9e9c-6723c9e01425
else
- search --no-floppy --fs-uuid --set=root e3150191-4514-4f87-82cb-58101767a269
+ search --no-floppy --fs-uuid --set=root b12427c1-b289-462e-9e9c-6723c9e01425
fi
chainloader "/memtest86plus/memtest.efi64"
} |
- I tried to better adjust the kernel, but still without success:
Code: | @@ -7,9 +7,9 @@
CONFIG_GCC_VERSION=140201
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
-CONFIG_AS_VERSION=24200
+CONFIG_AS_VERSION=24301
CONFIG_LD_IS_BFD=y
-CONFIG_LD_VERSION=24200
+CONFIG_LD_VERSION=24301
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
@@ -1671,9 +1671,9 @@
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_AUTODETECT=y
-CONFIG_MD_BITMAP_FILE=y
+# CONFIG_MD_BITMAP_FILE is not set
# CONFIG_MD_LINEAR is not set
-CONFIG_MD_RAID0=y
+# CONFIG_MD_RAID0 is not set
CONFIG_MD_RAID1=y
# CONFIG_MD_RAID10 is not set
# CONFIG_MD_RAID456 is not set
@@ -1692,10 +1692,9 @@
# CONFIG_DM_EBS is not set
# CONFIG_DM_ERA is not set
# CONFIG_DM_CLONE is not set
-CONFIG_DM_MIRROR=y
-# CONFIG_DM_LOG_USERSPACE is not set
+# CONFIG_DM_MIRROR is not set
# CONFIG_DM_RAID is not set
-CONFIG_DM_ZERO=y
+# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
# CONFIG_DM_DUST is not set |
Not understanding where the problem comes from, I obviously don't know how to fix it.
I hope I haven't forgotten anything and am counting on your help...
Thanks in advance.
Last edited by Frautoincnam on Fri Dec 20, 2024 2:42 am; edited 1 time in total |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1339 Location: Richmond Hill, Canada
|
Posted: Thu Dec 19, 2024 8:59 pm Post subject: |
|
|
Code: | /dev/root: Can't open blockdev
VFS: Cannont open root device "/dev/md127" or unknown-block(0,0): error -6 |
Are you sure you should use "/dev/md127" for root?
Your grub.cfg does not have anywhere reference to "/dev/md127", so are you share the one use for boot? |
|
Back to top |
|
|
Frautoincnam Guru
Joined: 19 May 2017 Posts: 330
|
Posted: Thu Dec 19, 2024 9:23 pm Post subject: |
|
|
pingtoo wrote: | Code: | /dev/root: Can't open blockdev
VFS: Cannont open root device "/dev/md127" or unknown-block(0,0): error -6 |
Are you sure you should use "/dev/md127" for root? |
This message was when I tried with only one part ext4.
Quote: | Your grub.cfg does not have anywhere reference to "/dev/md127", so are you share the one use for boot? |
now, it's /dev/md126, according to:
Code: | (chroot) 15:49:24 root@livecd / # blkid
/dev/md127: UUID="b12427c1-b289-462e-9e9c-6723c9e01425" BLOCK_SIZE="1024" TYPE="ext2"
/dev/sdb2: UUID="6e88fa37-5f36-404a-cb20-1669f728008a" TYPE="linux_raid_member" PARTUUID="01550dc4-02"
/dev/sdb1: UUID="ff816f4d-8b3d-8692-cb20-1669f728008a" TYPE="linux_raid_member" PARTUUID="01550dc4-01"
/dev/loop0: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sdc2: SEC_TYPE="msdos" LABEL_FATBOOT="GENTOOLIVE" LABEL="GENTOOLIVE" UUID="0936-65AE" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="6b8b4567-02"
/dev/sdc1: BLOCK_SIZE="2048" UUID="2020-10-01-13-58-43-59" LABEL="Gentoo amd64 20201001T120249Z" TYPE="iso9660" PTUUID="6b8b4567" PTTYPE="dos" PARTUUID="6b8b4567-01"
/dev/md126: UUID="c136d2da-2704-46d1-ae3b-b528d7b87212" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sda2: UUID="6e88fa37-5f36-404a-cb20-1669f728008a" TYPE="linux_raid_member" PARTUUID="01550dc4-02"
/dev/sda1: UUID="ff816f4d-8b3d-8692-cb20-1669f728008a" TYPE="linux_raid_member" PARTUUID="01550dc4-01" |
Code: | /dev/md127 /boot ext noauto,noatime 1 2
/dev/md126 / ext4 noatime,acl,user_xattr 0 1 |
Code: | DEVICE /dev/sd[ab][1]
ARRAY /dev/md127 metadata=0.90 UUID=ff816f4d:8b3d8692:cb201669:f728008a
ARRAY /dev/md126 metadata=0.90 UUID=6e88fa37:5f36404a:cb201669:f728008a |
I don't create grub.cfg manualy. I use grub-mkconfig -o /boot/grub/grub.cfg as I always used. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1339 Location: Richmond Hill, Canada
|
Posted: Thu Dec 19, 2024 9:35 pm Post subject: |
|
|
May be you can try to use PARTUUID for root?
use Code: | lsblk -o '+PARTUUID' | to get md126's PARTUUID and write it down,
Then boot into grub and press 'e' for the entry you want to boot. Modify the root=. from root=/dev/md126 to root=PARTUUID=<whatever you got from the lsblk output> Then try to boot from there to see if linux kernel can pick up the correct device for rootfs.
If that work we just need to fix grub.cfg and try to figure it out how to make grub use PARTUUID. |
|
Back to top |
|
|
Frautoincnam Guru
Joined: 19 May 2017 Posts: 330
|
Posted: Thu Dec 19, 2024 9:41 pm Post subject: |
|
|
I doubt that this will work, I've already tried so many things. And even if it did, it wouldn't explain at all why I would now have to put PARTUUIDs when I've always done without them.
What, in the detailed configurations I've given, would justify the operation suddenly changing just because I redid the partitioning?
And md seems not to have PARTUUID:
Code: | livecd ~ # lsblk -o '+PARTUUID'
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT PARTUUID
loop0 7:0 0 388.1M 1 loop /mnt/livecd
sda 8:0 0 111.8G 0 disk
├─sda1 8:1 0 100M 0 part 01550dc4-01
│ └─md127 9:127 0 100M 0 raid1
└─sda2 8:2 0 111.7G 0 part 01550dc4-02
└─md126 9:126 0 111.7G 0 raid1
sdb 8:16 0 111.8G 0 disk
├─sdb1 8:17 0 100M 0 part 01550dc4-01
│ └─md127 9:127 0 100M 0 raid1
└─sdb2 8:18 0 111.7G 0 part 01550dc4-02
└─md126 9:126 0 111.7G 0 raid1
sdc 8:32 1 496M 0 disk
├─sdc1 8:33 1 425M 0 part /mnt/cdrom 6b8b4567-01
└─sdc2 8:34 1 6.4M 0 part 6b8b4567-02 |
I'll wait for other suggestions. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54640 Location: 56N 3W
|
Posted: Thu Dec 19, 2024 10:18 pm Post subject: |
|
|
Frautoincnam,
Raid sets do not have a PARTUUID as they are not partitions.
Using filesystem UUID requires an initrd.
You must use kernel raid set auto assembly to avoid an initrd.
That only works with raid metadata version 0.90
Its also been on the kernel feature removal list for a long time.
Please post the complete output from
mdadm -E /dev/<partition_donated_to_root>
That will tell us how your raid set is defined.
Use wgetpaste to share your kernel .config file too please.
You may need to try several services to find one that will accept such a large file.
Tell us the link. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Frautoincnam Guru
Joined: 19 May 2017 Posts: 330
|
Posted: Thu Dec 19, 2024 10:33 pm Post subject: |
|
|
NeddySeagoon wrote: | Frautoincnam, |
Hi, and thanks for your help.
Quote: | Raid sets do not have a PARTUUID as they are not partitions. |
Yes. It was just an answer.
Quote: | Using filesys*em UUID requires an initrd. |
Ok.
Quote: | You must use kernel raid set auto assembly to avoid an initrd. |
I have all of this since it has always worked so far.
Quote: | That only works with raid metadata version 0.90 |
I understood that.
Quote: | Its also been on the kernel feature removal list for a long time. |
Oh...
Quote: | Please post the complete output from
mdadm -E /dev/<partition_donated_to_root> |
Code: | livecd ~ # cat /proc/mdstat
Personalities : [raid1]
md126 : active raid1 sdb2[1] sda2[0]
117117312 blocks [2/2] [UU]
bitmap: 0/1 pages [0KB], 65536KB chunk
md127 : active raid1 sdb1[1] sda1[0]
102336 blocks [2/2] [UU]
unused devices: <none>
livecd ~ # mdadm -E /dev/sda2
/dev/sda2:
Magic : a92b4efc
Version : 0.90.00
UUID : 6e88fa37:5f36404a:cb201669:f728008a (local to host livecd)
Creation Time : Thu Dec 19 18:27:40 2024
Raid Level : raid1
Used Dev Size : 117117312 (111.69 GiB 119.93 GB)
Array Size : 117117312 (111.69 GiB 119.93 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 126
Update Time : Thu Dec 19 22:17:08 2024
State : clean
Internal Bitmap : present
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Checksum : ef6b608 - correct
Events : 120
Number Major Minor RaidDevice State
this 0 8 2 0 active sync /dev/sda2
0 0 8 2 0 active sync /dev/sda2
1 1 8 18 1 active sync /dev/sdb2
livecd ~ # mdadm -E /dev/sdb2
/dev/sdb2:
Magic : a92b4efc
Version : 0.90.00
UUID : 6e88fa37:5f36404a:cb201669:f728008a (local to host livecd)
Creation Time : Thu Dec 19 18:27:40 2024
Raid Level : raid1
Used Dev Size : 117117312 (111.69 GiB 119.93 GB)
Array Size : 117117312 (111.69 GiB 119.93 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 126
Update Time : Thu Dec 19 22:17:08 2024
State : clean
Internal Bitmap : present
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Checksum : ef6b61a - correct
Events : 120
Number Major Minor RaidDevice State
this 1 8 18 1 active sync /dev/sdb2
0 0 8 2 0 active sync /dev/sda2
1 1 8 18 1 active sync /dev/sdb2 |
Quote: | Use wgetpaste to share your kernel .config file too please.
You may need to try several services to f|nd one that will accept such a large file.
Tell us the link. |
https://paste.gentoo.zip/y1D2LkvZ
Edit : I just added CONFIG_DM_RAID with no success.
Last edited by Frautoincnam on Thu Dec 19, 2024 11:24 pm; edited 1 time in total |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1339 Location: Richmond Hill, Canada
|
Posted: Thu Dec 19, 2024 10:55 pm Post subject: |
|
|
Quote: | Raid sets do not have a PARTUUID as they are not partitions. | Didn't know that. Learn something new everyday.
I wonder if MD does not have something that can be identified by kernel. how would kernel know which to use.
I see the LIVECD was used to show. but I remember in past post, LIVECD and actually successful booted system usually show different MD number. Is there some kind of rule to correlate them? for example md126 will acutally be md6 (as an example) |
|
Back to top |
|
|
Frautoincnam Guru
Joined: 19 May 2017 Posts: 330
|
Posted: Fri Dec 20, 2024 2:41 am Post subject: |
|
|
[solution]
Logic dictated that there was absolutely nothing to change in terms of configuration, kernel, grub, etc. since nothing had changed between the functional state and the current state. It could only be the creation of the raid, and in particular the absurd error of not having given a type to my partitions. I only had to
Code: | parted /dev/sda set 1 raid on
parted /dev/sda set 2 raid on
parted /dev/sdb set 1 raid on
parted /dev/sdb set 2 raid on |
for the boot to be done without any difficulty.
I am ashamed, but I learned a lot
I destroyed everything again, to rebuild as I initially wanted without a boot partition, and it obviously works.
Thank you for your attention. |
|
Back to top |
|
|
|
|
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
|
|