You are not logged in.

#1 2020-12-04 07:22:04

lugge
Member
Registered: 2017-03-17
Posts: 33

grub: invalid extent

Hi,
yes, I encountered the infamous "invalid extend" error when trying to boot my laptop with grub.
Googling around brought up a lots of threads, but none of which could help.

What I did:
Got an old (~10yo) Sony Vaio Laptop from my Dad which he no longer needs.
The laptop is fine, I tried various Live Linux to check If every bit of hardware is recognized by the Kernel. Everything is working, even WiFi.
Then, I tried to set up Arch as I did many times on my devices.

I followed the installation guide as usual, no problems.
Installed grub for target i386-pc.

Here's the problem:
After powering on the device, I'm dropped to the grub rescue shell with error message:

error: invalid extend

Normally, one can use ls in the rescue shell to gather disc information, set up root/prefix and then insmod normal.
But I was not able to list the files in the /boot directory.

This is what I tried:

ls (hd0,1)/

This listed all directories in /, and it looks like a normal unix root folder

ls (hd0,1)/grub

This got me another "invalid extend" error message

ls (hd0,1)/etc

This listed the content of /etc. Looked good, thus, my hard drive is basically fine.

It seems like grub cannot access /boot dir.
I used Live images to check content of /boot but it seems all fine.

Any idea on this?

Offline

#2 2020-12-04 12:14:25

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: grub: invalid extent

lugge wrote:
ls (hd0,1)/grub

[...]

ls (hd0,1)/etc

I assume you meant `/boot' in the first command.

A quick `grep -r' in the (latest) grub source reveals that that error message comes from grub-core/fs/ext2.c.  Probably, your (root) filesystem is somehow broken.  I suggest running `e2fsck -f /dev/ROOT_PART' from a live system.

Offline

#3 2020-12-04 20:43:20

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 453

Re: grub: invalid extent

isn't i386 32 bit ?

ezik

Offline

#4 2020-12-05 01:17:27

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: grub: invalid extent

shulamy wrote:

isn't i386 32 bit ?

Yes.  However, x86_64 is backward compatible with the 32-bit x86 instruction set.
i386-pc is GRUB's default target (on x86_64 with BIOS) and there does not exist a x86_64-pc target.

Offline

#5 2020-12-07 06:33:33

lugge
Member
Registered: 2017-03-17
Posts: 33

Re: grub: invalid extent

shulamy wrote:

isn't i386 32 bit ?
ezik

If your device has still BIOS instead of EFI, i386-pc is the (grub-)target to go for.

@ All: I was able to solve my issue with try & error; I still do not know why it is working now (this leaves me unsatisfied because, you know, I like to know such things).

What I did:
- I switched to GPT partition table instead of MBR and also created a 1M grub partition.
This however did not do the trick, I just got a different error when booting: "invalid arch-independant elf magic" (or the like). Still was welcomed by the rescue shell.

- Then I bootet from live-Stick again and installed grub to /dev/sda1 instead of /dev/sda.
This is something every single guide in the web tells you not to do, but it worked. However, still don't know why.

Offline

#6 2020-12-08 21:21:13

xerxes_
Member
Registered: 2018-04-29
Posts: 665

Re: grub: invalid extent

I also have grub installed on /dev/sda1 which is mounted as /boot from the beginning, but I have old system with bios and mbr formated hdd.
I first hearing that grub shouldn't be installed to /dev/sda1.

Offline

Board footer

Powered by FluxBB