You are not logged in.
Hello,
I am trying to re-install grub as advise in the Arch latest news
After a grub package update it is advised to run both, installation and regeneration of configuration
Unfortunatly when running the cmd
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --efi-directory=/boot/EFI
it returns
Installing for x86_64-efi platform.
grub-install: error: /boot/EFI doesn't look like an EFI partition.
/boot/EFI is present but empty
pwd
/boot
ls
amd-ucode.img grub initramfs-linux.img initramfs-linux-lts.img vmlinuz-linux-lts
EFI initramfs-linux-fallback.img initramfs-linux-lts-fallback.img vmlinuz-linux
Any hint how I can do that ? thank you
Last edited by jeromeBdt (2022-09-11 01:48:02)
Offline
Well, for starters you could do lsblk, then see which partition is the vfat EFI System Partition.
Then do the grub-install there instead.
I'm guessing you mounted it in /boot?
Offline
Thanks for the help,
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part
└─nvme0n1p2 259:2 0 476.4G 0 part /
When installing Arch I mounted it like so(only a partition for EFI and a second one for the reste)
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mkdir /boot/EFI
mount /dev/sda1 /boot/EFI
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
How do I target the partition "nvme0n1p1"(I guess ?) as it's not a directory ? (I mean the cmd flag is --efi-directory=)
Last edited by jeromeBdt (2022-09-10 12:22:55)
Offline
Well, mount it first?
Its not mounted, as one can see by the lack of mount-point.
And no on the partition, that's legacy boot stuff.
Offline
sorry it may sound stupid, but how I do that ?
Offline
...
mount /dev/sda1 /boot/EFI
...
You already know?
How did you install ArchLinux again?
Regardless, do a `sudo mount /dev/sda1 /boot/EFI`, since you most likely are a regular user atm, then do a grub-install.
Future note, as long as you don't do a grub-mkconfig, you don't need to do grub-install on each grub update, or you could automate it if grub-mkconfig for some reason also is.
I suggest doing something about your fstab, I have no idea how did you end with a non-mounted ESP in the first place, or well, don't want to make assumptions of how.
sorry it may sound stupid
Being pedantic, lack of knowledge doesn't make one stupid, so you are fine, however I advise against copy pasting code, or else ArchLinux becomes a terrible choice.
Last edited by GaKu999 (2022-09-10 12:36:29)
Offline
Tks,
It does not work.
[root@thearch ~]# mount /dev/sda1 /boot/EFI
mount: /boot/EFI: special device /dev/sda1 does not exist.
dmesg(1) may have more information after failed mount system call.
doing df I got that
[root@thearch ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
dev 7848908 0 7848908 0% /dev
run 7866352 1312 7865040 1% /run
/dev/nvme0n1p2 490618108 342867316 122755296 74% /
tmpfs 7866352 102504 7763848 2% /dev/shm
tmpfs 7866352 14440 7851912 1% /tmp
tmpfs 1573268 40 1573228 1% /run/user/1000
But it is the nvme0n1p2 partition, and I should access the nvme0n1p1, don't I ?
Last edited by jeromeBdt (2022-09-10 12:50:00)
Offline
My apologies, you seem to be using an nvme and I mixed the command up with whatever the "I installed Arch with this" was supposed to be.
sudo mount /dev/nvme0n1p1 /boot/EFI
Last edited by GaKu999 (2022-09-10 12:52:57)
Offline
It's gives me this
sudo mount /dev/nvme0n1p1 /boot/EFI
mount: /boot/EFI: unknown filesystem type 'vfat'.
dmesg(1) may have more information after failed mount system call.
Is that bc the fs of the uefi partition has been setted as FAT32 and the reste as EXT4 any hint to fix that again ? (sorry to ask you again, I scare to break all)
Last edited by jeromeBdt (2022-09-10 15:06:52)
Offline
Probably can't load the module for FAT filesystems, which mean you probably did a kernel update recently without a reboot.
You might need to do a reboot.
Have an archiso by hand as well...
Last edited by GaKu999 (2022-09-10 15:06:05)
Offline
yes, I just did an update(pacman -Syu), but I scare to reboot as maybe grub won't work properly... ? so it's fine to reboot ?
Last edited by jeromeBdt (2022-09-10 15:10:09)
Offline
yes, I just did an update(pacman -Syu), but I scare to reboot as maybe grub won't work properly... ? so it's fine to reboot ?
Could edit the grub config by hand and remove the fwsetup bit if the grub update breakage is a problem on your end.
And always have an archiso at reach.
Offline
there is no fwsetup in the grub.conf, I will try a reboot so. Tks
Offline
It rebooted without any problem, I mounted the /boot/EFI to /dev/nvme0n1p1 as you told me, worked great and I could re-install and re-configure grub
mount /dev/nvme0n1p1 /boot/EFI
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/EFI
└─nvme0n1p2 259:2 0 476.4G 0 part /
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --efi-directory=/boot/EFI
grub-mkconfig -o /boot/grub/grub.cfg
@GaKu999 thank you for your help, patience and time, I really appreciate it.
Last edited by jeromeBdt (2022-09-11 01:43:08)
Offline
Well, for starters you could do lsblk, then see which partition is the vfat EFI System Partition.
Then do the grub-install there instead.I'm guessing you mounted it in /boot?
Thanks for the info. Brand new user here (a few weeks) and this was very helpful. Helped me set up secure boot with grub and sbctl. I was missing the correct mount point.
Offline