Grub_rescue after macbook air laptop lost battery power

Running Manjaro on 2015 macbook air and all was well until last night when I didn’t notice that the charger power switch was off. It looks like the OS didn’t shutdown cleanly after the battery went flat.
Now on boot it comes to grub_rescue.
There isn’t a windows boot, but an older Ubuntu entry.

the error message is:
failure reading sector [hex] from ‘hd1’

I tried working through Restore the Grub Bootloader using a Manjaro live usb, but without success (typing su changed the shell to ‘#’ but was still user manjaro) - I was able to run manjaro-chroot -a which showed an error:
cannot find a grub drive for /dev/sda1
But sda1 is still the usb drive isn’t it?
Below that it listed 2 entries:

0) Ubuntu
1) ManjaroLinux
Selecting 1, shows:
Mounting (ManjaroLinux) [/dev/nvme0n1p3]
---> mount: [/mnt]
then a series of error messages
mount: /mnt can't read superblock on /dev/nvme0n1p3
and others...

Running GParted shows 3 partitions:

nvme0n1p1 is a fat32 512 MB EFI system partition
…p2 and p3 are ext4 partitions of approx 225 GB each.

it seems the boot partition has some unreadable contents.

Is there a way to restore the boot partition without destroying all the data on the other partitions?

Disk drives such as HDD, or SSD, are usually enumerated before any removable drives; and in the case of USB drives, usually large disk types before flash/pen/thumb drive types, and the like.

At least, that has been my experience.

A quick way to verify which disk is which, is to use blkid (man blkid):

sudo blkid

… to positively identify drives.

Look for corresponding UUIDs (if known), disk labels, and respective filesystem types of drives listed. Note that blkid won’t necessarily display your drives in any logical order.

An alternative is lsblk which can produce better formatted output, and does not require elevated privileges.


Posting the complete output from the manjaro-chroot -a attempt might be more useful to someone. However, at face value, it seems your nvme drive has been damaged; at least, in the case of /dev/nvme0n1p3.

As the partition is formatted as ext4 you might have some success using fsck to correct any errors in the filesystem.

I ran lsblk as suggested and it confirmed that sda is the usb drive.
The SSDs are at nvme0n1 (,2 and 3)
I was able to mount nvme0n1p2 -which is the old ubuntu partition, but can’t mount nvme0n1p3 which is the filesystem with my Manjaro data.

Fsck can be run on a drive in an unmounted state; for example:

fsck -r /dev/your-drive-here

If errors are found it should ask for confirmation to correct them. Read the previously linked fsck page for more information.

yes, sorry - but I’m typing this on another desktop and can’t easily copy/paste the error messages on the laptop. I’ll try and take a photo and attach

Welll either because of bad battery or bad config it did not spin doun and park nicely and instead dragged the disk head and corrupted some sectors, among them the boot one. It should have a copy at the other end of the disk, so fsck hopefully restores it.
Note that you fsck in the live session without mounting or chrooting.

But it’s a solid-state drive so no disk or heads, but likely some corruption has occurred anyway!
I’ll try the fsck as soon as I get the live usb working again. I used the minimal version ISO initially but couldn’t get wifi up - so now trying the full version on usb but it’s not booting!

May be a problem with the ssd but have a look at that post first:
Macbook 2016 boot problem - #7 by 6x12 .

That helped get the boot from usb back, and I tried fsck but it comes back with the same error on the Manjaro partition - “Could this be a zero length partition”.
I’ll try a few more tools, but might have to format the whole drive and start again.
It’s a lot harder without a wi-fi connection! I’ve had this problem before installing linux onto a macbook. Apparently the Broadcom chip uses a proprietary driver that has to be installed manually - I can’t recall the process at the moment!

Nowadays you have to install the b43-firmware pkg from the AUR to get those old broadcoms working. To install without net search the forum for ‘pamac installing local package without internet’ or similar.
After that’s done run:

sudo modprobe -r wl
sudo modprobe b43 allhwsupport=1

and you should have wifi.
However, this may not survive a reboot. Have a look at the solution of this post Macbook Wifi not working - #7 by Lalo to make it permanent.

Thanks everyone for the advice, but I wasn’t able to get the wifi working - made more difficult by trying to download through a bluetooth phone tether for internet access! I’m not sure what the problem was, but after trying to install b43 drivers Manjaro wouldn’t boot anymore - just the three dots for over 2 hours. Same after a restart.
So I took the nuclear option and reformatted the whole drive.
Tried again to install xfce flavour but even though it did install, I still couldn’t get wifi up.

But - interestingly - success using the Gnome flavour of Manjaro! This worked “out of the box” and wifi came up straight away. Both versions had the 6.5 kernel so I have no idea why Gnome works and xfce doesn’t.
My preference is still xfce, but I’ll continue with Gnome for now.

1 Like