bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installing GRUB in /dev/hdc to boot as /dev/hda


From: Ivan Passos
Subject: Re: Installing GRUB in /dev/hdc to boot as /dev/hda
Date: Wed, 19 Sep 2001 12:50:32 -0700

Ivan Passos wrote:
> 
> Ivan Passos wrote:
> >
> > I'm trying to replace LILO with GRUB. One of the most important
> > features of LILO for my development environment is to be able to
> > install LILO on a secondary HD (e.g. /dev/hdc) and then move this HD
> > to another system, where it'll be the primary HD (i.e. /dev/hda), and
> > then boot the system off of it.
> >
> > With LILO, the procedure on how to do that is described at the
> > following URL:
> >
> >         http://www.linuxdoc.org/HOWTO/mini/LILO-4.html
> >
> > My question is: is it possible to do the same with GRUB? If positive,
> > how??
> 
> OK, as I've found the answer myself, let me post the solution here for
> future reference:
> 
>         [ Install the GRUB boot files in [/dev/hdc1]/boot/grub ]
>         /sbin/grub --batch <<- EOT 1>/dev/null 2>/dev/null
>                 root (hd1,0)
>                 install /boot/grub/stage1 (hd1) /boot/grub/stage2
>         EOT

Replying to myself again ... :)

I don't know why, but this solution didn't work as expected in one of 
my systems. It would install GRUB, but after GRUB was loaded it would 
just get to the command line prompt (instead of reading the 
/boot/grub/menu.lst file), and I had to run 
'configfile (hd0,0)/boot/grub/menu.lst' to have it read the config. 
file.

In order to avoid this problem, the solution is slightly different 
from the one above: 

  [ Install the GRUB boot files in [/dev/hdc1]/boot/grub ]
  /sbin/grub --batch <<- EOT 1>/dev/null 2>/dev/null
        root (hd1,0)
        install /boot/grub/stage1 (hd1) /boot/grub/stage2 \
                (hd0,0)/boot/grub/menu.lst
  EOT

Note that this time I'm specifying the location of the menu.lst 
file explicitely, relative to the location the file will be when the 
system boots from the HD being programmed (i.e. it shouldn't be 
relative to '(hd1,0)', but really to '(hd0,0)').

Hope this helps other people. Please, FAQ maintainer, add this to 
the GRUB FAQ ...

Later,
Ivan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]