error: disk 'hd0,msdos5' not found

Bug #1316068 reported by Mathieu31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

After upgrading the distribution, grub fails to boot any of the installed OSes.
Whatever the option selected in the grub menu, I get the same error message: error: disk 'hd0,msdos5' not found.
Unfortunately, hd0,msdos5 is the partition where the root of the Xubuntu system resides, and where the grub files (/boot) are.
By the way, the grub menu is shown in text only, without the nice blue background it should show.
Downgrading grub to version 2.00-19ubuntu2.1 make the system bootable again.
I have updated the BIOS firmware, to make sure it does not solve the issue.
A regression in grub ?

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: grub2-common 2.02~beta2-9
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: XFCE
Date: Mon May 5 11:53:03 2014
InstallationDate: Installed on 2013-01-07 (482 days ago)
InstallationMedia: Xubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
SourcePackage: grub2
UpgradeStatus: Upgraded to trusty on 2014-04-26 (8 days ago)

Revision history for this message
Mathieu31 (mathieu-belleville) wrote :
Revision history for this message
Phillip Susi (psusi) wrote :

Can you go to the grub console ( on 2.02~beta2-9 ) and type ls -l and report what it shows?

Revision history for this message
Mathieu31 (mathieu-belleville) wrote :

ls, or wathever command at the grub command line prompt gives the same error:
error: disk 'hd0,msdos5' not found
instead of listing the available partitions.

Revision history for this message
Mathieu31 (mathieu-belleville) wrote :

The motherboard is a MSI B74A-G43, model no MS-7758.
The hard drive hd0 is connected to the first SATA socket.

I have got the same Ubuntu on a eeePC (1005HA) withi no problem, but it is a quite older hardware.

Revision history for this message
Phillip Susi (psusi) wrote :

Are you sure you typed "ls -l" and not "ls /" or something?

Revision history for this message
Mathieu31 (mathieu-belleville) wrote :

Yes, I am sure.
To be 100% certain, I reinstalled grub 2.02~beta2-9, and tried the following commands, as typed here after the * with no extra characters:
* ls
* ls -l
* lspci
* vbeinfo
* hello
* help
* functional_test
* all_functional_test
They _ALL_ answered by "error: disk 'hd0,msdos5' not found."

Pressing <TAB> key on the grub command prompt gives a list of commands. Auto-completion of the command works as well.

The BIOS boot mode is set to "LEGACY+UEFI", if that matters.

The grub config file is functional since it is used by my supergrub2 disk to boot the system.

Revision history for this message
Phillip Susi (psusi) wrote :

How about the output of parted -l, and grub-probe -t drive /boot?

Revision history for this message
Mathieu31 (mathieu-belleville) wrote :

Hello,
The file parted_output.txt contains the output from the command "sudo parted -l".

Revision history for this message
Mathieu31 (mathieu-belleville) wrote :

The command "sudo grub-probe -t drive /boot" gives:
(hostdisk//dev/sda,msdos5)

with both versions 2.02~beta2-9 and 2.00-19ubuntu2.1.

Revision history for this message
Phillip Susi (psusi) wrote :

At the grub rescue prompt, can you try ls (hd1,msdos5)/? Maybe the drive order is mixed up.

Revision history for this message
Mathieu31 (mathieu-belleville) wrote :

Hello,
As asked, I have tried "ls (hd1,msdos5)/" (with a 1 and not a zero for the drive number), and grub answered "error: disk 'hd0,msdos5' not found." (with a zero, not a one).
Even the command "reboot" gives the same message, and no reboot. I have to use the reset button.

Revision history for this message
Phillip Susi (psusi) wrote :

That is just weird.. can you try "set debug=all" and then ls? This should spew a lot of output, so you may want to snap a picture of it.

Revision history for this message
Mathieu31 (mathieu-belleville) wrote :
Revision history for this message
Mathieu31 (mathieu-belleville) wrote :

According to this, the faulty lines are in kern/disk.c, lines 196, 281 & 295

Revision history for this message
Phillip Susi (psusi) wrote :

Looks like you forgot to follow up with the ls command.

Revision history for this message
Phillip Susi (psusi) wrote :

Nevermind, just saw your second post.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

That indeed looks like bad disk order.

Mathieu, would you be open to trying to disconnect the other drives, leaving just the "right" one in place and seeing if grub is happy then? I would expect you'd only need to disconnect power to the other drives.

Following the same train of thought, is it possible additional drives where added after xubuntu was installed? We should be able to either generate a new device map to account for the unexpected behavior, or get rid of an old stale one.

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Mathieu31 (mathieu-belleville) wrote :

Hello,
As instructed, I disconnected the other drives, leaving the main harddrive and the DVD-RW drive.
This did not had any effect: grub 2.02 showed the same error: error: disk 'hd0,msdos5' not found.
booting from a CD and restoring grub 2.00 (sudo dkpg -i grub* in the directory where I keep a copy of the grub debs) put the system back in bootable state.
I have attached the device.map file found in /boot/grub. The identification of hd0 is correct.
Also in grub.cfg, one can read:
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 94ecf542-619c-4fe7-bfed-672fa7bb2739
else
  search --no-floppy --fs-uuid --set=root 94ecf542-619c-4fe7-bfed-672fa7bb2739
fi
The uuid is indeed the one of hd0,msdos5.

msdos5 (or sda5) is the first partition within the extended partition sda3. sda1 & sda2 are primary partitions for Windows.
sda6 is the swap, and sda7 is mounted as /home. Could this be troubling Grub?

The configuration of the hardware hasn't changed since I assembled it, and installed the Windows and Xubuntu.

I am still ready to help and test whatever solution you may come up with.
Best regards,

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Mathieu31 (mathieu-belleville) wrote :

The problem was still there after upgrading to 16.04LTS.
I fixed it by first reinstalling the windows MBR, then reinstalling grub2-2.02.
Strange but solved.

Revision history for this message
yacine chaouche (yacinechaouche) wrote :

Same here with Linux Mint 17 Qiana. Upgraded the distro, upgrade the kernel to 4.X. Boom ! no more booting. Same repeating errors of (hd0,msdos5) not found for any command I type on the grub command line at boot time. I don't know how to reinstall the windows MBR yet. A grub-install from a rescue CD didn't resolve the problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.