Grub-Rescue help

I was resizing my root partition in cfdisk when everything went to crap and now I’m booting into grub-rescue. The only commands that I’m able to do in grub-rescue are
insmod ls set unset
according to the documentation but the documentation doesn’t provide what exactly I can do with those commands because the error that comes up when I try to use insmod is

error: attempt to read or write outside of partition

The thing that’s making this extremely difficult is even when I change my boot priority in the BIOS of my laptop to attempt to boot into a Live Environment, grub-rescue keeps popping up and adds the USB as an extra drive it can read, but can’t read the USB’s filesystem.

It looks like anything I try to do, grub-rescue won’t even bother trying to do anything because I’m outside of the partition and I don’t know how to get in the partition I need to be to fix the issue.

Can anyone help me out or is my Laptop just bricked?

I should put some more info. The output of ls is

(hd0) (hd1) (hd1,gpt1) (hd2) (hd2,gpt3) (hd2,gpt2) (hd2,gpt1) (cd0)

And the output of set is


Hd2,gpt2 is my root partition and hd2,gpt1 is what I’m assuming to be my boot partition with hd1,gpt1 being my home.
When I ls onto (hd2,gpt2)/ I get my entire root directory, but when I try to ls (hd2,gpt2)/boot I get this error again

error: attempt to read or write outside of partition

trying to set paths to their proper location then insmod, I’m hit with the error again.

The laptop is not bricked, but your Manjaro installation is.

cfdisk does not resize filesystems or magically slide them up or down the (real or virtual) cylinders of your drive. It simply modifies the entries for the partition boundaries in the partition table, and that’s all. Ergo, you have damaged your root filesystem, and your only option is a reinstall.

Hint: a filesystem and a partition are not the same thing.

Reinstalling isn’t an option I have available when I even have USB set as boot priority in my BIOS and it’s still booting into Grub for the main system meaning I can’t boot into a Live Environment.

I fully agree with @Aragorn. cfdisk just resizes the partition, but NOT the filesystem. Now the file system is bigger than the partition and you see this error:

If you didn’t make a backup of your partition table, then its likely impossible to recover the old state. You have to resize the filesystem also.
(I assume it is ext4 and the partition is NOT mounted)

sudo resize2fs /dev/sdXY
sudo e2fsck /dev/sdXY

If that does not work, then only thing you could do, is, rescue your value data.

If that doesn’t work, then you’re totally screwed at this point.

1 Like