You are not logged in.

#1 2023-04-16 22:29:55

Gabachin
Member
Registered: 2022-05-06
Posts: 105

Grub Issue

When I installed Arch on my Dell XPS 13 laptop, I mistakenly mounted the boot partition at /boot intead of /boot/efi.

 NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 119.2G  0 disk 
├─sda1   8:1    0   511M  0 part /boot
└─sda2   8:2    0 118.7G  0 part /
zram0  253:0    0     2G  0 disk [SWAP] 

There is however, a EFI directory. The contents of /boot directory is

drwxr-xr-x    - root 12 Mar 16:52 EFI
drwxr-xr-x    - root 16 Apr 15:56 grub
.rwxr-xr-x  37M root 16 Apr 15:52 initramfs-linux-fallback.img
.rwxr-xr-x  36M root 14 Apr 18:54 initramfs-linux-lts-fallback.img
.rwxr-xr-x 9.2M root 14 Apr 18:54 initramfs-linux-lts.img
.rwxr-xr-x  38M root 16 Apr 15:52 initramfs-linux-zen-fallback.img
.rwxr-xr-x 9.4M root 16 Apr 15:52 initramfs-linux-zen.img
.rwxr-xr-x 9.3M root 16 Apr 15:52 initramfs-linux.img
.rwxr-xr-x 7.1M root 14 Feb 18:22 intel-ucode.img
.rwxr-xr-x  13M root 16 Apr 15:52 vmlinuz-linux
.rwxr-xr-x  11M root 14 Apr 18:54 vmlinuz-linux-lts
.rwxr-xr-x  13M root 16 Apr 15:52 vmlinuz-linux-zen

The system boots without problems and I can edit the grub config file to my liking. Now, every so often, an Arch update contains a grub package, with the suggestion that I reinstall grub and update grub.cfg.

Of course, then

 grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

will not work. My noob questions are, can I just delete efi from the above command to reinstall grub to /boot? Or should I do a chroot and mount /dev/sda1 to mnt/boot/EFI? Does it matter?

Last edited by Gabachin (2023-04-17 00:10:29)

Offline

#2 2023-04-16 23:24:42

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: Grub Issue

If your ESP is mounted to /boot, your only problem is that you're telling grub-install that it's somewhere else. Just fix your command.

Offline

Board footer

Powered by FluxBB