Comment 5 for bug 440587

Revision history for this message
Felix Zielcke (fzielcke) wrote : Re: [Bug 440587] Re: grub2: 'error: no such partition' when trying to boot from hd0, 10

Am Dienstag, den 17.11.2009, 00:58 +0000 schrieb Liu Bo:
> Hi, I also met the same problem. But I comment the following code to
> work around it.
>
What does it work around?
Does it do more then just hiding the out of disk error?
If so then we probable have some bug in the error handling.

The kernel out of disk error is a sign for either a bug in our
filesystem code or in the filesystem itself.
Unfortunately reiserfs is the only filesystem for which we have debug
code.
Though it could also be a BIOS bug that it reports a different disk size
then it actually has.
>
> Please confirm the funtion of the above code. Thanks.
>

I doubt this function is the problem.
And if you would have looked a few lines below where this function gets
actually called it would give you at least a hint how you can find out
for which sector number that function fails.

To get the disk dprintfs shown in rescue mode the following should work,
but it seems like the pager only works in mormal mode.
sudo -s
printf 'set pager=1\nset debug=disk' > /boot/grub/rescue.cfg
In /usr/sbin/grub-install change this line
  $grub_mkimage --output=${grubdir}/core.img --prefix=${prefix_drive}${relative_grubdir} $modules || exit 1
to this
  $grub_mkimage --config=${grubdir}/rescue.cfg --output=${grubdir}/core.img --prefix=${prefix_drive}${relative_grubdir} $modules || exit 1
and then just run it like usual.

Though because you're already familiar with compiling and modifying it you could also replace the grub_dprintf with normal grub_printfs.

--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer