On Thu, 22 Jan 2026 at 17:11, D. R. Evans <[email protected]> wrote:
>
> Due to a cascading series of failures (some of hardware, some of my brain), I
> find myself in the following situation:
>
> I had a linux-raid two-drive system that was working fine for many years. The
> system uses legacy BIOS booting. My notes from long ago say that both drives
> had a working GRUB; but it seems that my notes were wrong: one of the drives
> died without warning, leaving me with a drive with a fully-functioning trixie
> (and all the user data, etc.) present, but that drive seems to have no working
> GRUB in the MBR. Trying to boot it gives me a "grub-rescue>" prompt.
>
> I've scoured the Internet, but have been unable to find any clear,
> unambiguous, step-by-step guide as to how to make this drive remaining
> functioning drive bootable, either from the "grub-rescue>" prompt or by some
> other mechanism.

Hi,

Because you see a grub-rescue shell when you try to boot, that confirms
that grub is installed on your disk.  However it is not installed
"correctly" for the situation you find yourself in, probably because of the
missing/failed disk.

What is likely failing is that the tiny code installed into the boot sector
by grub is currently unable to perform its intended function of locating
the actual bulk of the grub code, which is always stored somewhere in
a filesystem on the drive, usually under /boot. The failure might be
occurring because the boot sector code contains instructions to look for
the missing/failed disk, instead of the one you have.

But, crucially, if RAID made the two disks identical, then the code that
grub is looking for is very likely already present on the drive you have.

So, I think it is likely that you should be able to use grub-rescue to
boot that drive  without "installing" grub first. And I would recommend
attempting that. It does require following a sequence of grub-rescue commands
that might look scary and unfamiliar, but it also avoids a lot of risk.
Because if you can get it to boot by that method (without any other disks
involved), then once booted you will then be able to run a simple
"grub-install <drive>" from the same booted system that you want to boot in
future, and that simplifies this grub-rescue operation.

While it is more fiddly, this grub-rescue method is less risky than using
some other drive to boot and then trying to run "grub-install". Because
doing that introduces the extra variable factor of another boot disk in
that running environment, and involves using a foreign grub instead of the
same grub that is on the disk in question, to attempt to repair the grub
that is on the disk in question. When doing a "grub-install" command in
that situation, you would need to specify extra parameters to "grub-install"
to ensure that you're actually fixing the problem, rather than recreating
almost the same situation again.

The grub-rescue instructions you need to follow are at [1].

At step 2:
  ls # Find out which devices are available:

we hope that pressing the Tab key after you type "ls" will activate
"tab-completion" which is described at the bottom of [2] as follows:

  ... if the cursor is after the first word, the TAB will provide
  a completion listing of disks, partitions, and file names depending on
  the context.  Note that to obtain a list of drives, one must open
  a parenthesis, for example:
    ls (
  and then press the Tab key.

Occasionally tab-completion does not work in grub-rescue. But it usually
does, in which case it it can be used to explore the disk and thereby
reveal what values you will need to specify in the "set prefix" and "set
root" commands.

If you need guidance during this step, reply here with what you see.

If you can get these grub-rescue instructions correct, your system should
boot, and then you can run a simple "grub-install <device>" which should
resolve your issue and make the drive bootable.

I can't guarantee this will work, but it is definitely the approach that
I would try first, because grub-rescue operations have always been
successful for me, and following this grub-rescue method is a cautious
approach because it does not modify the disk in any way.

[1] 
https://www.gnu.org/software/grub/manual/grub/grub.html#GRUB-only-offers-a-rescue-shell
[2] 
https://www.gnu.org/software/grub/manual/grub/grub.html#Command_002dline-interface

Reply via email to