All right, let's see where we are now, on this grub-rescue sub-thread.

I will elide much of your (extremely useful/helpful) commentary, just to make this e-mail less overwhelming.

Following several attempts to use a separate drive/CD/USB stick to get things working (so far without success), the current situation if I take everything else out, and just leave the RAID drive in the machine, and boot to the "grub rescue>" prompt, I now see (I have to type everything manually into this e-mail; I'll obviously try to be really careful about that):

ls:

(hd0) (hd0, msdos2) (hd0, msdos1) (md/0) (fd0) error: failure reading sector 0xb30 from 'fd0'

The fd error is, I'm sure, irrelevant.

The actual RAID filesystem from which we want to boot is the second partition on the hard drive: (hd0, msdos2).

set: [in this output I'll use "<UUID>" to mean a UUID that it prints, which starts with "8d86" and ends with "0aed"]

prefix='(mduuid/<UUID>)/boot/grub'
root='mduuid/<UUID>'

Grub looks for its third portion using the "prefix" value that
'grub-install' wrote into the second portion. That's what you see when
typing 'set' at the 'grub-rescue' prompt.  You're seeing the 'grub-rescue'
prompt because that stored value of "prefix" is wrong, and the second
portion of grub is telling you that it can't find the third portion.


That paragraph _really_ helped my understanding; it made the GNU documentation a lot clearer.

I note that your link to [grm], https://olinux.net/grub-rescue-mode/, returns a 521 "Web server is down" error (at least, it has done so every time I've tried it, so I have been unable to look at that information).

So now that we are sure that you understand tab-completion, you can use
grub-rescue's tab-completion in combination with its 'ls' command to
explore your disk's filesystem with the aim of discovering where the grub
third portion files are. You would do this by typing something like:

grub rescue> ls (hd0)/

and then using tab-completion to see what grub finds in the root directory
of your hard drive.

Perhaps I'm not understand something. I tried typing each of the following in turn at the "grub rescue>" prompt:

  ls (hd0)/<TAB><TAB>
  ls (hd0, msdos2)/<TAB><TAB>
  ls (hd0, msdos1)/<TAB><TAB>
  ls (md/0)/<TAB><TAB>

None of them did anything at all.

You had written before that "Occasionally tab-completion does not work in grub-rescue. But it usually does,". Perhaps this is one of those occasions where it does not :-(

It seemed like, from what you said, that one of the following _should_ work:

prefix=(X)/boot/grub
root=X
insmod normal
normal

where X is one of: hd0
                   hd0,msdos2
                   hd0,msdos1
                   md/0
most likely either hd0,msdos2 or md/0 being the correct value.

I tried them all, and at the "insmod normal" step, they all returned: "error: unknown filesystem".

Just to be absolutely certain that the RAID disk hasn't somehow been compromised, I then reattached a drive with a bootable OS, booted into that OS, and made sure that I could still mount the second partition on the RAID drive; it still looks good, with the entire "/" hierarchy still in place, including /boot.

My simple brain says that if I can access <partition 2 on the RAID drive>/boot from a running OS, we just haven't found the magic incantation yet for doing the same for setting the value of prefix and root in grub rescue.

  Doc

--
Web:  http://enginehousebooks.com/drevans

Reply via email to