[GRUB2] Cannot find grub directory

Help with issues regarding installation of Debian

[GRUB2] Cannot find grub directory

Postby ErViandante » 2020-10-22 10:09

Hi,
as title says, after a fresh installation on my 32 bit laptop, I'm stuck in grub rescue shell getting the error: attempt to read outside (hd0)
So, I searched on the net and find different topics. What I ve understood is: for some reason my installation of grub bootloader went wrong
(and it seems to have all the intention to keep doing that, since I tried to install Debian from the beginning already 3 times now and I get always the same error...)
So the idea is to set the right path of grub directory so I can exit rescue mode and boot in grub shell (using insmod), then run upgrade-grub as root, to clean up eventually any error in the grub files, right?
If that is the right approach, what I have already checked is:
-I tried to set root, and set the prefix like this: "set root= (hd0,msdos1)" "set prefix= (hd0,msdos1)/boot/grub"
But insmod keep telling me the error "attempt to read..." so I checked everything worked using the command "set" and it was all correct
-I used ls on my partition and I found (hd0,msdos1) to be the right one where my debian is installed (I assumed that, since the output of "ls (hd0,msdos1)" is "Filesystem is ext2")
-I navigated through different directory searching for the grub/ folder first using ls (hd0,msdos1)/ and then looking in some folders like boot/, root/, etc/
what I discovered is: boot/ folder is unaccessable (or maybe empty) since I tried "ls (hd0,msdos1)/boot" and what I got was the same error "attempt to read..."
I checked inside etc/default/ folder and inside there I ve found "grub" and "grub.d/" so I tried to set the prefix and to run again insmod on both but the first returns the output "is not a directory" and the second returns:
"normal.mod is not present"
So I aknowledged thats the file I have to be looking for but i have no ideas at this point. Any help?
ErViandante
 
Posts: 8
Joined: 2020-10-22 09:36

Re: [GRUB2] Cannot find grub directory

Postby p.H » 2020-10-22 11:46

ErViandante wrote:So the idea is to set the right path of grub directory so I can exit rescue mode and boot in grub shell

Changing the prefix path won't help. A wrong path causes different error messages such as "file not found".

ErViandante wrote:then run upgrade-grub as root, to clean up eventually any error in the grub files, right?

"upgrade-grub" does not exist. If you mean "update-grub", it just creates /boot/grub/grub.cfg which is used only when GRUB enters normal mode. it won't fix errors which spawn the rescue prompt.

I am not sure what causes the error "attempt to read outside (disk)". Maybe a filesystem corruption on disk, a faulty GRUB driver for the filesystem, a faulty BIOS which cannot access the whole disk capacity (often if above 2 TiB)...

What is the disk capacity ? How did you partition it ? Did you try to create a small /boot partition with a simple filesystem (ext2) at the very beginning of the disk ?
p.H
 
Posts: 1521
Joined: 2017-09-17 07:12

Re: [GRUB2] Cannot find grub directory

Postby CwF » 2020-10-22 11:54

ErViandante wrote: "ls (hd0,msdos1)" is "Filesystem is ext2"

Is this encrypted?
CwF
 
Posts: 810
Joined: 2018-06-20 15:16

Re: [GRUB2] Cannot find grub directory

Postby ErViandante » 2020-10-22 12:35

p.H wrote:
I am not sure what causes the error "attempt to read outside (disk)". Maybe a filesystem corruption on disk, a faulty GRUB driver for the filesystem, a faulty BIOS which cannot access the whole disk capacity (often if above 2 TiB)...

What is the disk capacity ? How did you partition it ? Did you try to create a small /boot partition with a simple filesystem (ext2) at the very beginning of the disk ?


The hard disk capacity is 150 gb, is an old Acer laptop.About the second question: I m not really sure what type of partition I created, since I used the guided partition proposed by the debian installer I used. I m sure he created a small swap portion (something around 2 gb) and then it used the rest of the capacity to create a single big partition, but I don't know its type.

p.H wrote:
Did you try to create a small /boot partition with a simple filesystem (ext2) at the very beginning of the disk ?


I remember the installer asked me about this and I selected to set all files in a unique partition (no separated /home or /var /tmp partitions) just because it was labelled as the recommended (for a linux newbie)

CwF wrote:
ErViandante wrote: "ls (hd0,msdos1)" is "Filesystem is ext2"

Is this encrypted?


what do you mean by "encrypted" ?
ErViandante
 
Posts: 8
Joined: 2020-10-22 09:36

Re: [GRUB2] Cannot find grub directory

Postby CwF » 2020-10-22 12:45

ErViandante wrote:what do you mean by "encrypted" ?

Well, that is how it shows when you're locked out of a full disk encrypted volume...? You didn't say it was, just taking a stab at the issue...
CwF
 
Posts: 810
Joined: 2018-06-20 15:16

Re: [GRUB2] Cannot find grub directory

Postby ErViandante » 2020-10-22 13:19

CwF wrote:Well, that is how it shows when you're locked out of a full disk encrypted volume...? You didn't say it was, just taking a stab at the issue...


Ye don't worry ask what you want, if it helps understanding how I can solve my error, is more than welcome :D I was genuinely asking what encrypted meant cause I m not really used to linux os.
Btw if a partition is encrypted, it means I cannot have fully access to the files?
ErViandante
 
Posts: 8
Joined: 2020-10-22 09:36

Re: [GRUB2] Cannot find grub directory

Postby CwF » 2020-10-22 13:38

ErViandante wrote:Btw if a partition is encrypted, it means I cannot have fully access to the files?

Yes, you would know if you installed it? If you did then
Code: Select all
grub rescue> insmod luks

and see what you get.
CwF
 
Posts: 810
Joined: 2018-06-20 15:16

Re: [GRUB2] Cannot find grub directory

Postby p.H » 2020-10-22 14:13

Guided partitioning creates a plain ext4 root partition. GRUB should have no trouble reading it.
How old is that laptop ? Is it an IDE or SATA disk ?
Unless the BIOS is older than 2000-2002 and lacks LBA48 support for > 128 GiB/137 TB disks, it should be able to address all of a 150 GB disk.
If the BIOS is really old and has drive settings such as LBA/CHS/LARGE, try to change it (it should be LBA or auto).
p.H
 
Posts: 1521
Joined: 2017-09-17 07:12

Re: [GRUB2] Cannot find grub directory

Postby ErViandante » 2020-10-22 14:40

CwF wrote:Yes, you would know if you installed it? If you did then
Code: Select all
grub rescue> insmod luks

and see what you get.


As I sayd, I m not really used to Linux distro, and I don't know if is ecrypted. Is there a way to check that? Just to be sure.
And can you explain me what
[code]>insmod luks[code]
does?

p.H wrote:Guided partitioning creates a plain ext4 root partition. GRUB should have no trouble reading it.
How old is that laptop ? Is it an IDE or SATA disk ?
Unless the BIOS is older than 2000-2002 and lacks LBA48 support for > 128 GiB/137 TB disks, it should be able to address all of a 150 GB disk.
If the BIOS is really old and has drive settings such as LBA/CHS/LARGE, try to change it (it should be LBA or auto).


The laptop is pretty old indeed, 2002 if I m not wrong
The bios is Acer 2000 v 1.07 but I m not certain of its specific year, is there a way to check that online?
The hard disk has been upgraded and it s a Wester Digital wdc wd1600beve-00a0ht0 and if I checked correctly, it s a SATA disk.
p.H wrote:If the BIOS is really old and has drive settings such as LBA/CHS/LARGE, try to change it (it should be LBA or auto).

Do you mean the drive settings? Can that be changed from the bios?
ErViandante
 
Posts: 8
Joined: 2020-10-22 09:36

Re: [GRUB2] Cannot find grub directory

Postby p.H » 2020-10-22 15:39

A SATA drive on a 2002 laptop ? That seems early. My 2005 laptop still came with an IDE drive.

[EDIT] According to a quick search, wd1600beve-00a0ht0 seems to be PATA/IDE, not SATA.

Yes, the BIOS may have drive settings which can be changed.
Last edited by p.H on 2020-10-23 09:51, edited 2 times in total.
p.H
 
Posts: 1521
Joined: 2017-09-17 07:12

Re: [GRUB2] Cannot find grub directory

Postby ErViandante » 2020-10-22 18:58

Ye, the original hard disk has been replaced by a bigger one, so this one is more recent. I checked the bios, looking for some settings that could let me fix the lack of this LBA48 and unfortunately I found nothing :roll:
But help me understand one thing. Missing this LBA48 would cause my laptop to be unable to use partition bigger than 130 gb right? the problem would be that debian don't know this and installing the os using the whole hard disk, then it cannot access those files in the "unavaible" part of the hard disk, right?
So...I think about this 2 possibilities.
1-update the bios and hope the upgraded version support this LBA48, something capable of managing bigger hard disk
2-change the partition settings during the installation

In particular, I would try the second one, since I m not really confident in upgrading the bios.
Do you think the second method would work somehow? Maybe using a double partition, or maybe starting to write files from the bottom of the hard disk instead of the default top of the hard disk?
If you think this will work, can you please guide me in the procedure of manual partitioning, telling me which settings I should use ?
ErViandante
 
Posts: 8
Joined: 2020-10-22 09:36

Re: [GRUB2] Cannot find grub directory

Postby p.H » 2020-10-22 19:50

ErViandante wrote:Missing this LBA48 would cause my laptop to be unable to use partition bigger than 130 gb right?

Not exactly. First, not the laptop but the BIOS (and GRUB when using the disk BIOS call, which it does by default). Second, not a partition but the disk space beyond 128 GiB. GRUB using disk BIOS call would not be able to read a partition of any size beyond that limit. But the Linux kernel does not use the disk BIOS call and can read an write the whole drive.

ErViandante wrote:So...I think about this 2 possibilities.
1-update the bios and hope the upgraded version support this LBA48, something capable of managing bigger hard disk
2-change the partition settings during the installation

Correct, if it is an LBA48 issue.

ErViandante wrote:Do you think the second method would work somehow?

At least it is worth a try, and easy to do. Either select guided partitioning with separated /home (this will create a smaller root partition at the beginning of the disk), or select manual partitioning and create a root partition of 20 GB (for example) at the beginning of the disk, type ext4, mount on / and install a minimal system (no desktop environment) to save time. If boot works, then you can do a new installation with the final layout (separated /boot or /home).
p.H
 
Posts: 1521
Joined: 2017-09-17 07:12

Re: [GRUB2] Cannot find grub directory

Postby ErViandante » 2020-10-23 13:39

p.H wrote:At least it is worth a try, and easy to do. Either select guided partitioning with separated /home (this will create a smaller root partition at the beginning of the disk), or select manual partitioning and create a root partition of 20 GB (for example) at the beginning of the disk, type ext4, mount on / and install a minimal system (no desktop environment) to save time. If boot works, then you can do a new installation with the final layout (separated /boot or /home).


It worked! I manually partitioned the disk in 3 parts (for whoever will need this in future):
-the root partition primary 30 gb, ext4 format, set as bootable in the settings(/)
-the swap partition logic 8 gb
-the home partition logic using the rest of the avaible free space less than 120 in my case, ext4 format(/home)
and repeated the installation setting the grub bootloader in the same hard disk. Nothing special in end :D

Thank you for you help and tips p.H
Can I ask you 1 last thing in the end?
After the login in the desktop environment the os notificated me I m in "software rendering mode" and everythin is pretty laggy. I suppose I just need to upgrade the vga driver: is there a way to do that easily? Or do I need to download the package from the debian website and install all the dependencies? using apt or maybe dpkg commands?
ErViandante
 
Posts: 8
Joined: 2020-10-22 09:36

Re: [GRUB2] Cannot find grub directory

Postby p.H » 2020-10-23 17:15

(Maybe you should create a new topic for this issue)

It depends what graphic processor this laptop has. Can you post the relevant lines in the output of this command ?
Code: Select all
lspci -k

But this laptop is so old that support for its GPU may have been dropped.
Also, what desktop environment did you install ? With such an old thing it may be better to install a light one (LXDE, LXQt, Xfce), or just a window manager.
p.H
 
Posts: 1521
Joined: 2017-09-17 07:12

Re: [GRUB2] Cannot find grub directory

Postby ErViandante » 2020-10-23 18:53

If is the case to change topic, pls tell me, I will create a new one right away
By the way
p.H wrote:It depends what graphic processor this laptop has. Can you post the relevant lines in the output of this command ?
Code: Select all
lspci -k


I m not sure but I think this is the right part
Code: Select all
VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV280/M9+ [Mobility Radeon 9200 AGP]
Subsystem: Acer Incorporated [ALI] RV280/M9+ [Mobility RAdeon 9200 AGP]
Kerneò driver in use: radeon
kernel modules: radeonfb, radeon

p.H wrote:But this laptop is so old that support for its GPU may have been dropped.
Also, what desktop environment did you install ? With such an old thing it may be better to install a light one (LXDE, LXQt, Xfce), or just a window manager.

I installed Cinnamon. I suppose I can install lighter environment, but I thinked the laptop could have all the needed requirements, since it has 2 gb of ram. Also windows 7 had been installed on it years ago, and it worked fine, but I understand that maybe an open source os is less optimized. That's why I thinked it could be a driver issue. What do you think?
If you need any other parts of the output tell me what I should be looking for, I' ll be glad to post it here
ErViandante
 
Posts: 8
Joined: 2020-10-22 09:36

Next

Return to Installation

Who is online

Users browsing this forum: dragonfly320 and 14 guests

fashionable