# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
Installing for x86_64-efi platform.
grub-install: error: /boot doesn't look like an EFI partition.
On a fresh base instalation, when trying to install grub I get this error. When I run:
# efibootmgr
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0005,0002,0006
Boot0002* UEFI OS
Boot0005* Hard Drive
Boot0006* UEFI: SanDisk Cruzer Glide
it shows my computer is running Artix booted from my usb with UEFI. When I exit chroot and run:
# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0 squashfs 4.0 0 100% /run/artix/sfs/livefs
loop1 squashfs 4.0 0 100% /run/artix/sfs/rootfs
sda
└─sda1 ext4 1.0 a9d1b3c0-c1ef-4f34-8f73-b8a59184145a
sdb
├─sdb1 vfat FAT32 BOOT F82D-20C4 30.3G 6% /mnt/boot
├─sdb2 ext4 1.0 ROOT 00be7f0c-4a9a-412b-9229-0da57514d4a6 30.3G 6% /mnt
└─sdb3 ext4 1.0 HOME 53d35a0d-8175-4b69-ad83-9684eea9f2ac 856.9G 0% /mnt/home
sdc
└─sdc1 exfat 1.0 3733-3130 59.4G 0% /run/media/artix/3733-3130
sdd
sde
sdf
sdg iso9660 ARTIX_202107 2021-07-25-18-21-45-00
├─sdg1 iso9660 ARTIX_202107 2021-07-25-18-21-45-00 0 100% /run/artix/bootmnt
└─sdg2 vfat FAT12 ARTIX_EFI B325-5210
# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.37.1).
Changes will remain in memory only, until you decide to write them.
Command (m for help): p
Disk /dev/sdb: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: SPCC Solid State
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: 7DA5284A-0916-0D4E-BD17-2F1FA0465B9C
Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
/dev/sdb2 1050624 74450943 73400320 35G Linux filesystem
/dev/sdb3 74450944 2000409230 1925958287 918.4G Linux filesystem
The partitioin is formatted in Fat32, is mounted on /mnt/boot, and is a EFI System. I don't know if it is needed but here is my fstab:
# cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdb1 LABEL=BOOT
UUID=F82D-20C4 /boot vfat defaults 0 2
# /dev/sdb2 LABEL=ROOT
UUID=00be7f0c-4a9a-412b-9229-0da57514d4a6 / ext4 rw,relatime 0 1
# /dev/sdb3 LABEL=HOME
UUID=53d35a0d-8175-4b69-ad83-9684eea9f2ac /home ext4 rw,relatime 0 2
I had to manually enter the section for the boot partition because it wasn't there, the same error occurs if that entry is present or not. The UUID is different from the other partitions, as output of lsblk -f shows above.
Using the installer with Plasma and Lxde works fine but when I try a base install with openrc or runIt I get the same error, everything goes well up to the grub install. Any help is appreciated.
I think /boot needs to be /boot/efi?
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
# /dev/sdb1 LABEL=BOOT
UUID=F82D-20C4 /boot/efi vfat defaults 0 2
Unrelated to the problem, but make sure you also set the correct partition types for / and /home (should be "Linux root (x86-64)" and "Linux /home"):
https://wiki.archlinux.org/title/Partitioning#Example_layouts
After going through the install process from the beginning, it worked, installed grub with no errors. The difference that time, when I ran fstabgen the entry for /boot was actually there in /mnt/etc/fstab. So I went back and did the whole install process again, but with the partitions i actually wanted, I had simplified them until the error was figured out. Ran fstabgen again and no /boot(or any other partitions i made and had mounted):
# cat /mnt/etc/fstab
# /dev/sdb2 LABEL=ROOT
UUID=7dc9bc48-805a-4fbd-8bf8-61b55f9dc3e4 / ext4 rw,relatime 0 1
# /dev/sdb3 LABEL=HOME
UUID=1c69700e-a365-40d2-b1fe-a48f423939d2 /home ext4 rw,relatime 0 2
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 59.4M 1 loop
loop1 7:1 0 1.5G 1 loop
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 915G 0 part /mnt/media
└─sda2 8:2 0 16.5G 0 part /mnt/var
sdb 8:16 0 953.9G 0 disk
├─sdb1 8:17 0 512M 0 part /mnt/boot
├─sdb2 8:18 0 40G 0 part /mnt
└─sdb3 8:19 0 913.4G 0 part /mnt/home
sdc 8:32 1 59.5G 0 disk
└─sdc1 8:33 1 59.5G 0 part
sdd 8:48 1 0B 0 disk
sde 8:64 1 0B 0 disk
sdf 8:80 1 0B 0 disk
sdg 8:96 1 7.5G 0 disk
├─sdg1 8:97 1 1.7G 0 part /run/artix/bootmnt
└─sdg2 8:98 1 4M 0 part
Exited the chroot, ran umount -a, remounted everything with the same results. The wiki says to go back and check the fstab file and add what you need. I have been doing that, but the only successful grub installation was when the fstabgen command recognised the /boot partition and added it to the file itself. There are discrepancies between lsblk and lsblk -f too.
# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0 squashfs 4.0
loop1 squashfs 4.0
sda
├─sda1 ext4 1.0 MEDIA 8130efe8-61f5-4d67-9de1-a7c0bc0ef786 34.8G 6% /mnt/media
└─sda2 ext4 1.0 VAR d534fa9c-74f0-46d3-ad38-75d77c276355 34.8G 6% /mnt/var
sdb
├─sdb1 vfat FAT32 BOOT 6CDA-5785 34.8G 6% /mnt/boot
├─sdb2 ext4 1.0 ROOT 7dc9bc48-805a-4fbd-8bf8-61b55f9dc3e4 34.8G 6% /mnt
└─sdb3 ext4 1.0 HOME 1c69700e-a365-40d2-b1fe-a48f423939d2 852.3G 0% /mnt/home
sdc
└─sdc1 exfat 1.0 3733-3130
sdd
sde
sdf
sdg iso9660 ARTIX_202107 2021-07-25-18-21-45-00
├─sdg1 iso9660 ARTIX_202107 2021-07-25-18-21-45-00 0 100% /run/artix/bootmnt
└─sdg2 vfat FAT12 ARTIX_EFI B325-5210
I've found that once i mount / to /mnt the output of lsblk -f changes:
# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0 squashfs 4.0
loop1 squashfs 4.0
sda
├─sda1 ext4 1.0 MEDIA 84cd0766-bd53-4ed6-beed-0f918ed50242 853.8G 0% /mnt/media
└─sda2 ext4 1.0 VAR e9bea06e-84f8-41fd-87ad-0e608a9fc113 15.2G 0% /mnt/var
sdb
├─sdb1 vfat FAT32 BOOT 4FBC-72FD 511M 0% /mnt/boot
├─sdb2 ext4 1.0 ROOT db70980a-705b-4a6e-bf5e-cea1d4f3f8a4
└─sdb3 ext4 1.0 HOME 2c42cf13-28b5-4132-8bf9-27d221a72e6c 852.3G 0% /mnt/home
sdc
└─sdc1 exfat 1.0 3733-3130
sdd
sde
sdf
sdg iso9660 ARTIX_202107 2021-07-25-18-21-45-00
├─sdg1 iso9660 ARTIX_202107 2021-07-25-18-21-45-00 0 100% /run/artix/bootmnt
└─sdg2 vfat FAT12 ARTIX_EFI B325-5210
after / is mounted to /mnt:
# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0 squashfs 4.0
loop1 squashfs 4.0
sda
├─sda1 ext4 1.0 MEDIA 84cd0766-bd53-4ed6-beed-0f918ed50242 /mnt/media
└─sda2 ext4 1.0 VAR e9bea06e-84f8-41fd-87ad-0e608a9fc113 /mnt/var
sdb
├─sdb1 vfat FAT32 BOOT 4FBC-72FD /mnt/boot
├─sdb2 ext4 1.0 ROOT db70980a-705b-4a6e-bf5e-cea1d4f3f8a4 37.1G 0% /mnt
└─sdb3 ext4 1.0 HOME 2c42cf13-28b5-4132-8bf9-27d221a72e6c 37.1G 0% /mnt/home
sdc
└─sdc1 exfat 1.0 3733-3130
sdd
sde
sdf
sdg iso9660 ARTIX_202107 2021-07-25-18-21-45-00
├─sdg1 iso9660 ARTIX_202107 2021-07-25-18-21-45-00 0 100% /run/artix/bootmnt
└─sdg2 vfat FAT12 ARTIX_EFI B325-5210
You have to mount / to /mnt first before your other partitions. Fstab generated fine and grub is installed.
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
Installing for x86_64-efi platform.
Installation finished. No error reported.