Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[GRUB2] Cannot find grub directory
-
- Posts: 8
- Joined: 2020-10-22 09:36
[GRUB2] Cannot find grub directory
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?
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?
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: [GRUB2] Cannot find grub directory
Changing the prefix path won't help. A wrong path causes different error messages such as "file not found".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
"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.ErViandante wrote:then run upgrade-grub as root, to clean up eventually any error in the grub files, right?
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 ?
-
- Posts: 8
- Joined: 2020-10-22 09:36
Re: [GRUB2] Cannot find grub directory
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:
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 ?
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)p.H wrote:
Did you try to create a small /boot partition with a simple filesystem (ext2) at the very beginning of the disk ?
what do you mean by "encrypted" ?CwF wrote:Is this encrypted?ErViandante wrote: "ls (hd0,msdos1)" is "Filesystem is ext2"
-
- Global Moderator
- Posts: 2679
- Joined: 2018-06-20 15:16
- Location: Colorado
- Has thanked: 41 times
- Been thanked: 196 times
Re: [GRUB2] Cannot find grub directory
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...ErViandante wrote:what do you mean by "encrypted" ?
-
- Posts: 8
- Joined: 2020-10-22 09:36
Re: [GRUB2] Cannot find grub directory
Ye don't worry ask what you want, if it helps understanding how I can solve my error, is more than welcome I was genuinely asking what encrypted meant cause I m not really used to linux os.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...
Btw if a partition is encrypted, it means I cannot have fully access to the files?
-
- Global Moderator
- Posts: 2679
- Joined: 2018-06-20 15:16
- Location: Colorado
- Has thanked: 41 times
- Been thanked: 196 times
Re: [GRUB2] Cannot find grub directory
Yes, you would know if you installed it? If you did thenErViandante wrote:Btw if a partition is encrypted, it means I cannot have fully access to the files?
Code: Select all
grub rescue> insmod luks
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: [GRUB2] Cannot find grub directory
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).
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).
-
- Posts: 8
- Joined: 2020-10-22 09:36
Re: [GRUB2] Cannot find grub directory
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.CwF wrote: Yes, you would know if you installed it? If you did thenand see what you get.Code: Select all
grub rescue> insmod luks
And can you explain me what
Code: Select all
>insmod luks[code]
does?
[quote="p.H"]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).[/quote]
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.
[quote="p.H"]
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).[/quote]
Do you mean the drive settings? Can that be changed from the bios?
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: [GRUB2] Cannot find grub directory
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.
[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.
-
- Posts: 8
- Joined: 2020-10-22 09:36
Re: [GRUB2] Cannot find grub directory
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
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 ?
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 ?
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: [GRUB2] Cannot find grub directory
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:Missing this LBA48 would cause my laptop to be unable to use partition bigger than 130 gb right?
Correct, if it is an LBA48 issue.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
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).ErViandante wrote:Do you think the second method would work somehow?
-
- Posts: 8
- Joined: 2020-10-22 09:36
Re: [GRUB2] Cannot find grub directory
It worked! I manually partitioned the disk in 3 parts (for whoever will need this in future):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).
-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
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?
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: [GRUB2] Cannot find grub directory
(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 ?
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.
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
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.
-
- Posts: 8
- Joined: 2020-10-22 09:36
Re: [GRUB2] Cannot find grub directory
If is the case to change topic, pls tell me, I will create a new one right away
By the way
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
By the way
I m not sure but I think this is the right partp.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
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
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?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.
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
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: [GRUB2] Cannot find grub directory
AFAICS, this GPU should still be supported by the radeon drivers. Non-free firmware from the package firmware-amd-graphics may be required to enable acceleration.