I have updated my bios for my lenovo P16 with the latest bios provided on lenovo support website. I wrote the iso file to an USB stick and booted with the bios USB-stick. The installation of the bios seemed to be fine.
But when booting my luks encrypted OS after entering the password and after the manjaro boot menu has appeared following error is shown:
ERRO: Fail to mount '/dev/mapper/luks-....' on real root[ 9....] fbcon: Taking over console
your are now beeing dropped into an emergency shell.
[ 9. ] Console: switching to colour frame buffer devic 160x58
sh: can't access tty: job control turned off
[rootfs~]#
I have tried out with several downgrade version of the bios finally I installed the latest version again. The problem keeps always the same.
After I booted the with an USB-live stick. The root and data partition are fully available after entering the password. Opening gparted shows an error for the fat32 partition:
dev/nvme0n1p1 fat32 error shown in gparted in USB-live system: unable to read the content of this file system!
I also tried it with a backup with timeshift. No success.
What can I do? I have no more idea how to fix this partition where probably grub file is located.
A firmware update should not affect the encrypted container and you have confirmed it by unlocking and mount container in chroot.
This leaves the EFI boot partition which you also confirmed has been damaged.
I suggest you boot a live image and format the EFI partition
mkfs.fat -F32 -n EFI /dev/nvme0np1
Then open your luks container and mount on /mnt - then mount the EFI partition on /mnt/boot/efi, chroot into /mnt and run the Manjaro script install-grub.
//EDIT:
If the firmware update has removed grub from the firmware’s list of registered efi loaders - you need to run the efibootmgr to add the grub loader to the firmware.
Thank you so far.
I have tried this command but it says command not found.
Than I tried to format /dev/nvme0np1 with gparted. Flags are set automatically: bios, esp.
After formating it gives out again a warning: “Unable to read the contents of this file system! Because of this some operation may be unavailable. The cause might be a missing software package. The following list of software packages is required for fat32 file system support: dosfstools, mtools”
I have checked: dofstools is already installed but mtools not.
I do not have a dual boot system, purely Linux Manjaro using BTRFS with LUKS for root and separeted a data hard disk.
Should I delete the partition and format it again? Hopefully the logic of naming is kept as:
/dev/nvme0np1
What can be done?
By the way currently I can unlock my root partition with gparted but I have no access to the files still with dolphin.
Would you specify the next steps you wrote after formatting step a little more clearly, please?
In gparted there is no “remove and recreate”. There is only either “format to” or “delete”. If I delete it than I should be able to “format to” hopefully? In that case, if you agree to go this way, is it important to keep an unallocated space of 2 MB like it is now?
Before you do - please unmount all mountpoints and close the luks container
sudo umount -R /mnt
cryptsetup close <container name>
Then use the command line utility cgdisk from the package gptfdisk to alter the partition table (another utility is cfdisk from the package util-linux) (cgdisk takes care of allignment etc.)
sudo cgdisk /dev/nvme0n1
navigate to the EFI system partition and press d to delete
navigate up to the free space and press n to create a new
press enter to accept default
press enter to accept default
partition type - enter ef00 - press enter
partition name - enter EFI - press enter
press w to write partition table
enter the word you are prompted with (if english locale the word yes) and press enter
press q to exit to the prompt
When you are returned to the prompt - format the partition
sudo mkfs.fat -F32 -I -n EFI /dev/nvme0n1p1
//EDIT:
Remember to update the UUID in the system’s /etc/fstab file
The unallocated 2 MiB is only pertinent if your drive has a GPT partitioning scheme in combination with a legacy BIOS (or BIOS emulation) boot, because without it, grub would overwrite the start of the first partition. However, on an EFI system, this is irrelevant, because the EFI version of grub is stored as a file in the EFI system partition.
That said, it is however important that all partitions start and end on 1-MiB boundaries.
Thank you.
I have worked many hours.
Then I could access all partitions and reinstall also grub but with reboot no access on Manjaro OS was possible. I had to reinstall the whole system.