Need to reinstall grub to rescue my data

Hello!

Everything was working fine in my system, until I disconnected (completely removed the sata data and power cables) my two drives, connected another SSD just to install zorin for another computer, then connected my drives again, using the same cables

I turned on my computer and I got an error message

error: symbol ´grub_is_lockdown´ not found
Entering rescue mode…
grub rescue>

I don´t know what to do here. I found a similar topic on the forum, and I typed ls command. It returned this information:

(hd0) (hd0,gpt6) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1) (hd1,gpt2) (hd1,gpt1) (hd2)

Then I booted the system from the Manjaro live USB (KDE latest version). I was able to see my drives and partitions (It´s a dual boot Manjaro-Windows 10 setup)

PNY 480 GB SSD:
sda1 ntfs recovery
sda2 fat32 efi (windows efi)
sda3 ms reserved (16 mb)
sda4 ntfs (My windows “C:” partition)
sda5 btrfs (My linux root partition)
sda6 fat32 efi (linux efi)

TOSHIBA HDD:
sdb1 ntfs (My windows “D:” partition)
sdb2 btrfs (My linux “/home” partition)

Tried to follow the manjaro GRUB restoration guide
Nothing worked for me

sudo manjaro-chroot -a
grub-probe: cannot find a GRUB drive for /dev/sdc1. Check your device.map
grub-probe: cannot find a GRUB drive for /dev/sdc1. Check your device.map
ERROR: No linux partitions detected

Tried to chroot manually

su
mount /dev/sda5 /mnt
mount /dev/sda6 /mnt/boot
chroot /mnt
chroot: failed to run command /bin/bash: No such file or directory

manjaro-chroot /mnt /bin/bash
mount: /mnt/run: mount point does not exist
ERROR: failed to setup API filesystems in chroot /mnt

mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt/ /bin/bash
chroot: failed to run command /bin/bash: No such file or directory

Tried to reinstall Manjaro from the live USB, using the same partitions I already have, but it gives me a python error
What else can I try?

This works for everybody. Why doesn´t it work in my system?

Sorry, I forgot to add this before. The error message is:

<div><strong>Command '['btrfs', 'subvolume', 'create', '/tmp/calamares-root-_rreutke/@']' returned non-zero exit status 1.</strong></div><div>None</div><div><br/>Traceback:</div><div><pre>File &quot;/usr/lib/calamares/modules/mount/main.py&quot;, line 251, in run
    mount_partition(root_mount_point, partition, partitions)

  File &quot;/usr/lib/calamares/modules/mount/main.py&quot;, line 197, in mount_partition
    subprocess.check_call([&quot;btrfs&quot;, &quot;subvolume&quot;, &quot;create&quot;,

  File &quot;/usr/lib/python3.10/subprocess.py&quot;, line 369, in check_call
    raise CalledProcessError(retcode, cmd)</pre></div>

If you want to reinstall a partition that was used with btrfs, you need to remove some “markers” from btrfs to clean up the partition. Before that, btrfs refuses to format the partition because it fears it will damage your data.

btrfs is a robust file system. (to protect your data)
:sunglasses:

1 Like

Wow, that´s good to know, thanks!
I´ll wait some more time in case someone can help me restoring Grub, then I will try to format my root partition and reinstall

Hello. After reading this
Tutorial

Well, looks like manjaro-chroot -a doesn’t work with btrfs
I tried to do this:

sudo mount /dev/sda5 /mnt
sudo mount /dev/sda6 /mnt/@/boot/efi
sudo mount /dev/sdb2 /mnt/@/home
manjaro-chroot /mnt

But I got another error:

mount: /mnt/run: mount point does not exist.
==> ERROR: failed to setup API filesystems in chroot /mnt

What else can I try to fix this?

You may have a look into the wiki

manjaro wiki or arch wiki, search for grub

You may search in the forum

grub reinstall

You may use maxi to get an overview

You may provide more info, so someone is able to help you better

Welcome to Manjaro! :smiling_face_with_three_hearts:

  1. Please read the information behind this link. It will help you to post necessary information. [HowTo] Provide System Information
  2. Please press the three dots … below your post and then press the :pencil2:
  • If you give us information about your system, we can see what we’re talking about and make better suggestions.
  • You can do this by using inxi in a terminal or in console.
inxi --admin --verbosity=7 --filter --no-host --width
  • Personally identifiable information such as serial numbers and MAC addresses are filtered out by this command
  • Presenting the information in this way allows everyone to be familiar with the format and quickly find the items they need without missing anything.
  1. Copy the output from inxi (including the command) and paste it into your post.
  • To make it more readable, add 3 backticks ``` on an extra line before and after the pasted text.

Wow, that maxi tool looks useful. Thank you!
I fixed the problem by paying more attention to the Restore Grub bootloader wiki article
In case someone else needs this information in the future:

sudo mount -o subvol=@ /dev/sda5 /mnt
sudo mount /dev/sda6 /mnt/boot/efi
manjaro-chroot /mnt /bin/bash
pacman -Syu grub

then follow the wiki: grub-install, grub-mkconfig, etc etc

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.