Bug#495049: why is (fd0) hard-coded into the grub image?

ian_bruce at fastmail.fm ian_bruce at fastmail.fm
Fri Aug 15 16:28:32 UTC 2008


On Fri, 15 Aug 2008 16:15:30 +0200
Felix Zielcke <fzielcke at z-51.de> wrote:

>> I should point out that when grub drops into the rescue prompt, it
>> coughs up the message "error: unknown device fd0". Perhaps this is
>> why it goes into rescue mode?
> 
> Thanks for telling us.

I would have mentioned it before, except that it didn't seem relevant,
because I don't have a floppy disk, and neither "device.map" nor
"grub.cfg" refer to it.

> This is a bit different then:
> "GRUB doestn't load normal.mod because there is no string normal in
> core.img"

"GRUB doesn't load normal.mod" -- which is true.

"there is no string normal in core.img" -- which is also true.

"because" -- I didn't say that. You made it up.

>> My "device.map" file, as previously listed, does not contain an entry
>> for "fd0", because the machine does not in fact have a floppy
>> drive. Wondering if this might help, I added the entry
>> "(fd0) /dev/fd0", and reinstalled grub.
> 
> I think you understand something wrong.
> The problem is that GRUB thinks fd0 is your bootdevice, even though your
> device.map is right.

-- which was the point of my first question:

>> -- why is there a hard-coded dependency on "fd0", when neither
>> "device.map" nor "grub.cfg" mention it?
>>
>> -- is the "fd0" dependency the reason why grub drops into rescue
>> mode?
> 
> Please stop assuming things if you don't understand how GRUB works.

If "the problem is that GRUB thinks fd0 is your bootdevice", then
actually it seems that I understood the situation correctly.

>> -- why does adding an "fd0" entry to "device.map" not resolve this
>> error?

If (fd0) is an "unknown device", then why doesn't "(fd0) /dev/fd0" make
it known?

>> Finally, I suggest the following patch for clarifying exactly what
>> "grub-install" is doing, at least until some of these issues are
>> resolved.
> 
> Please read man bash

I do so frequently.

> There's an -x option which does something like that.

Which also produces a lot of useless verbiage, when what we really want
to know is what modules "grub-mkimage" is including.

> I assume you don't know enough C to understand the whole sourcecode.

You assume wrong.

> Please let it to Robert and me trying to find out the `why?'.
> 
> It is totally okay if you would your report just like this
> 
> for me grub goes to rescue mode with "unknown device fd0"
> I only need to do
> insmod normal
> normal
> 
> then the menu comes up and I can boot my system
> I have LVM on /

You didn't mention that adding "(fd0) /dev/fd0" to "device.map" causes
the "pc" module to be omitted from the image. Would you have known that
if I hadn't mentioned it? Or do you claim that is the expected
behaviour?

> Don't tell us that probable XYZ is the problem and that it's easy to
> fix, if you are not sure that it is.

I told you that "grub.cfg" was not getting read because the module
"normal" was not loaded. I was absolutely sure of this, and I was
absolutely correct.

> And error messages like that "unknown device fd0" are shown for a reason
> and so should be in your bug report _submission_. (that means not in the
> 3rd mail but instead already in the 1st)

The grub rescue CD produces exactly the same error message. That doesn't
stop it from working. It's not always immediately clear which facts are
relevant, and which aren't.






More information about the Pkg-grub-devel mailing list