2

I have two partitions and one is meant to be solely for GRUB2's files. The layout of the filesystem on the first partition should look like:

/
     fonts/
     i386-pc/
     locale/
     grub.cfg
     grubenv

This is what I expect to get when I run grub-install --boot-directory=/mnt /dev/sda. Instead, I get this:

/
    grub/
        fonts/
        i386-pc/
        locale/
        grub.cfg
        grubenv

Why is it placing them in another sub-directory? I did not specify /mnt/grub and I have seen GRUB get installed to folders like /boot/grub2, so I know that it doesn't always make a folder named grub. How do I force it to do what I want it to do?

3
  • According to man grub-install, it always creates the subfolder grub...
    – Byte Commander
    Nov 3, 2015 at 19:01
  • @ByteCommander It may say that, but I have seen instances where it uses a different directory. On openSUSE it uses grub2.
    – Melab
    Nov 3, 2015 at 19:22
  • Maybe they use a different version or modification of GRUB over there? I don't know.
    – Byte Commander
    Nov 4, 2015 at 11:28

1 Answer 1

0

You can change the directory that concerns you only at build time, by passing a value to --with-grubdir= at configure time:

http://git.savannah.gnu.org/cgit/grub.git/tree/configure.ac?h=grub-2.02#n280 http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-install.c?h=grub-2.02#n339 http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-install.c?h=grub-2.02#n251

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.