I was trying to install Arch onto an SD card today, and was surprised to find that when I rebooted my machine to test it that it had completely trashed the bootloader on my NVME drive, even though I'd partitioned the SD and specified the EFI directory properly.

Just to be sure, I did this twice more and sure enough both times it trashed the setup on my internal drive.

I'm thinking this is down to my unfamiliarity with the tool, though it seems like really odd behaviour. Does anyone have some better insight into how grub-install works and why it may be doing this?

I believe my commands were along the lines of

mount /dev/mmcblk0p2 /mnt
mount /dev/mmcblk0p1 /mnt/efi
arch-chroot /mnt
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=arch

Thanks in advance

  • I would guess grub got the wrong drive because you didn't explicitly specify the install device. Can you try grub-install again with /mnt/efi pointing to your mounted efi directory and providing /dev/mmcblk0 as install-device? The command would be grub-install --target=x86_64-efi --efi-directory=/mnt/efi --bootloader-id=arch /dev/mmcblk0 – Freddy Feb 4 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.