GRUB Hangs on Linux Mint

Late last night a client turned up with a non working computer. Not unusual.

Switched on and just a grub display. Ok not quite. Totally black screen except the word grub

Tried reboot, typing exit, ctrl C, esc. Restart and tab key…

All the normal stuff to get it to restart and move to something else. Returns to just grub.

Its a system i put linux mint onto around 2 years back so will guess mint 20 or 21. Posible mate version. Hp computer, been fine up to now.

This user has a habit of just switching off not closing down correctly and installing stuff outside of repositories, and getting to command line then being stuck.

Not tried anything yet to fix as busy most of the day.

First time for me at this point

Any suggestions before i start

1 Like

Check the disks SMART, if it is about to die (lots of read errors, pending/reallocated sectors, maybe end-to-end errors), replace the disk - no need to fiddle with repairing the system.

2 Likes

Short of booting to a external usb how do you get to this from grub.

Not tried bios yet

Not sure if this hp has a control center not yet checked

1 Like

Boot a live system, say LMDE live :wink:

Then from a terminal:
sudo smartctl -a /dev/sdX
X refers to the disk in the computer.
If 'smartctl" is not available in the live, install it first:

sudo apt update
sudo apt install smartmontools
2 Likes

That is a grub command prompt grub>
It does that when there are no menu entries … ie nothing in the file /boot/grub/grub.cfg

You can boot it with grub commands from the prompt
provided Mint is still on the disk

There is an example here

get the file makeusb.pdf (see section 2.5)

I believe you can also do it by booting another linux from flash drive, mount the Mint root filesystem, chroot into it, and do update-grub… never tried that

Also check what Laslo suggested. If disk is faulty there is no point

4 Likes

Boot the PC with a super grub2 and see if it can find a grub entry to boot!!!

4 Likes

Ok tried tonight to do a repair.

Hp disk test says everything is fine on the system, hard disk checks ok,
No errors found anywhere on disk memory graphics the works.

Tried to boot to external usb, no problem
Comes up to normal startup menu ready for install from lmde, then nothing, just hangs, tried compatibility mode says error then fails but message goes away too quick to read

The system is 64 bit as is lmde.

Out of whats next tried linux mint 32 bit mate 19, that boots ok and can see the hard drive and client files. But can also see a windows drive with everything still in place, which is bizarre as normally i kill the whole drive before putting mint on, having copied the user files off.

But the grub is totally empty, nothing in that area, so all the suggestions of repair or fix have nothing to work on.

Tomorrow going to copy client files to external disk, wipe everything , create one drive so no windows portion then try installing 32 bit mate. To see if it boots.

If that works ok

Will try another copy of lmde 64 bit to see if that boots, in case of fault on my usb key.

If that works will try an install again clean then copy back files.

But what he has done to wipe the grub or stop it booting is anyones guess.

Thanks for your help and useful suggestions, get the feeling its not a quick fix

2 Likes

You mean the EFI partition is empty?
but grub is present… otherwise you would not get that grub> prompt
therefore grub must be is the MBR
Is the bios set to legacy boot? it should be if the grub is in the mbr.

He might have

  • installed Win on top of Linux
  • wiped parts of the /boot partition
  • moved the bios to uefi boot
  • removed a boot flag

It might still boot, but I guess fresh install is easier

Some strange bios setting maybe. Maybe the Win install did something.
If it persists after wipe disk, look at bios settings.

4 Likes

I would suggest the same…

1 Like

I tried to repair the errors and none of the suggested methods worked.

So did a clean install of mint from a usb to mate 19 32 bit… then tried booting after everything in the 8ntall worked fine …

Reboot and error 3f0 hard disk faulty.

Just like

Thought been here before !

Boot this time to a new downloaded version of lmde having failed with the copy yesterday, but no reason why.

Re ran install and selected the grub to go to sda the default. Install fine no errors

Reboot and again 3f0 error.

Reran hp test of system no errors found anywhere on disk, memory, system total.

Formatted the hard disk totally wiped every partition so it was like a new disk. No errors found no faulty sectors or tracks all reports clean.

Reboot to usb, re install but this time chose sda1 for grub. Install worked fine. System up and running as it should be. User files copied back. Just waiting to reboot and run system update.

Still have no idea what went wrong with grub in first place or why the error codes but more worrying is, will this return if there is a fault on motherboard and connection to disk could that be why it failed before. User tells me all had been well till he connected a cooling fan tray below it as temperature in his apartment was going towards 35, normal here in high summer.

2 Likes

So you put grub in the EFI partition (sda1.) ?.
That means uefi boot.
Or did you mean you put grub on sda?
That means legacy boot

Which is it?

I still think that 3f0 error means it cant find a bootable disk. That means grub install not right or boot flags issues.
The bios boot method (legacy or uefi) has to match the way you setup grub on the disk, and that can depend on whether the disk partition table is msdos or gpt.
The options are

  • legacy boot, msdos partition table, grub in mbr
  • legacy boot , gpt partition table, grub in bios-grub partition
  • uefi boot , gpt partition table, grub in EFI system partition

Any other combinations will fail
I addition if it is legacy boot the disk may need a boot flag on one partition
It is a minefield

3 Likes

Yepp…This happened my old Mint install too…

Edit: I fixed it by just using the boot repair tool from the live USB. Although I don’t remember the exact process…

1 Like

I tried several different boot repair tools and none fixed the issue…

I tried lmde on sda without specifying a number and tried both efi and ufei boot neither solved the issue. By default it was set to sda.

So 3rd install and selection sda1 again tried efi and uefi boot both worked and system now running fine.

What i dont know is what went wrong innthe first place and why it now works having spend all day on solving it. Just one of those strange things.

Giving it back to the client tomorrow and see if he breaks it again and if so how. At the back of my mind there is still an issue but location hard to discover.

Interesting the windows area that showed at one stage has now gone, not going to run the hp control centre to see if it still offers recovery now after formatting, that could be in a bios area.

Thanks for all the help and suggestions

1 Like

Next time, do it systematically

  • set bios to legacy or uefi
  • use gparted… wipe disk, make partition table to suit boot method, make partitions to suit boot method, put a boot flag on the root partition if it is legacy boot
  • use the installer , skip the partitioning except for mounts, tell it where to put grub and make sure you tell it correctly… if you give a disk name (sda) it means put it in the MBR if the partition tsble is msdos, but it means use the bios-grub partition if the partition table is GPT , if you say a partition name (sda1) it has to be an EFI partition.

Just throwing the installer at it works sometimes. If you want it to always work, do it by the above 3 step method.

If you get those 3 steps right, and the disk is not faulty, and the bios is not losing its memory, there is nothing else I can see that could go wrong.

6 Likes

I will try to bare in mind our exchange if i get another one similar to do.

But still question why it went wrong in the first place and why the bios and sda or sda1 was wrong. Only answer i came up with was faulty cmos but its a major change on this one to get to the battery as the case is clipped not screwed so risk of breaking to open.

1 Like

I think the most likely scenario is the owner tried to install Windows on top of Linux. Did you ask?

Yeah. You will get away with install scripts 95% of the time, but a nasty problem like this needs more hands on .

1 Like

He tells me he only moved the box from its normal place to get it out of the sun… but not sure as he likes playing, but he pays well and recommends me to others so learning experience

2 Likes

When all else has failed, I have had good luck with boot-repair-disk.

4 Likes

I move my PC cases, quite often, nothing is changed, as for as booting the PC, unless I do the changing!!!

3 Likes

Of course not. The only thing moving could possibly do is damage the disk… not likely with todays disks.

3 Likes