Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] GRUB2 unable to boot system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sinisterdomestik
l33t
l33t


Joined: 28 Aug 2003
Posts: 683
Location: Texas

PostPosted: Wed Jan 01, 2014 7:08 pm    Post subject: [SOLVED] GRUB2 unable to boot system Reply with quote

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
Code:
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
Code:

/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!
_________________
Thou shalt NEVER speak of removing thine Linux


Last edited by sinisterdomestik on Sat Jan 04, 2014 3:33 am; edited 1 time in total
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6193

PostPosted: Wed Jan 01, 2014 8:30 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
sinisterdomestik
l33t
l33t


Joined: 28 Aug 2003
Posts: 683
Location: Texas

PostPosted: Wed Jan 01, 2014 8:41 pm    Post subject: Reply with quote

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.
_________________
Thou shalt NEVER speak of removing thine Linux
Back to top
View user's profile Send private message
sinisterdomestik
l33t
l33t


Joined: 28 Aug 2003
Posts: 683
Location: Texas

PostPosted: Thu Jan 02, 2014 4:15 pm    Post subject: Reply with quote

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.
_________________
Thou shalt NEVER speak of removing thine Linux
Back to top
View user's profile Send private message
platojones
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1595
Location: Just over the horizon

PostPosted: Thu Jan 02, 2014 5:46 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
sinisterdomestik
l33t
l33t


Joined: 28 Aug 2003
Posts: 683
Location: Texas

PostPosted: Thu Jan 02, 2014 5:53 pm    Post subject: Reply with quote

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
Code:

root # grub2-install /dev/sdc
Installation finished. No error reported.


After which I run grub2-mkconfig, which shows no errors either.
_________________
Thou shalt NEVER speak of removing thine Linux
Back to top
View user's profile Send private message
Prothervents
n00b
n00b


Joined: 02 Jan 2014
Posts: 5

PostPosted: Thu Jan 02, 2014 6:01 pm    Post subject: Reply with quote

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
_________________
The real problem is not whether machines think but whether men do.
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Thu Jan 02, 2014 9:14 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
sinisterdomestik
l33t
l33t


Joined: 28 Aug 2003
Posts: 683
Location: Texas

PostPosted: Fri Jan 03, 2014 1:30 am    Post subject: Reply with quote

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
Code:
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
Code:

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

_________________
Thou shalt NEVER speak of removing thine Linux
Back to top
View user's profile Send private message
sinisterdomestik
l33t
l33t


Joined: 28 Aug 2003
Posts: 683
Location: Texas

PostPosted: Fri Jan 03, 2014 4:44 am    Post subject: Reply with quote

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

#/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
Code:
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.
_________________
Thou shalt NEVER speak of removing thine Linux
Back to top
View user's profile Send private message
sinisterdomestik
l33t
l33t


Joined: 28 Aug 2003
Posts: 683
Location: Texas

PostPosted: Sat Jan 04, 2014 3:33 am    Post subject: Reply with quote

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.
_________________
Thou shalt NEVER speak of removing thine Linux
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum