On Wed, Aug 19, 2009 at 12:06, Felix Zielcke <[email protected]> wrote:

> Am Dienstag, den 18.08.2009, 17:44 +0200 schrieb Wojtek SWIATEK:
>
> >
> > My question is the following: what exactly should I do to write the
> > MBR to /dev/hda1 using the config above. In practical terms I can
> > access it by mounting /dev/sda1 at /mnt (and then access the config
> > file via /mnt/boot/grub/grub.conf if needed).
> > Specifically, is (hd0) currently pointing to the internal or external
> > drive? In other words when I issue a
> >
> > # grub  --config-file=/mnt/boot/grub/grub.conf
> > grub> root(hd0,0)
> > grub> setup (hd0)
> >
> > will I be writing the MBR with the new (adapted to a boot from the
> > internal drive sda) config to the internal drive?
> >
> > I would like, obviously, to avoid writing the MBR on my external drive
> > which has a working MBR.
>
> It's better to use grub-install if you can.
> /boot/grub/device.map tells which device is hd0


I have never used grub-install (only grub in much simpler configurations)
and I will give it a try.
Is there a way to instruct grub-install to use the configuration from
another place than the current /boot/grub/grub.conf? In my case I would like
it to use the info at /mnt/boot/grub/grub.conf as they cover the future
setup (boot from a single internal drive). Maybe chroot to /mnt would be a
way to go? (in that case /boot would indeed refer to the future /boot and
grub-install could now take its install info from there)


>
> It is but just for the utilities.
> real grub uses BIOS disk order so hd0 is mostly the disk where it's
> loaded from.
> Whereas device.map is created by Linux device order which can be
> different.
> So sometimes you have to fix device.map yourself.


OK thanks.

Thank you for your help -- would anyone answering be kind enough to cc: by
real address, I do not get for some reason emails directed to the mailing
list (including my submission). I contacted teh owner with this issue.

Wojtek
_______________________________________________
Bug-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to