root
2021-08-19 06:10:30 UTC
I have run into a problem with grub that baffles me.
Grub seems to confuse two drives in my system.
I have an 1TB M2 ssd and three sata drives.
sda is a 2TB spinning disk with 4 partitions.
sdb is a 500GB SSD with a single partition
sdc is a 2TB spinning disk with 4 partitions.
When I first configured the system I was able
to to construct a grub.cfg which allowed me
to to boot into any of the partitions.
Sometime after the initial configuration I
replaced the spinning drive sdc with a different
2TB drive with 4 nearly identical partitions.
I now find I cannot boot into partitions 2,3,4
on sdc. When I do an ls under grub it
seems to show that
sdb=hd1 and sdc=hd2 have been switched. I
see that because the ls shows that hd1 has
four partitions and hd2 has only one partition.
However, when I boot into sdb1 I get into
the correct partition, and similarly for
when I boot into sdc1.
Here is my grub.cfg:
set timeout=10
set vga=791
menuentry 'N1:k4.15.2' {
search --no-floppy --fs-uuid --set=root=UUID bc5617f6-c928-46ea-8a29-46377698cbc3
linux /boot/k4.15.2 load_ramdisk=1 root=UUID=bc5617f6-c928-46ea-8a29-46377698cbc3 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'N1:k64.8.10' {
search --no-floppy --fs-uuid --set=root=UUID bc5617f6-c928-46ea-8a29-46377698cbc3
linux /boot/k64.8.10 load_ramdisk=1 root=UUID=bc5617f6-c928-46ea-8a29-46377698cbc3 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'B1:k4.15.2' {
root='(hd1,1)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sdb1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'A1:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd0,1)'
root='(hd0,1)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sda1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'A2:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd0,2)'
root='(hd0,2)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sda2 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'A4:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd0,4)'
root='(hd0,4)'
linux /boot/vmlinuz-huge-5.13.11 load_ramdisk=1 root=/dev/sda4 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'C1:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd2,1)'
root='(hd2,1)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sdc1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
#----------------the entries above boot correctly, those below do not
menuentry 'C2:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd2,1)'
root='(hd2,2)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sdc1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'C3:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd2,1)'
root='(hd2,3)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sdc1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
Attempts to boot into sdc2 or sdc3 result in a "no such partition" error from grub.
Grub does not recognize the partitions for sdc2,sdc3, or sdc4 even when I use
the uuid block ID.
It does not matter if I use grub from Slackware 14.2 or from the latest Slackware current.
I tried partitioning sdc with both gdisk and fdisk with no change in the result.
Apart from grub, linux has no problem with any of the drives in my system.
I spent about 17 hours today trying to resolve this problem. I would
appreciate any suggestions you might have.
Thanks.
Grub seems to confuse two drives in my system.
I have an 1TB M2 ssd and three sata drives.
sda is a 2TB spinning disk with 4 partitions.
sdb is a 500GB SSD with a single partition
sdc is a 2TB spinning disk with 4 partitions.
When I first configured the system I was able
to to construct a grub.cfg which allowed me
to to boot into any of the partitions.
Sometime after the initial configuration I
replaced the spinning drive sdc with a different
2TB drive with 4 nearly identical partitions.
I now find I cannot boot into partitions 2,3,4
on sdc. When I do an ls under grub it
seems to show that
sdb=hd1 and sdc=hd2 have been switched. I
see that because the ls shows that hd1 has
four partitions and hd2 has only one partition.
However, when I boot into sdb1 I get into
the correct partition, and similarly for
when I boot into sdc1.
Here is my grub.cfg:
set timeout=10
set vga=791
menuentry 'N1:k4.15.2' {
search --no-floppy --fs-uuid --set=root=UUID bc5617f6-c928-46ea-8a29-46377698cbc3
linux /boot/k4.15.2 load_ramdisk=1 root=UUID=bc5617f6-c928-46ea-8a29-46377698cbc3 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'N1:k64.8.10' {
search --no-floppy --fs-uuid --set=root=UUID bc5617f6-c928-46ea-8a29-46377698cbc3
linux /boot/k64.8.10 load_ramdisk=1 root=UUID=bc5617f6-c928-46ea-8a29-46377698cbc3 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'B1:k4.15.2' {
root='(hd1,1)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sdb1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'A1:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd0,1)'
root='(hd0,1)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sda1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'A2:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd0,2)'
root='(hd0,2)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sda2 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'A4:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd0,4)'
root='(hd0,4)'
linux /boot/vmlinuz-huge-5.13.11 load_ramdisk=1 root=/dev/sda4 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'C1:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd2,1)'
root='(hd2,1)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sdc1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
#----------------the entries above boot correctly, those below do not
menuentry 'C2:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd2,1)'
root='(hd2,2)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sdc1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
menuentry 'C3:k4.15.2' {
#search --no-floppy --fs-uuid --set=root '(hd2,1)'
root='(hd2,3)'
linux /boot/k4.15.2 load_ramdisk=1 root=/dev/sdc1 prompt_ramdisk=0 ro printk.time=0 vt.default_utf8=0 gfxpayoad=1024x768x64
initrd /boot/initrd.gz
}
Attempts to boot into sdc2 or sdc3 result in a "no such partition" error from grub.
Grub does not recognize the partitions for sdc2,sdc3, or sdc4 even when I use
the uuid block ID.
It does not matter if I use grub from Slackware 14.2 or from the latest Slackware current.
I tried partitioning sdc with both gdisk and fdisk with no change in the result.
Apart from grub, linux has no problem with any of the drives in my system.
I spent about 17 hours today trying to resolve this problem. I would
appreciate any suggestions you might have.
Thanks.