Find the answer to your Linux question:
Results 1 to 4 of 4
Even though grub-install is becoming deprecated, I guess it's the easier way to install. I wanted to ask about the option '--root-directory' for grub-install. When you run grub-install, it needs ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319

    grub-install


    Even though grub-install is becoming deprecated, I guess it's the easier way to install.

    I wanted to ask about the option '--root-directory' for grub-install. When you run grub-install, it needs to locate the GRUB image files. My understranding is that if that option is not specified, then it'll look for it in the root directory. As far as I can tell, there are two places under the root directory which contains these image files.

    1. /boot/grub
    2. /usr/lib/grub/i386-pc

    Exactly which one of these does grub-install use? I only ask because when this happens:
    Code:
    [root@spruce brock]# grub-install --root-directory=/boot /dev/fd0
    The file /boot/boot/grub/stage2 not read correctly.
    As where 'grub-install /dev/fd0' works out just fine.
    The best things in life are free.

  2. #2
    Linux Engineer
    Join Date
    Dec 2002
    Location
    New Zealand
    Posts
    766
    it seems its using $ROOT_DIRECTORY/boot/grub

    so if u specify $root_directory as /boot then its looking in /boot/boot/grub .. which doesnt exist.

    so change the thing about root directory to / and it should work.

    <edited for bad spelling, even by my standards >

  3. #3
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Crap, I can't believe I didn't read that error more thoroughly. So from this mistake, I think that setting that option really pertains to another partition on a disk that's already mounted? Does it always look for /boot/grub?
    The best things in life are free.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Yeah, grub-install always looks for /boot/grub. In fact, it's merely a shell script, so you can check and modify precisely what it does.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •