Please do!
Hi,
After the recent update deleted my grub I’m trying to restore it using chroot following this site https://discovery.endeavouros.com/system-rescue/arch-chroot-for-efi-uefi-systems/2021/03/ but I’m running into some problems. For a start here is the output after I run sudo fdisk -l
The disk I am running EndeavourOS on is IRIDIUM PRO
Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: IRIDIUM PRO
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: 8E62129F-1E34-6F41-A5E4-7A2C8D829923
Device Start End Sectors Size Type
/dev/sda1 4096 618495 614400 300M EFI System
/dev/sda2 618496 468857024 468238529 223.3G Linux filesystem
Disk /dev/sdb: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: ADATA SU800
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: dos
Disk identifier: 0x3dd02f8e
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 2000406527 2000404480 953.9G 7 HPFS/NTFS/exFAT
Disk /dev/sdc: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM003-1SB1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa96dd874
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 1953521663 1953519616 931.5G 7 HPFS/NTFS/exFAT
Disk /dev/nvme0n1: 894.25 GiB, 960197124096 bytes, 1875385008 sectors
Disk model: Force MP510
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: A168EE3C-3DFD-4A6E-9F24-CB17FC0ECE36
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1085439 1083392 529M Windows recovery environment
/dev/nvme0n1p2 1085440 1290239 204800 100M EFI System
/dev/nvme0n1p3 1323008 1875384319 1874061312 893.6G Microsoft basic data
Disk /dev/sdd: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: EXTERNAL_USB
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: dos
Disk identifier: 0x87d2ec79
Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 3907026943 3907024896 1.8T 7 HPFS/NTFS/exFAT
Disk /dev/sde: 7.21 GiB, 7743995904 bytes, 15124992 sectors
Disk model: USB DISK 2.0
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: dos
Disk identifier: 0x0019693f
Device Boot Start End Sectors Size Id Type
/dev/sde1 * 2048 15124991 15122944 7.2G c W95 FAT32 (LBA)
Disk /dev/loop0: 1.6 GiB, 1714974720 bytes, 3349560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
So following the article I linked above I was trying to run two commands:
sudo mount /dev/sda1 /mnt
^this one doesn’t produce any output so I assume it works fine
sudo mount /dev/sda1 /mnt/boot/efi
^after running this one I get the following message:
mount: /mnt/boot/efi: mount point does not exist. dmesg(1) may have more information after failed mount system call.
After that I tried to run dmesg(1)
it runs into a syntax error and says the ‘(’ is unexpected. I also tried running just dmesg
but it produces so much output that I can’t possibly go through all of it.
I also run btrfs subvolume list -p /mnt
to check if I have BTRFS and it seems I don’t as the message is as follows:
ERROR: not a btrfs filesystem: /mnt ERROR: can't access '/mnt'
I also tried to run sudo arch-chroot /dev/sda1 /mnt
but it returned the following error
ERROR: Can't create chroot on non-directory /dev/sda1
Some other useful information might be that I am running dualboot with windows on a separate disk (Force MP510) also none of my systems are encrypted
Any help would be much appreciated,
Thanks
/dev/sda1
is your efi partition.
You probably want to mount /dev/sda2
to /mnt
and /dev/sda1
to /mnt/boot/efi
after that.
After trying to set the ranking using efibootmgr
and having no success, selecting EndeavourOS-grub
as the first entry in my UEFI worked. I’m back on my system.
Thank you for your help.
As @dalto said arch-chroot requires that you mount the root file system of the install.
sudo mount /dev/sda2 /mnt
Then mount the the efi partition for boot
sudo mount /dev/sda1 /mnt/boot/efi
Then you chroot to the mounted install
sudo arch-chroot /mnt
sudo arch-chroot /mnt is enough
That solved my problem, I have regained access to my system now.
Many thanks
Oh …did i get that wrong?
Edit: Me dumb!
Edit2: I fix! But too late…
yes I used sudo arch-chroot /mnt and it worked after setting the mounts correctly
My system was broken by the grub bug, but now that I’m trying to run grub-install I just get
EFI variables are not supported on this system.
EFI variables are not supported on this system.
grub-install: error: efibootmgr failed to register the boot entry: No such file or directory.
What could be wrong with my machine? The /boot/efi folder clearly exists as well.
recheck all options in your UEFI motherboard
- secureboot disable
- no Legacy CSM
- all disks on AHCI
- no fast boot
- no optane/rst memory
That means you booted the ISO in legacy mode. Reboot and choose one of the UEFI options from the boot menu.
Thank you so much, that was exactly it.
Hey all,
I tried the published solution but still i could not solve problem. interestingly my windows 11’s wifi specification disappeared suddenly, it is also can not read mounted devices and it shows error on setting page. actually i do not know these two problem are related or not, but for now i have a trouble with my device because i could not use it.
let me go step by step;
i have 3 os on my device; windows 11, endeavour os and ubuntu.
and i have endeavour os live on my usb flash drive.
$ sudo fdisk -l Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors Disk model: INTEL 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: 6F9C63F3-CC2B-455F-AF20-4D14346BD334 Device Start End Sectors Size Type /dev/nvme0n1p1 2048 206847 204800 100M EFI System /dev/nvme0n1p2 206848 239615 32768 16M Microsoft reserved /dev/nvme0n1p3 239616 305981439 305741824 145.8G Microsoft basic data /dev/nvme0n1p4 305981440 307197951 1216512 594M Windows recovery environment /dev/nvme0n1p5 307197952 409597951 102400000 48.8G Linux filesystem /dev/nvme0n1p6 409597952 614397951 204800000 97.7G Linux filesystem Disk /dev/sda: 7.27 GiB, 7801405440 bytes, 15237120 sectors Disk model: Flash Disk 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: dos Disk identifier: 0x593e4509 Device Boot Start End Sectors Size Id Type /dev/sda1 * 64 3564735 3564672 1.7G 0 Empty /dev/sda2 3564736 3777727 212992 104M ef EFI (FAT-12/16/32) Disk /dev/loop0: 1.6 GiB, 1714974720 bytes, 3349560 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
actually i do not know which linux filesystem partition is eos or ubuntu. (nvme0n1p5 or nvme0n1p6)
i tried tutorial’s commands both of them.
when i tried these commands,
sudo mount /dev/sdXn /mnt
sudo mount /dev/sdXn /mnt/boot/efi
with nvme0n1p5 it is work, but nvme0n1p6 show error with second line command. it says:
$ sudo mount /dev/nvme0n1p6 /mnt/boot/efi mount: /mnt/boot/efi: mount point does not exist. dmesg(1) may have more information after failed mount system call.
i thought nvme0n1p5 is eos.
when i try to sudo btrfs subvolume list -p /mnt
it says:
$ sudo btrfs subvolume list -p /mnt
ERROR: not a btrfs filesystem: /mnt
ERROR: can’t access ‘/mnt’
also my disk is not encrypted:
$ lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS loop0 squashf 4.0 0 100% /run/archiso/airootfs sda iso9660 Joliet Ex EOS_202208 2022-08-05-07-19-08-00 0 100% /run/archiso/bootmnt ├─sda1 iso9660 Joliet Ex EOS_202208 2022-08-05-07-19-08-00 └─sda2 vfat FAT16 ARCHISO_EFI 826B-8B64 nvme0n1 ├─nvme0n1p1 vfat FAT32 88F1-99DF ├─nvme0n1p2 ├─nvme0n1p3 ntfs 2210C99010C96B7D ├─nvme0n1p4 ntfs 66DC2B55DC2B1F35 ├─nvme0n1p5 ext4 1.0 65adf1d3-f6c8-4972-a58d-51d98e5b6117 └─nvme0n1p6 ext4 1.0 70b4f792-330c-4d00-81d7-8718fb00ec4e
when i try to chroot with nvme0n1p5, i saw i could not accessed my eos because it does not show me my files on home folder:
$ sudo mount /dev/nvme0n1p5 /mnt
$ sudo mount /dev/nvme0n1p5 /mnt/boot/efi
$ sudo arch-chroot /mnt# ls /home
#
it is obvious, something goes wrong but i just keep follow instructions on tutorial…
# sudo efibootmgr BootCurrent: 0002 Timeout: 1 seconds BootOrder: 0002,0003,0004,0000,0001 Boot0000* Windows Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000064000100000010000000040000007fff0400 Boot0001* EndeavourOS VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb) Boot0002* rEFInd Boot Manager HD(1,GPT,7194dd2b-b108-45a1-ad45-fb1a2d20517c,0x800,0x32000)/File(\EFI\refind\refind_x64.efi) Boot0003* UEFI: Generic Flash Disk 8.07 PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(0,0)/CDROM(1,0x3664c0,0x34298)0000424f Boot0004* UEFI: Generic Flash Disk 8.07, Partition 2 PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(0,0)/HD(2,MBR,0x593e4509,0x3664c0,0x34000)0000424f
(also i installed rEFInd, after i could not fix GRUB.)*
and finally i follow EFI/UEFI guide for last step.
# grub-mkconfig -o /boot/grub/grub.cfg Generating grub configuration file ... Found theme: /boot/grub/themes/EndeavourOS/theme.txt Found linux image: /boot/vmlinuz-linux Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img Found fallback initrd image(s) in /boot: amd-ucode.img initramfs-linux-fallback.img Adding boot menu entry for UEFI Firmware Settings ... done
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS-grub Installing for x86_64-efi platform. grub-install: error: /boot/efi doesn't look like an EFI partition.
I researched my problem on endeavouros forum, arch forum, google, youtube, stackoverflow etc., i tried many things but could not fix it.
Is there anyone know that what is my problem? Thanks for help beforely…
*rEFInd has just endeavouros live which installed on my usb stick on its list. is it possible to add other os’es to the list?
It is because you mounted your root partition twice. You mounted it at /mnt and /mnt/boot/efi
You need to mount your efi partition, the first one at /mnt/boot/efi
So is that refind-btrfs you are using?
Sounds like an interesting test to do.
I also have InsydeH20 and could not see how to add the grub entry.
One thing I did notice is, if you are not using a password, you will only have basic options available. As soon as you add a password, it will go into an advanced mode.
Hi, I’m another unfortunate victim of the grub update error… When I run grub-mkconfig -o /boot/grub/grub.cfg, it says /boot/grub/grub.cfg directory/file not found. The same thing happens when I run downgrade grub.
My system runs on UEFI if that helps.
have you followed the instructions on the pinned post carefully? you must’ve mounted the wrong partitions somewhere?
Reboot the ISO, redo the steps and carefully read the terminal outputs for errors.