{SOLVED} grub rescue message after install of disk image

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

{SOLVED} grub rescue message after install of disk image

Post by ES44AC8102 »

I made a mess of my Mint install and had to use an Acronis image to repair it. For whatever reason it failed miserably and I can boot only to W7, I get a grub rescue message when I try to boot Mint. Note that I have done many Acronis restores of only Mint and they worked fine tonight was the exception fwiw.

On this machine Grub is on /dev/sda3 and does NOT control booting of W7, I use a program called "Easy BCD" to handle the booting, it resides in W7.

I am afraid to use a Grub rescue disc for fear it will put Grub on /dev/sda2 where it will control both OS's. Yes I have searched the forum and there are so many ways I don't know which one I need. The whole idea of having W7 and Mint use their own bootloaders was that if one failed you'd have the other one, well we can see how that's working out! <sigh>

Here are screenshots of the drive and the error message:
IMG_1254 (Small).JPG
NB: The missing line says bss=0x0,entry=0x100990]
IMG_1253 (Small).JPG
I hope there is an easy solution :D I clearly need to find out why my image(s) failed me its a sick feeling when what you depended on to work didn't! :(

Thank you all very much!

"ES"
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: grub rescue message after install of disk image

Post by fabien85 »

At the grub rescue prompt, try the following commands

Code: Select all

set root=(hd0,2)
set prefix=(hd0,2)/boot/grub
insmod normal
normal
If that work, you should get to the normal grub screen where you can start Mint.
Does it work ? If it fails, at which point, and with which error message ?

One potential fix is to run fsck on /dev/sda3 from a live CD.
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: grub rescue message after install of disk image

Post by ES44AC8102 »

Hi fabien85,

Here's a shot of the screen using your suggested commands:
IMG_1255 (Small).JPG
I took what you said literally and started with "Code: Select all" , but that didn't work, maybe you wanted me to use all the code below that line.....? So I tried that as well.

It fails with an 'unknown file system message' as you can see. That puzzles me because it's EXT4 as I have shown in the Gparted screen grab.

I do have a Live CD here but I've never had occasion to run it on a system that is already installed, not sure how to run fsck on /dev/sda3''
The Easy BCD program does have a boot cfg backup but again I've never used it and don't want to make a bad situation worse by doing so. :?

Regards,

"ES"
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: grub rescue message after install of disk image

Post by fabien85 »

Hi,
Indeed the "Select all" is not part of the commands, it's just the way the forum formats code snippets.

Ok it's time for a filesystem check. Boot your live CD, open a terminal (Menu > Administration > Terminal) and type the following command : sudo fsck /dev/sda3.
If there is no problem, you should get something like this :

Code: Select all

$ sudo fsck /dev/sda3
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/sda3: clean, 11/2142288 files, 179489/8552448 blocks
(where obviously the number of files and blocks will be different for you)

If you get something different, report here the message.

(by the way the grub rescue mode means that grub started well, but it couldnt find it's config file, which is normally located on the linux partition at /boot/grub/grub.cfg, and so it doesnt know what it's supposed to boot next. So the problem is mostly to check that the linux partition is okay, and redirect grub to read it and find its config file there.)
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: grub rescue message after install of disk image

Post by ES44AC8102 »

Fabien85,

Hello again, here is the file output from the command you gave me:

mint@mint ~ $ sudo fsck /dev/sda3
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/sda3 is mounted.
e2fsck: Cannot continue, aborting.

It clearly doesn't look like your example! So I guess we have to show Grub where to boot next as you suggest.

I can't overstate the fact that I appreciate your helping :) in a problem that I caused, <sigh> WHY it failed remains a mystery and makes me question my other backups as well,,,normally I could easily have restored ALL of Mint and gone on my merry way. Mint was fine before I decided to install a program from a PPA, that failed and I thought "I can just restore an image and it'll be fine: ha! I ended up with both W7 and Mint not booting. Finally got 7 to boot but not Mint as you can see. It's a shame because I have been having W7 troubles for months now, but Mint always ran fine without any troubles, except losing the sound once in a while. Oh well I'll let the repair work in your hands it's obvious that I don't know how. But I am willing to learn and already have. :!: I have the Live CD/DVD already to go!

thanks again,

"ES"
WharfRat

Re: grub rescue message after install of disk image

Post by WharfRat »

ES44AC8102,

Your results

mint@mint ~ $ sudo fsck /dev/sda3
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/sda3 is mounted.
e2fsck: Cannot continue, aborting.

You can't fsck a mounted partition :wink:
lostfarmer

Re: grub rescue message after install of disk image

Post by lostfarmer »

Hi all. I will have do disagree with what "fabien85" has posted (you are normally correct). Linux is installed on sda3 which is (hd0,msdos3) not (hd0,2). What I am not sure of if (hd0,3) will work yet or not, or if one must specify msdosx or gptx(?). (hd0,2) is the ntfs partition and would expect 'unknown file system error'.

https://www.gnu.org/software/grub/manua ... ntion.html
The partition numbers are counted from one, not from zero (as was the case in previous versions of GRUB).

Also if grub can not find its grub.cfg the error will not be the grub rescue mode. Grub rescue mode indicates grub can not find any of the needed grub files contained normally at /boot/grub/i386-pc or /boot/grub/x86_64-efi. If only grub.cfg is not found , it will put grub into a fully functional grub prompt, not the very limited grub rescue prompt .

Have a good day.
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: grub rescue message after install of disk image

Post by fabien85 »

Thanks lostfarmer for the corrections, I forgot that numbering issue (I wonder why they didnt use the same numbering for drives, which start at 0, and partitions).
So the updated instructions are :
- at the grub rescue prompt, issue the following command (just what's in the box) :

Code: Select all

set root=(hd0,msdos3)
set prefix=(hd0,msdos3)/boot/grub
insmod normal
normal
If that's successful, you should get to the normal grub screen, where you should be able to boot Mint. If that succeeds, in Mint issue the following command :

Code: Select all

sudo grub-install /dev/sda
For the fsck, as WharfRat says it cannot be done on a mounted partition. Did you run it from the live CD ? If so, make sure that the partitions of the internal drive are not mounted : open the file manager, and in the left column unmount everything in the section "devices" by clicking on the sort of vertical arrow (at least that's how it works for Cinnamon, adapt if you use a different desktop version). Then retry the fsck from the terminal.
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: grub rescue message after install of disk image

Post by ES44AC8102 »

Hello all,

I must ask the question, in the last instructions:

Code: Select all

sudo grub-install /dev/sda
Won't that put Grub in charge of booting W7 as well? My Grub is on /dev/sda3 I don't want Grub controlling W7, just Mint

Shouldn't it be:

Code: Select all

sudo grub-install /dev/sda3 
Surely not a criticism just a question, I am anxious to try the things suggested but will hold off until I get confirmation on the install instructions :wink:

Best regards, to everyone helping,

"ES"
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: grub rescue message after install of disk image

Post by austin.texas »

If you are using "Easy BCD" as your boot manager, then the problem most likely is not a Grub problem, but a "Easy BCD" problem. Unfortunately, I am not familiar with "Easy BCD".

I can point out that the instructions for booting given by fabien85 are correct if you are at the Grub prompt - which looks like this :arrow: grub>
Those instructions will not work at the grub rescue> prompt. grub rescue> needs some additional steps to make it work - specifically, you have to load some modules manually.
It should go like this:

Code: Select all

set root=(hd0,msdos3)
set prefix=(hd0,msdos3)/boot/grub
insmod part_msdos 
insmod linux
linux /vmlinuz root=/dev/sda3
insmod (hd0,msdos3)/boot/grub/i386-pc/normal.mod
normal
Having said that, I don't know how you are going to fix your "Easy BCD" after booting into Mint. It seems like that would be done from Windows ???
I do know that if you install Grub to the MBR, you should have both Mint and Windows on the Grub menu - and that would be my preferred solution.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: grub rescue message after install of disk image

Post by ES44AC8102 »

HI austin.texas,

Thanks for your interest in sorting out my self inflicted troubles :D

Easy BCD can make it's own backup of the boot menu so you can restore it if there is trouble. Unfortunately the backup that exists was dated yesterday! Hardly of use since the thing won't boot to Mint, I chose not to use the backup file for that reason.

https://youtu.be/xlTgaWs9BD0?t=26m41s

I can, I believe make Easy BCD work if I can get the Grub issue sorted. What I may end up doing is removing EBCD from Win7 once I get Mint going again. If I have a working W7 and Mint I can deal with EBCD, of course the MBR of W7 won't even know Grub is there, I have to use EBCD to tell it where Grub is. That part is easy, in fact I could remove EBCD now, along with it's backup and it shouldn't hurt anything (I think...... with fingers and toes crossed)!
I only say this because right now Mint won't boot , I am not sure what effect, if any, EBCD has on Mint once it's running since it resides in W7. All I know is that I can't access Grub without EBCD. I don't like having one bootloader for two OS's if it fails you can't run either one. Look at the situation now, I have W7 but no Mint, at least I can operate until I get Grub squared away.

I surely cannot fault anyone's ideas as to how to fix it, I just don't know enough to do it on my own. :cry:

On a dual boot system how would you access either OS, independent of EBCD? Say for instance I wanted to run only W7? I'd assume you'd have to use a rescue disk or install disc to do it, same goes for Mint. How to access Grub w/o a Live CD?

Don't mean to go off topic just trying to make the system boot and be dependable like it has been for so many months.
EBCD.JPG
EBCD 2.jpg
Cheers

"ES"
Last edited by ES44AC8102 on Sat Jul 22, 2017 12:34 pm, edited 2 times in total.
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: grub rescue message after install of disk image

Post by austin.texas »

ES44AC8102 wrote:On a dual boot system how would you access either OS, independent of EBCD?
When you install Grub to the MBR, your Windows 7 should be detected and listed on the Grub menu, so that you can boot either OS.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: grub rescue message after install of disk image

Post by ES44AC8102 »

Hi austin,
The commands you suggested did in fact bring me to the Grub screen as normal... then pages of stuff went flying past and left me with the message:

initramfs 16.864104 random non blocking pool is initialized

It never allowed me to see the OS, but Grub did appear on screen as it normally would! Hope that's a good sign!

Do I reinstall it (Grub) from the Live CD or ???

Code: Select all

sudo grub-install /dev/sda3 
Thanks,

"ES"
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: grub rescue message after install of disk image

Post by austin.texas »

I think you will have to use your live Mint DVD.
Mount the Mint root partition at /mnt:

Code: Select all

sudo mount /dev/sda3 /mnt
Enter all these commands:

Code: Select all

for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done

Code: Select all

sudo chroot /mnt
The prompt will change to a root prompt.

Code: Select all

update-initramfs -u
Install Grub to sda. This will replace EasyBCD.

Code: Select all

grub-install --recheck /dev/sda

Code: Select all

update-grub
CTRL-D to exit chroot
CTRL-D to exit the terminal
Your new Grub menu should list both Mint and Windows.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: grub rescue message after install of disk image

Post by ES44AC8102 »

Hi austin,

Thank you very much, that's a lot of typing for you :D

Why are you against putting Grub on /dev/sda3 as I have it now? I can see you are a fan of letting Grub do it all, but not so much for me. In this case won't I then really have 2 instances of Grub, one at /sda and the broken one at /sda3?

You see no advantage to having the two bootloaders separate from each other?

Thanks again for taking the time to help and thanks to every one else involved too! Great forum and wonderful support that's why I always tell people about Linux and of course Mint.

Regards,

"ES"
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: grub rescue message after install of disk image

Post by austin.texas »

ES44AC8102 wrote:Why are you against putting Grub on /dev/sda3 as I have it now?
That is what you did when using EasyBCD. As I mentioned, I have no experience with EasyBCD, so I don't know what you accomplish by putting Grub on /dev/sda3. If you think EasyBCD will see and use that Grub, try it.
Change the command grub-install --recheck /dev/sda to

Code: Select all

grub-install --recheck /dev/sda3
and see if it works.
ES44AC8102 wrote:You see no advantage to having the two bootloaders separate from each other?
I do, to some extent. But you have already mentioned that you have EasyBCD backed up, so that backup should suffice, I would think... :|
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: grub rescue message after install of disk image

Post by ES44AC8102 »

austin.texas,

Well I am sure that either way is fine, and I don't wan to seem ungrateful by asking the question. You have probably forgotten more than I could ever hope to know about Linux or specifically Mint! If I can pick up a few crumbs of knowledge along the way I'm happy with that! :D I have a spinner HD here that has XP W7 and Ubuntu on it and of course EBCD. It never gave ma bit of trouble in all the time I used it.

My Acronis backup program is what caused this issue in the first place, I don't hold EBCD responsible at all. I have done many images of W7 and Mint with Acronis and never had an issue, for whatever reason this restore really went off the rails. Mercifully I do a full backup of my system each week so I had that to fall back on. But I now doubt the efficacy of those images for obvious reasons. I trashed Mint by trying to install Avidemux, a version that was not yet available for use in Mint. I found a PPA site and used that, of course the program wouldn't run and it took a lot of the 'lib.xxxx" files OUT. I thought "OK np, I'll use an image and be back where I was prior to the failed install' that's how it all started. When I attempted to reboot even W7 wouldn't start let alone Mint! So that's how it all came to be, I'd rather blame myself for my ignorance in using Acronis the wrong way, rather than EBCD. It's been months and months since I've had to restore anything, if I did it every day it would be a different story! <sigh>

Oh well thanks to you and the others I have a chance at saving a very reliable OS, rather than blowing it out and starting over. So that's how it all got started, I should have known better than to try and install something that wasn't 'approved.' I'm sure too that if I install the recommended Avidemux it will have broken lib. files in it or will need some installed.

Best wishes and thanks again I will let you know how I get on!

Cheers,

"ES"
ES44AC8102
Level 4
Level 4
Posts: 255
Joined: Tue Oct 14, 2014 4:53 pm

Re: grub rescue message after install of disk image

Post by ES44AC8102 »

austin.texas

I wanted you to know that I tried your commands:

Code: Select all

for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
and I got the message: "chroot:failed to run command '/bin/bash' no such directory" << quotes are mine

Sounds pretty dire to me, it seemed fine up until that point after that even the Live CD didn't want to do anything.

Thanks,

"ES"
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: grub rescue message after install of disk image

Post by austin.texas »

I have done that procedure many times and never gotten any error message. Was this the live Mint DVD? Which version?
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
lostfarmer

Re: grub rescue message after install of disk image

Post by lostfarmer »

Did you first do -- sudo mount /dev/sda3 /mnt ? That would give you that error if sda3 not correctly mounted.

If it is auto-mounted some place else on boot up, might first have to umount it. You can check and umount with program 'disk' .
Locked

Return to “Installation & Boot”