LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   grub gripe (/boot/boot/boot/grub) (https://www.linuxquestions.org/questions/linux-software-2/grub-gripe-boot-boot-boot-grub-254237/)

gypsy_rabbi 11-12-2004 11:05 PM

grub gripe (/boot/boot/boot/grub)
 
Short version: I just installed Slack 10.0 on an old box. I have /boot as a separate partition on which I wanted grub. Slack doesn't have grub, so I booted up Knoppix 3.3 and tried installing it from there. grub-install creates a /boot/boot/grub directory and puts all its files in there instead of /boot/grub.

Long version. I tried all of the following:
Code:

mount /dev/hda1 /mnt/hda1
grub-install --root-directory=/mnt/hda1 '(hd0)'
grub-install --root-directory=/mnt/hda1 /dev/hda

unlink /boot    # this is a link to /KNOPPIX/boot by default
mkdir /boot
mount /dev/hda1 /boot  # thinking maybe having "boot" in the name makes a difference
grub-install --root-directory=/boot '(hd0)'
grub-install --root-directory=/boot /dev/hda

None of those worked.

So then I went into the grub-install script, extracted the relevant parts (after the comment "Now perform the installation" in the script), and ran them manually with the appropriate tweaks. That didn't work either: it gave me "Error 15: file not found" (I'm quoting from memory). The "setup" command in grub-install seems to run an "install" command. I tried playing around with that too, with no results.

Having spent more than an hour on this, I just now decided to go with /boot/boot/grub (which after all works fine). At this point if grub wanted to give me /boot/boot/boot/boot/boot/boot/grub I would accept it. But it still seems strange. I can't imagine this is an unusual configuration (and in fact this is exactly the way I have my other desktop set up, and it works just fine!).

Any ideas? Thanks.

gd2shoe 11-14-2004 02:05 AM

/boot/boot/boot/boot/boot/boot/grub

That's nothing, you could go for as long as you wanted on my system and it would still pick it up! Jokeing aside, many distributions place a sym link in /boot pointing to itself. On my system if I go to /boot and type "ls -l" then it tells me there is a "boot -> ." item in my /boot directory. the period is a short cut way to refer to whatever directory you are already in (.. refers to the next level up). This way, /boot has itself inside itself. /boot, /boot/boot, /boot/boot/boot, etc. are all really the same directory on this type of system.

I don't know why some things require access to /boot/boot, but apparently some do. This is the most common way around the problem that I have seen.

Andrew Benton 11-14-2004 07:01 AM

What partition is your boot partition that has /grub/menu.lst on it? If it's hda3 (for example), subtract 1 from it and call it (hd0,2) so grub will understand you (grub counts from 0 so all numbers are one less than you'd expect. It uses numbers not letters, hence the 0 instead of a). Then run grub

grub
> root (hd0,2)
> setup (hd0)
> quit

Make sure you change the root (hd0,2) line to reflect where menu.lst is. The setup (hd0) line means install grub on the MBR


All times are GMT -5. The time now is 03:48 PM.