Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] grub-install: error: failed to make directory: (Read 5038 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] grub-install: error: failed to make directory:

Tried installing grub to another partition than currently running OS', then met error such:

Code: [Select]
$ sudo grub-install /dev/sda6
Installing for x86_64-efi platform.
grub-install: error: failed to make directory: '/boot/efi/EFI/artix'

found out:

Code: [Select]
$ ls -l /boot
drwxr-xr-x 5 root root 4096 Jan 10 22:29 /boot/
total 98481
drwx------ 3 root root     1024 Jan  1  1970 efi/
drwxr-xr-x 6 root root     4096 Jun  8  2022 grub/
drwxr-xr-x 2 root root     4096 Nov 14 11:27 memtest86+/
-rw-r--r-- 1 root root    51200 Dec 21 02:25 amd-ucode.img
-rw------- 1 root root 33222738 Jan 10 22:29 initramfs-linux-fallback.img
-rw------- 1 root root  6296268 Jan 10 22:28 initramfs-linux.img

...
Now have not rebooted yet.
Any clear idea what's the mistake and definitve steps for solution ?

 

Re: grub-install: error: failed to make directory:

Reply #1
You need to specify the target with
Code: [Select]
--target=x86_64-efi
the boot directory with
Code: [Select]
--efi-directory=/boot
and the bootloader id with
Code: [Select]
--bootloader-id="ID"

Here's the arch wiki's article about it.

your cmd should look something like:

Code: [Select]
$ sudo grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="GRUB"