Hallo all,
I did needed this procedure again :
Story :
Laptop : Dell 5480
OS : Linux Manjaro Cinnamon multiboot with windows 11 pro.
Problem : Bootloader gone
Cause : updating an application in windows. Which crashed itselves.
Action : Start from USB Live Manjaro Cinnamon, following the steps in the wiki page above.
Final result :
Booting takes a long time. No bootloader shows up. Manjaro Linux starts ! It works.
windows option to boot comes not available.
Using F12 for the one-time boot menu, to select what to boot : manjaro of EUFI.
Choosing EUFI : windows boots !
Choosing manjaro : Manjaro boots after a long time. I do believe it is the time specified by myself in /etc/default/grub : 580 seconds. But it boots properly !
So : No multiboot loader list showing up
Because you all want to know my logging info during proceure execution Here is it :
Somewhere the commands do not match my reality. I think I am rather good in terminal work.
So …
What went wrong ? Some if then else steps missing in the procedure ?
How to fix my boot loader ?
Thanks in advance from Hans in the Netherlands
Identify the type of system you are attempted to resque as the commands involved are slightly different.
BIOS/MBR/GPT system
EFI/GPT system
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Load Manjaro Installation Media
Default Username Default Password
manjaro manjaro
root manjaro
Make internet connection
My SSIDGuest
SSIDGuestPW
My own website manual :
www.linuxzob.nl
https://www.linuxzob.nl/wiki/doku.php?id=start
https://www.linuxzob.nl/wiki/doku.php?id=linux_manjaro:manjaro_info#manjaro_-_bootloader_repair_na_windows_upgrade
https://wiki.manjaro.org/index.php?title=GRUB/Restore_the_GRUB_Bootloader
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Identify partitions
[manjaro@manjaro-cinnamon ~]$ lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME
PATH PTTYPE PARTTYPE FSTYPE PARTTYPENAME
/dev/loop0 squash
/dev/loop1 squash
/dev/loop2 squash
/dev/loop3 squash
/dev/sda gpt
/dev/sda1 gpt c12a7328-f81f-11d2-ba4b-00a0c93ec93b vfat EFI System
/dev/sda2 gpt e3c9e316-0b5c-4db8-817d-f92df00215ae Microsoft reserved
/dev/sda3 gpt ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ntfs Microsoft basic data
/dev/sda4 gpt de94bba4-06d1-4d40-a16a-bfd50179d6ac ntfs Windows recovery environment
/dev/sda5 gpt 0fc63daf-8483-4772-8e79-3d69d8477de4 ext4 Linux filesystem
/dev/sdb dos iso966
/dev/sdb1 dos 0x0 iso966 Empty
/dev/sdb2 dos 0xef vfat EFI (FAT-12/16/32)
[manjaro@manjaro-cinnamon ~]$ sudo fdisk -l /dev/sda
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WD Blue SA510 M.
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6442800E-EC5D-46D2-9B9F-C26A29BF8C65
Device Start End Sectors Size Type
/dev/sda1 2048 206847 204800 100M EFI System
/dev/sda2 206848 239615 32768 16M Microsoft reserved
/dev/sda3 239616 1147188131 1146948516 546.9G Microsoft basic data
/dev/sda4 1952284672 1953521663 1236992 604M Windows recovery environment
/dev/sda5 1147188133 1952284671 805096539 383.9G Linux filesystem
Partition table entries are not in disk order.
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Identify system partitions
From the above we assume you have identified the relevant partitions on your system and this document will refer the partitions as follows. Partitions not needed for this kind of maintenance has intentionally been left out (e.g. home, swap).
Partition Usage Comment
/dev/sda1 EFI system Required for EFI system and mounted on /boot/efi
/dev/sd ?? boot Optional but mounted on /boot The primary use is when GRUB cannot write to / (eg. f2fs)
/dev/sda5 root Required and for the root filesystem and mounted on / - usually formatted using ext4
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
[manjaro@manjaro-cinnamon ~]$ su
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
pamac install manjaro-tools-base
[manjaro-cinnamon manjaro]# pamac install manjaro-tools-base
Synchronizing package databases...
Refreshing core.db...
Refreshing extra.db...
Refreshing multilib.db...
Preparing...
Synchronizing package databases...
Resolving dependencies...
Checking inter-conflicts...
To upgrade (1):
manjaro-tools-base-git r3071.5c97abe-1 (r3045.7e49d96-1) extra 24.5 kB
Total download size: 24.5 kB
Total installed size: 433 bytes
Apply transaction ? [y/N] Y
Waiting for another package manager to quit...
[manjaro-cinnamon manjaro]#
[manjaro-cinnamon manjaro]# which manjaro-tools-base
which: no manjaro-tools-base in (/home/manjaro/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
[manjaro-cinnamon manjaro]# pamac install manjaro-tools-base
Preparing...
Synchronizing package databases...
Resolving dependencies...
Checking inter-conflicts...
To upgrade (1):
manjaro-tools-base-git r3071.5c97abe-1 (r3045.7e49d96-1) extra 24.5 kB
Total download size: 24.5 kB
Total installed size: 433 bytes
Apply transaction ? [y/N] Y
Download of manjaro-tools-base-git (r3071.5c97abe-1) started
Download of manjaro-tools-base-git (r3071.5c97abe-1) finished
Checking keyring... [1/1]
Checking integrity... [1/1]
Loading packages files... [1/1]
Checking file conflicts... [1/1]
Checking available disk space... [1/1]
Upgrading manjaro-tools-base-git (r3045.7e49d96-1 -> r3071.5c97abe-1)... [1/1]
Transaction successfully finished.
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
[manjaro-cinnamon ~]# mount | grep boot
/dev/sdb on /run/miso/bootmnt type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
[manjaro-cinnamon ~]# which lsb-release
which: no lsb-release in (/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
[manjaro-cinnamon ~]# pamac install lsb-release
Synchronizing package databases...
Refreshing core.db...
Refreshing extra.db...
Refreshing multilib.db...
Preparing...
Warning: lsb-release-2.0.r55.a25a4fc-1 is up to date -- skipping
Nothing to do.
Transaction successfully finished.
[manjaro-cinnamon manjaro]# pamac install lsb-release
Preparing...
Warning: lsb-release-2.0.r55.a25a4fc-1 is up to date -- skipping
Nothing to do.
Transaction successfully finished.
[manjaro-cinnamon manjaro]#
[manjaro-cinnamon ~]# which manjaro-chroot
/usr/bin/manjaro-chroot
[manjaro-cinnamon ~]# manjaro-chroot
==> ERROR: Can't create chroot on non-directory
[manjaro-cinnamon manjaro]# manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
==> Mounting (ManjaroLinux) [/dev/sda5]
--> mount: [/mnt]
--> mount: [/mnt/boot/efi]
[manjaro-cinnamon /]#
[manjaro-cinnamon /]# mount | grep mnt
[manjaro-cinnamon /]#
pacman -Syu grub
[manjaro-cinnamon /]# pacman -Syu grub
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
:: Synchronizing package databases...
core 150.7 KiB 90.4 KiB/s 00:02 [###########################################] 100%
extra 9.1 MiB 3.08 MiB/s 00:03 [###########################################] 100%
multilib 93.9 KiB 59.7 KiB/s 00:02 [###########################################] 100%
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))
Lees de website. Ik ga door !
Reinstall grub
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
[manjaro-cinnamon /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.
[manjaro-cinnamon /]#
Update the grub configuration
grub-mkconfig -o /boot/grub/grub.cfg
[manjaro-cinnamon /]# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.12-x86_64
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-6.12-x86_64.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
done
[manjaro-cinnamon /]#
Verify the existance of an EFI system partition
lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME
[manjaro-cinnamon /]# lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME
PATH PTTYPE PARTTYPE FSTYPE PARTTYPENAME
/dev/loop0
/dev/loop1
/dev/loop2
/dev/loop3
/dev/sda
/dev/sda1
/dev/sda2
/dev/sda3
/dev/sda4
/dev/sda5
/dev/sdb
/dev/sdb1
/dev/sdb2
/dev/sdc
[manjaro-cinnamon /]#
Verify the efi filesystem is loaded
ls /sys/firmware/efi
ls -l /sys/firmware/efi
[manjaro-cinnamon /]# ls /sys/firmware/efi
config_table efivars esrt fw_platform_size fw_vendor runtime runtime-map systab
[manjaro-cinnamon /]# ls -l /sys/firmware/efi
total 0
-r--r--r-- 1 root root 4096 Oct 13 15:57 config_table
drwxr-xr-x 2 root root 0 Oct 13 15:34 efivars
drwxr-xr-x 3 root root 0 Oct 13 15:57 esrt
-r--r--r-- 1 root root 4096 Oct 13 15:57 fw_platform_size
-r--r--r-- 1 root root 4096 Oct 13 15:57 fw_vendor
-r--r--r-- 1 root root 4096 Oct 13 15:57 runtime
drwxr-xr-x 13 root root 0 Oct 13 15:57 runtime-map
-r-------- 1 root root 4096 Oct 13 15:57 systab
Exit chroot (en kom terug in de standaard root terminal #)
exit
Try loading the efi filesystem
[manjaro-cinnamon manjaro]# modprobe efivarfs
[manjaro-cinnamon manjaro]#
Re-enter chroot
manjaro-chroot /mnt /bin/bash
[manjaro-cinnamon manjaro]# manjaro-chroot /mnt /bin/bash
mount: /mnt/proc: mount point does not exist.
dmesg(1) may have more information after failed mount system call.
==> ERROR: failed to setup API filesystems in chroot /mnt
[manjaro-cinnamon manjaro]#
Then mount the efi filesystem
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
[manjaro-cinnamon manjaro]# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
[manjaro-cinnamon manjaro]#
Verify the efi filesystem is loaded
ls /sys/firmware/efi
ls -l /sys/firmware/efi
[manjaro-cinnamon manjaro]# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
[manjaro-cinnamon manjaro]# ls /sys/firmware/efi
ls -l /sys/firmware/efi
config_table efivars esrt fw_platform_size fw_vendor runtime runtime-map systab
total 0
-r--r--r-- 1 root root 4096 Oct 13 12:57 config_table
drwxr-xr-x 2 root root 0 Oct 13 12:34 efivars
drwxr-xr-x 3 root root 0 Oct 13 12:57 esrt
-r--r--r-- 1 root root 4096 Oct 13 12:57 fw_platform_size
-r--r--r-- 1 root root 4096 Oct 13 12:57 fw_vendor
-r--r--r-- 1 root root 4096 Oct 13 12:57 runtime
drwxr-xr-x 13 root root 0 Oct 13 12:57 runtime-map
-r-------- 1 root root 4096 Oct 13 12:57 systab
[manjaro-cinnamon manjaro]#
Deze opdracht begrijp ik niet ... ik sla m over ...
If successfull re-run above installation commands
# update grub
pacman -Syu install-grub
[manjaro-cinnamon manjaro]# pacman -Syu install-grub
:: Synchronizing package databases...
core is up to date
extra is up to date
multilib is up to date
:: Starting full system upgrade...
:: Replace gvfs-google with extra/gvfs? [Y/n]
:: Replace libappindicator-gtk3 with extra/libappindicator? [Y/n]
:: Replace vi with extra/ex-vi-compat? [Y/n]
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing libcap (2.78-1) breaks dependency 'libcap=2.76' required by lib32-libcap
[manjaro-cinnamon manjaro]#
Run install-grub
install-grub
[manjaro-cinnamon manjaro]# install-grub
WARNING: Grub is not properly installed, system may not be bootable or other bootloader is used
het lijkt dat het hier niet meer goed gaat. Ik stop er toch mee.
Stick eruit. Laptop restart
Het duurt lang, maar dan geen bootloader, en Linux Manjaro start op.