I tried to install grub manually:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id = Manjaro --recheck
Try exact this syntax:
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
If you mount the partition to /mnt/boot/efi
from within the chroot
, then that will of course not work, given that the system expects it to be mounted at /boot/efi
.
However, mounting the EFI partition separately should not be needed, because manjaro-chroot
will do that automatically. The fact that it did not do that for you suggests that you’ve booted the live session in legacy BIOS mode instead of in native UEFI mode.
Here is my /etc/fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=21F9-81DD /boot/efi vfat umask=0077 0 2
UUID=3f119914-a9af-4564-8669-fa2e6ce12e00 /boot ext4 noatime 0 2
UUID=efdcc96e-b0e3-46a5-8097-dfbe37313d5b / ext4 noatime 0 1
UUID=1f4562ba-4176-40fd-8f2c-ed1c4e047fc3 /home ext4 noatime 0 2
UUID=0b4eb613-447d-4c82-9a81-1ea304015a76 /var ext4 noatime 0 2
UUID=43166bcb-eb7f-4f68-8360-3bd6c383f3c1 /backup ext4 noatime,noauto 0 0
Here is blkid:
/dev/nvme0n1p9: LABEL="Home" UUID="1f4562ba-4176-40fd-8f2c-ed1c4e047fc3" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="7e430083-ef9f-0f43-ae15-aef5d3aefe58"
/dev/nvme0n1p7: LABEL="Swap" UUID="e52df95b-4a11-438a-baef-cea808d60427" TYPE="swap" PARTUUID="8666bcae-b323-6644-9109-75105018c642"
/dev/nvme0n1p5: LABEL_FATBOOT="BOOT" LABEL="BOOT" UUID="21F9-81DD" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="0a467fab-7271-344d-8894-571997c824a1"
/dev/nvme0n1p3: BLOCK_SIZE="512" UUID="40D863E3D863D626" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="d697b100-515f-447b-9059-faa7a9f5f04b"
/dev/nvme0n1p1: UUID="6661-26CE" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="ab64cf8a-51ad-4aab-b0d1-2cd9d87931da"
/dev/nvme0n1p8: LABEL="Root" UUID="efdcc96e-b0e3-46a5-8097-dfbe37313d5b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="008082c0-e8a9-4349-a4bf-272e43a877eb"
/dev/nvme0n1p10: UUID="0b4eb613-447d-4c82-9a81-1ea304015a76" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b5aa2421-77f1-c34f-a65d-9d918cde05f8"
/dev/nvme0n1p6: LABEL="Boot" UUID="3f119914-a9af-4564-8669-fa2e6ce12e00" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f18b0489-82ac-1f4d-9360-bbb92a97e197"
/dev/nvme0n1p4: BLOCK_SIZE="512" UUID="067EE8AD7EE89729" TYPE="ntfs" PARTUUID="a754502e-93b7-4e21-828b-2328de9a5083"
/dev/sda1: UUID="43166bcb-eb7f-4f68-8360-3bd6c383f3c1" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="39d49eee-ed39-44b3-bc1a-6672c2ef8eea"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="40f864ee-921e-4e45-b8ff-3ded2a0cf5ec"
And manjaro-chroot -a
gives the output: mount point /mnt/boot/efi
does not exist.
What must the folder /boot/efi contain ?
If I execute this command on console as root with Manjaro 21.1.2, then I get:
canonical path for /boot/efi could not be resolved
.
What should I check next ?
Maybe the order of the entries in the fstab is important?
Fstab is created by the system on install.
The first entry is /boot/efi
.
The UUID is the same as with bkild.
umount/mount /boot/efi
works.
?
Did you check, if you start your system at native UEFI mode?
What the /boot/efi folder contains:
https://askubuntu.com/questions/1294353/understanding-my-boot-efi-tree
The guy here said, he had to mount first the whole root partition, or better, the whole disk, before he could mount something on a certain folder. Where i think, only the root partition should be enough.
https://archived.forum.manjaro.org/t/the-manjaro-chroot-command-does-not-detect-my-installed-manjaro/97181/7
What my /boot/efi folder contains:
efi - > boot → bootx.efi
→ Manjaro ->grubx.efi
Thats all.
I have to say, that i didnt work a lot with efi systems. Gladly.
But what puzzle me a bit, it, that at your blkid you have at line 3 and line 5 2 vfat boot partitions.
Propatly, that you mount the wrong partition with fstab?
You could # outcomment the first line, copy past it into a new line, just replace the UUID at the beginning,
mount it on the same folder and see if it starts from the other efi partition?
Edit:
I can find more problems, what can appear.
Once, when you change or add a hdd,
Second, Windows can overwrite the bootloader.
At the page below, it shows some solutions, ie with efibootmgr.
https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface#Windows_changes_boot_order
In post #3 there is the output of fdisk -l.
/dev/nvme0n1p1 2048 206847 204800 100M Windows EFI system parition.
/dev/nvme0n1p5 976762880 977377279 614400 300M is the Manjaro EFI-system partition.
Ok, changing the UUID is maybe not the best idea.
When you mount your hdd like at this steps decribed,
and then do the grub-install command from above again?
https://forum.manjaro.org/t/howto-chroot-from-or-into-any-linux-distribution/34071
&
https://wiki.manjaro.org/index.php?title=GRUB/Restore_the_GRUB_Bootloader
What I have done:
I used the Manjaro USB stick with version 21.1.2 KDE
On console: mkdir /mnt/boot, mkdir /mnt/boot/efi, mkdir /mnt/home, mkdir /mnt/var
Then mount all paritions /dev/nvme0n1p5 to p10 to /mnt
manjaro-chroot /mnt /bin/bash works.
Ok. Lets do that like at the second link.
Start again with your live usb.
Start with (i will replace the drives with the one from your blkid. If it says /directory doesnt exist, then you have to mkdir)
user# su
root # mount /dev/nvme0n1p8 /mnt
then
root # mount /dev/nvme0n1p6 /mnt/boot
then
root # mount /dev/nvme0n1p5 /mnt/boot/efi
then
"Create the chroot environment and use bash as shell "
root # manjaro-chroot /mnt /bin/bash
He suggests Reinstall Grub
"One possible cause why you are reading this document - is an unfinished update - which in turn can be caused by several situations - situation we will not dive into. To fix what ever caused this you should run a full system update including grub to ensure everything is in place. "
root # pacman -Syu grub
I add here the note from the end
"
If Arch Linux wasn’t recognized after an update-grub then probably your Arch installation is missing the package lsb-release. "
So you may check, if it is installed
pacman -S lsb-release
then
" EFI System
Info You need to be in chroot for this procedure. "
cd mnt/bin
Reinstall grub
root # grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
Update the grub configuration
root # grub-mkconfig -o /boot/grub/grub.cfg
Verify the existance of an EFI system partition
root # lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME
Verify the efi filesystem is loaded
root # ls /sys/firmware/efi
Exit chroot
root # exit
Try loading the efi filesystem
root # modprobe efivarfs
Re-enter chroot
root # manjaro-chroot /mnt /bin/bash
Then mount the efi filesystem
root # mount -t efivarfs efivarfs /sys/firmware/efi/efivars
Verify the efi filesystem is loaded
root # ls /sys/firmware/efi
If successfull re-run above installation commands
root # grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
root # grub-mkconfig -o /boot/grub/grub.cfg
Problem solved.
Good to hear. What was it exactly?
What did confuse me a bit, that you mounted them to mnt/(directoryname) and mounted then, in example, from your other drive the /var to mnt/var.
Usually, when you mount your sdb1 to /mnt, it shows the subfolders from your mounted drive automatically at the tree under mnt.
I have learned also lately, that you should not mount a drive into a folder, what contains other files or directories, because that can mess up both filesystems.
Sure, so far you mount it into a subfolder it should work, but i was not sure, if chroot then find its way to the other folders what it needs.
The write permissions of /boot/efi
were wrong.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.