Grub rescue

madjack31 Posted messages 20 Status Member -  
madjack31 Posted messages 20 Status Member -
Hello,

When I start my PC, I get the following message:

error: attempt to read or write outside of disk hd0
entering rescue mode...
grub rescue>

6 answers

Fondue
 
Hello,

So you have a grub installed. However, it doesn't happen by itself. Explain.

And generate a boot-info report from a live-USB: https://doc.ubuntu-fr.org/tutoriel/boot-info#installation
0
madjack31 Posted messages 20 Status Member
 
Hi,
I don’t have any particular skills in computing and I don’t know what a grub is. I simply partitioned my disk in order to have access to an Ubuntu partition or a Windows partition via a menu that launches at startup. And it was after yet another crash of Ubuntu 14.04 (really, this OS is not reliable at all) that this message appeared when I powered it back on, without even offering me the OS choice menu.
0
jns55 > madjack31 Posted messages 20 Status Member
 
Hello,
Ubuntu 14.04 has been obsolete since April 2019... Since that date, there have been no updates.
The best solution is to reinstall a current version: Ubuntu 20.04.

Given the message, it's possible there is a problem with the hard drive.
If you can boot into Windows from the boot menu, install CrystalDiskInfo and check the status of your hard drive.
0
madjack31 Posted messages 20 Status Member
 
Hello,
thank you for the response. I'd like to install a new version of Ubuntu, but how do I take control? I don't have a boot CD or USB stick. Can I download a bootable version of Ubuntu onto a USB stick from another machine and then try to reboot my PC?
0
jns55
 
I just made a modification to my previous post. First, test your hard drive because repeated crashes of Ubuntu 14.04 are not normal; it was a really stable version.
0
madjack31 Posted messages 20 Status Member > jns55
 
I don't have control. During boot, I don't have access to the session choice menu. I only have the prompt behind grub rescue >
What should I do? Note that the keyboard is configured in Qwerty while I have an Azerty and it's impossible to reconfigure it...
0
jns55 > madjack31 Posted messages 20 Status Member
 
Through the grub menu, it's not possible but I understood that, try to go through the BIOS boot menu, it's a different screen.
When powering on, the shortcuts to access the BIOS and the boot menu are briefly displayed on the screen. Press the indicated key repeatedly for the boot menu right after powering on until it appears. Normally, you should have the option to boot into Windows (Windows boot-manager)...
0
madjack31 Posted messages 20 Status Member
 
Indeed, when I press the F2 key, I access the setup. I can see all the configuration of my machine in the information menu, ok. Then there is a Main menu:
Quick boot: [enable]
network boot: [enable]
F12 boot menu: [disable]
d2d recovery: [enable]
sata mode: [ahci model]

as well as a boot priority order menu:

1: usb fdd
2: usb hdd
3: usb cdrom
4: ide1: matshitadvd...
5: ide0: hitachi hts542...
6: network boot: mba v9.4.5 slot 0500

It is also indicated F9 Setup Default

I do not see a Windows Boot Manager. What should I do?
0
jns55
 
Is it an Asus?
There, you are in the BIOS setup page, that's not it. It's another key.
Look at the screen when powering on, you should see (often at the bottom of the screen when the manufacturer logo is displayed):
F2 BIOS setup
F? boot-menu (it could be esc, del, F12, F11, F10, etc...)
0
jns55 > jns55
 
It's good, I found it:
Go back to the BIOS setup, change the line
F12 boot menu: [disable] to [enable]
Save the BIOS and restart
Press the F12 key immediately upon power on until the boot menu appears now.
0
madjack31 Posted messages 20 Status Member > jns55
 
My PC is an Acer

Okay. The boot manager appears: I have 3 options presented:
4:IDE 1: MATSHITADVD- RAM UJ870QJ - ATAPI
5:IDE 0: Hitachi HTS542516K9SA00 - 160. GB
6:Network Boot: MBA v9.4.5 Slot 0500

What should I do?
0
jns55 > madjack31 Posted messages 20 Status Member
 
Well, this doesn't help us much because apparently your PC is old and doesn't boot in UEFI mode, but it will be useful for launching the Linux live USB.
All that's left is the bootable Linux USB drive.
Check out this tutorial; it's made for Linux Mint, but the method for creating the live USB is exactly the same for Ubuntu.
https://linuxmint-installation-guide.readthedocs.io/fr/latest/
0
madjack31 Posted messages 20 Status Member > jns55
 
Indeed, my PC is old (over 10 years). My computer knowledge is basic, so I don't understand everything.
I've watched the tutorial. The PC I'm using for troubleshooting runs on Windows 10. So I understand that I need to install Etcher. Okay? If so, should I choose Etcher for Windows or Etcher for Ubuntu, knowing that my broken PC is partitioned with Windows 7, 32-bit on one side and Ubuntu 14.04, 32-bit on the other? And finally, which ISO file should I select?
0
Fondue
 
Hi,

I'm afraid that sooner or later, you'll have to resort to creating a Linux liveUSB to be able to boot your machine into something and take a concrete look at the situation.
0
Pat
 
Good evening,
while doing an ls in grub rescue:
I noticed that the disk names were not logical compared to what they should be:
SATA 2 = HD0 = dev/sdb
SATA 3 = HD1 = dev/sdc
SATA 1 = HD2 = dev/sda

logically HD0 should be sda???
I have the impression that the BIOS has mixed up the disks from what they were until now.
The current HD0 is not a bootable disk (in my opinion SATA 1 should have been HD0 until today??)

Unplug the other 2 disks: SATA 2 and SATA 3

and there grub started correctly and I was able to boot into my base arch.

But we are on Linux if you have the courage and motivation

grub rescue > ls
(hd0) (hd0, msdos9)
grub rescue > ls (hd0,msdos9)/
grub rescue > ls (hd0,msdos8)/
grub rescue > ls (hd0,msdos5)/ # suppose this is root and bootloader of linux
grub rescue > ls (hd0,msdos5)/
grub rescue > set root=(hd0,msdos5)
grub rescue > set prefix=(hd0,msdos5)/boot/grub
grub rescue > insmod normal
grub rescue > normal
Now, the system boot menu appears. Boot into Linux.
sudo update-grub
sudo grub-install /dev/sda # If the drive is hd0 the equivalent is sda, if it's hd1 then use sdb

OTHERWISE THE SIMPLEST INSTALL but if you have lost data

In the installation choice, you must select "erase disk and install Ubuntu," and check the LVM box! ?
And there you go.
0
jns55
 
Hi,
When you quote a procedure from another forum, the least you can do is cite the source.

https://askubuntu.com/questions/397485/what-to-do-when-i-get-an-attempt-to-read-or-write-outside-of-disk-hd0-error
(Second response in the thread)
0
Pat
 
Exactly, the forum that I contributed to.
0
jns55 > Pat
 
In that case, you have read the comments.
0