# [SOLVED] GRUB2 unable to boot system

## sinisterdomestik

So I'm not quite sure what I did or how it happened, but I'm sure it has something to do with moving my computer parts around.

I moved the insides of my computer into another case and changed power supplies, that's the only thing that's different. The HDD's(I have 3 in this computer) might not be plugged into the same SATA ports on the motherboard as before, but that shouldn't matter to much. The problem that I'm having is now when I boot the computer, it boots to GRUB2 Recovery Mode. I have looked into this for a few days, but nothing that I have found has fixed it.

When I run ls, I get 

```
GRUB loading.

Welcome to GRUB!

error: unknown filesystem.

Entering rescue mode...

grub rescue> ls

(hd0) (hd0,msdos1) (hd1) (hd1,msdos1) (fd0)

grub rescue> 
```

I have been able to successfully mount and chroot into the HDD that contains /boot and all that through the LiveCD without issue. The /boot is on hd2 (/dev/sdc) but hd2 isn't showing up on this list. While chrooted into the correct HDD, I have tried re-running grub2-mkconfig, without issue, but that didn't solve this problem either.

I did notice that when I reboot the computer to the Boot Menu, the drive that (should) have Linux isn't showing up in the menu.

I also noticed that /etc/fstab needed the drive letters changed, as moving the HDD's changed a/b/c around a bit. I changed these thinking that would be the simple fix, but I was mistaken. Just for reference, I have 

```

/dev/sda --> Backup

/dev/sdb --> Movies

/dev/sdc --> Linux
```

If there is any kind of help that you guys could give, as well as why this might have happened, I would be very appreciative, as this is driving me crazy!

----------

## VoidMage

I'm not quite sure, but you might need to run grub2-install - after the remapping, initial stage might not be pointed correctly.

It depends on such details like MBR vs. GPT and where was the initial stage installed to.

----------

## sinisterdomestik

That's one of the odd things after chroot'ing into the HDD, grub2-install isn't there. I've tried re-emerging it, but nothing.

The only drive mappings that changed, if I remember right, where sda and sdb. sdb was the old Linux mapping, and now its sda, maybe that has to do with it?

/EDIT

I take that statement back about grub2-install not being present, I have re-run that multiple times to make a new grub.cfg, but the computer still boots to the recovery mode console.

----------

## sinisterdomestik

Anyone have any other suggestions? If this is the wrong forum, please move this to the correct forum so that I can hopefully get this issue fixed. Thanks.

----------

## platojones

Have you confirmed that the files in /etc/grub.d have been updated to reflect your new HDD topology?  After that, you need to run grub2-mkconfig to generate your new grub.cfg.

I assume you are running grub2 in BIOS mode instead of UEFI mode.

----------

## sinisterdomestik

As far as I'm aware, all files have been updated to the new /dev/sd(x) names and I have run grub2-mkconfig a few times and checked the .cfg file to verify that it is correct. I can double check the files in /etc/grub.d just to be on the safe side.

As far as the BIOS vs UEFI, I have it installed on /dev/sdc and when running the mkconfig, I get the normal response

```

root # grub2-install /dev/sdc

Installation finished. No error reported.
```

After which I run grub2-mkconfig, which shows no errors either.

----------

## Prothervents

Simply try to repair your boot (grub) with boot-repair CD. You will find all the explications here. https://help.ubuntu.com/community/Boot-Repair

----------

## creaker

Can you post your grub menuentry? 

I had recently the same behaviour on boot: grub fault into rescue mode. 

For some unknown reason grub2-mkconfig put root=UUID=<UUID> instead of root=/dev/sda2, and I can't boot up until replaced UUID with /dev/sda2.

May be it is your case?

----------

## sinisterdomestik

So after running the Boot Repair tool once, here is the output of it. Hopefully this will shed some light on my situation.  

One odd thing I noticed, when I run the tool, it asks 

```
Is sdc (250GB) a removable disk?
```

 Now that is the HDD that has Linux on it, so I have tried answering yes and no.

This is after selecting NO

http://paste.ubuntu.com/6681768/

This is after selecting YES

http://paste.ubuntu.com/6681924/

Now the GRUB message has changed. The first line reads

```

error: no such device: 226c3a77-8191-4ed1-b326-af8a52ade45f
```

----------

## sinisterdomestik

One more thing that I've noticed after running grub2-mkconfig is that my /etc/fstab has changed. It now reads

```

#/dev/sdc1    /boot    ext4    defaults,noatime    0 2

/dev/sdc2    none     swap   sw                        0 2

/dev/sdc3    /           ext4    noatime                0 2

/dev/cdrom (blah blah)

/dev/sda1 (Windows backup drive)

/dev/sdb1 (Media backup drive)

UUID=4529a301-ecb0-4c31-917c-cde4cae1a43d    /boot    ext4    0 2

```

That UUID line was never in there before, and commenting it out did nothing. Changing the first line to add UUID in front of the /dev/sdc1 did nothing as well.

I have also hand edited /boot/grub/grub.cfg (after making a back up, of course!) to change all 226c3a77-8191-4ed1-b326-af8a52ade45f entries to 4529a301-ecb0-4c31-917c-cde4cae1a43d but the computer is still booting to recovery mode and it saying 

```
error: no such device: 226c3a77-8191-4ed1-b326-af8a52ade45f
```

 I'm not sure where it's getting that from, as it is nowhere in the .cfg file now.

----------

## sinisterdomestik

So I have gotten my system back up and running. It turns out, that

A) I had run the grub2-mkconfig WITHOUT adding the -o /boot/grub/grub.cfg....le sigh, I know ><

B) The SATA cable was bad, so replacing that allowed the HDD to show up on the boot menu

All in all, running the correct grub2-mkconfig and changing the drive letters and cables around, I am now able to get back into my system. 

Thank you for all the help and suggestions that pointed me in the right direction.

----------

