LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   /usr/sbin/grub-probe: error: no such disk. (http://www.linuxquestions.org/questions/debian-26/usr-sbin-grub-probe-error-no-such-disk-922118/)

mpyusko 01-04-2012 10:48 PM

/usr/sbin/grub-probe: error: no such disk.
 
I'm having a problem upgrading the Kernel.
Code:

root@abacus:/home/mpyusko# apt-get upgrade
Reading package lists... Done
Building dependency tree     
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up linux-image-2.6.32-5-amd64 (2.6.32-39) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
run-parts: executing /etc/kernel/postinst.d/update-notifier 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
Generating grub.cfg ...
/usr/sbin/grub-probe: error: no such disk.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-5-amd64.postinst line 799.
dpkg: error processing linux-image-2.6.32-5-amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 linux-image-2.6.32-5-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@abacus:/home/mpyusko#

My Sofware RAID configuration might have something to do with it.(?)
Code:

root@abacus:/proc# cat /proc/mdstat
Personalities : [raid1]
md9 : active raid1 sda10[3] sdb10[2]
      386724728 blocks super 1.2 [2/2] [UU]
     
md8 : active raid1 sdb9[0] sda9[2]
      1950708 blocks super 1.2 [2/2] [UU]
     
md7 : active raid1 sdb8[0] sda8[2]
      9763768 blocks super 1.2 [2/2] [UU]
     
md6 : active raid1 sdb7[0] sda7[2]
      9763768 blocks super 1.2 [2/2] [UU]
     
md5 : active raid1 sdb6[0] sda6[2]
      9763768 blocks super 1.2 [2/2] [UU]
     
md4 : active raid1 sdb5[0] sda5[2]
      9763768 blocks super 1.2 [2/2] [UU]
     
md3 : active raid1 sdb3[0] sda3[2]
      97268 blocks super 1.2 [2/2] [UU]
     
md2 : active raid1 sda2[3] sdb2[2]
      1950708 blocks super 1.2 [2/2] [UU]
     
md1 : active (auto-read-only) raid1 sda1[3] sdb1[2]
      58591160 blocks super 1.2 [2/2] [UU]
     
md0 : active raid1 sdd1[0] sdc1[1]
      976758841 blocks super 1.2 [2/2] [UU]
     
unused devices: <none>
root@abacus:/proc#

My rootfs is on /dev/md4

Code:

root@abacus:/home/mpyusko# mdadm --examine /dev/md4
mdadm: No md superblock detected on /dev/md4.

Where did it go????

Code:

root@abacus:/proc# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        7295    58592256  fd  Linux raid autodetect
/dev/sda2          60559      60802    1951744  fd  Linux raid autodetect
/dev/sda3            7295        7307      97280  fd  Linux raid autodetect
/dev/sda4            7307      60559  427742209    5  Extended
/dev/sda5            7307        8523    9764864  fd  Linux raid autodetect
/dev/sda6            8523        9739    9764864  fd  Linux raid autodetect
/dev/sda7            9739      10955    9764864  fd  Linux raid autodetect
/dev/sda8          10955      12170    9764864  fd  Linux raid autodetect
/dev/sda9          12170      12413    1951744  fd  Linux raid autodetect
/dev/sda10          12414      60559  386725888  fd  Linux raid autodetect

Partition table entries are not in disk order

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1  *          1        7295    58592256  fd  Linux raid autodetect
/dev/sdb2          60559      60802    1951744  fd  Linux raid autodetect
/dev/sdb3            7295        7307      97280  fd  Linux raid autodetect
/dev/sdb4            7307      60559  427742209    5  Extended
/dev/sdb5            7307        8523    9764864  fd  Linux raid autodetect
/dev/sdb6            8523        9739    9764864  fd  Linux raid autodetect
/dev/sdb7            9739      10955    9764864  fd  Linux raid autodetect
/dev/sdb8          10955      12170    9764864  fd  Linux raid autodetect
/dev/sdb9          12170      12413    1951744  fd  Linux raid autodetect
/dev/sdb10          12414      60559  386725888  fd  Linux raid autodetect

Partition table entries are not in disk order

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe087bfed

  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1              1      121601  976760001  fd  Linux raid autodetect

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe087bfed

  Device Boot      Start        End      Blocks  Id  System
/dev/sdd1              1      121601  976760001  fd  Linux raid autodetect

Disk /dev/md0: 1000.2 GB, 1000201053184 bytes
2 heads, 4 sectors/track, 244189710 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/md1: 60.0 GB, 59997347840 bytes
2 heads, 4 sectors/track, 14647790 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

    Device Boot      Start        End      Blocks  Id  System

Disk /dev/md2: 1997 MB, 1997524992 bytes
2 heads, 4 sectors/track, 487677 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md3: 99 MB, 99602432 bytes
2 heads, 4 sectors/track, 24317 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md3 doesn't contain a valid partition table

Disk /dev/md4: 9998 MB, 9998098432 bytes
2 heads, 4 sectors/track, 2440942 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md4 doesn't contain a valid partition table

Disk /dev/md5: 9998 MB, 9998098432 bytes
2 heads, 4 sectors/track, 2440942 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md5 doesn't contain a valid partition table

Disk /dev/md6: 9998 MB, 9998098432 bytes
2 heads, 4 sectors/track, 2440942 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md6 doesn't contain a valid partition table

Disk /dev/md7: 9998 MB, 9998098432 bytes
2 heads, 4 sectors/track, 2440942 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md7 doesn't contain a valid partition table

Disk /dev/md8: 1997 MB, 1997524992 bytes
2 heads, 4 sectors/track, 487677 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md8 doesn't contain a valid partition table

Disk /dev/md9: 396.0 GB, 396006121472 bytes
2 heads, 4 sectors/track, 96681182 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md9 doesn't contain a valid partition table
root@abacus:/proc#

I had a drive failure a wile back and was given a newer model with incompatible specs (speed and stuff). Then I had to go out and buy a matching drive. I did a rebuild from old to new, then from new to new. All seems to be working fine. I have GRUB installed in MBRs of both drives. (a&b are OS on 2 500GB's and c&d are stored data on 2 1TB's)

This is on a Xeon server (not the one in my sig).

How do I fix this?

Thanks.

towheedm 01-05-2012 12:12 AM

Is /dev/md1 your /boot partition? If so, it's marked read-only. GRUB's configuration file (grub.cfg) resides in your /boot partition. Trying to update grub.cfg will fail if this partition cannot be written to.

Depending your your distro, does
Code:

update-grub
or
Code:

grub-mkconfig -o /boot/grub/grub.cfg
give the same grub-probe error?

I am not to experienced with the nitty-gritties of RAID (although all my drives are also RAID1 and RAID0), why rebuild old > new > new. Since all of your drives are RAID1, why not mark the defective drive as faulty, remove it from the array, insert the new drive, activate it and have mdadm rebuild it?

mpyusko 01-05-2012 10:40 AM

md1 is not used. It's an extra partition for maybe a windows install or maybe a quick add for home or usr. The /boot is on md4 and is currently mounted rw.

The error from update grub is the thread title.

cfdisk /dev/sda (and b too) return...

FATAL ERROR: Bad primary partition 1: Partition ends
Press any key to exit cfdisk

Originally I tried marking it bad swapping out and then a week later swapping in the replacement. But because the seagate 7200.12 is much faster than the old 7200.11, I ran into I/O lag errors. So I pulled the 7200.11 and bought a new 7200.12. After numerous dd, mdadm, fdisk.... I finally got it up and running again. But not perfectly... obviously.

towheedm 01-05-2012 11:28 AM

Does
Code:

mdadm --examine /dev/sda5 (and /dev/sdb5)
show all is OK which these partitions?

I'm not totally sure about this, but shouldn't the partition containing /boot be marked as bootable? You have /dev/sda(b)1 marked as bootable.

This is what I would do to try and troubleshoot:
  1. Mark /dev/sdb as faulty and remove drive.
  2. Force a fsck on all partitions of /dev/sda.
  3. Hopefully fsck will correct any correctable errors.
  4. Run update-grub or grub-mkconfig -o /boot/grub/grub.cfg and see if the error persists.
  5. If the grub-probe error persists:
    a. Unset the executable bit from all files in /etc/grub.d, with the exception of 00_header and 10_linux.
  6. Repeat Step 4.
    a. If the error goes away then set the executable bit one file at at a time, starting from the lowest (10_linux_xen) and update GRUB's config file each time. Check which file causes the error.
    b. If the error persist after repeating Step 4, then there's a problem with 00_header or 10_linux. If you are familiar with the files, check for any corruption. If you're not, then it may be easier to simply re-install GRUB2. Depending on the distro in use, I should be able to help you with that.
  7. Once everything is working fine with /dev/sda, re-install /dev/sdb and rebuild.


All times are GMT -5. The time now is 09:40 AM.