11

I'm trying to install arch-linux for the first time. everything was OK till I tried to install "grub" boot-loader to a USB drive.

I am working by the WIKI ARCH LINUX guide.

both of this commands worked with no errors:

# mkdir -p /mnt/usb ; mount /dev/sdc1 /mnt/usb

# grub-install --target=i386-pc --recheck --debug --boot-directory=/mnt/usb/boot /dev/sdc

but the next command return an error:

failed to get canonical path of 'airootfs' :

# grub-mkconfig -o /mnt/usb/boot/grub/grub.cfg

can any one assist?

(tried to arch-chroot /mnt /bin/bash on this one the command is not found).

migrated from stackoverflow.com Dec 26 '15 at 18:42

This question came from our site for professional and enthusiast programmers.

9

Try adding --root-directory=/mnt to the grub-install command. It seems to be undocumented, but I saw it mentioned on some forum, and it worked for me.

1

Hit this same problem a short while ago, and figured it out. It seems like you may not have the grub package installed in your target file system.

So arch-chroot to the target (/mnt/usb), run pacman -S grub, and then execute grub-install and grub-mkconfig with correspondingly updated parameters to account for the chroot.

-1

try executing arch-chroot /mnt /bin/bash first

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.