Re: Grub Manual Install Question



sebastian.h.schmidt@xxxxxxxxxxxxxx wrote:

I have to install the Grub Loader to the MBR of my Windows Partition
(4th Partition) and the grub itself (/grub folder) is in my linux /
boot
partition located on the 5th partition. .. how do i do that, i
looked into the manual but i'm not entirely sure about all that.
Is this line correct or am i screwing my system with that ?

grub-install --root-directory=/boot /dev/sda3
....
when i set up my linux system i set up 3 partitons for it "/" for the
data "/boot" for grub and the Kernel and "/swap", the "/" and the "/
swap" partition is located on my external and the "/boot" partition on
my internal drive

Subject to naming your partitions correctly,
this sounds fine to me.
But I don't claim to be an expert.

1) You can install grub on your Windows partition,
but I'm not sure why you would want to.
Most people install it on the MBR.
This should not interfere with Windows, if that is your worry.
Here are the stanzas in my grub.conf, as a matter of interest:
--------------------------------
title Fedora (2.6.23.9-85.fc8)
root (hd0,1)
kernel /vmlinuz-2.6.23.9-85.fc8 ro root=/dev/vg/slash rhgb quiet
initrd /initrd-2.6.23.9-85.fc8.img
itle Windows XP
rootnoverify (hd0,0)
chainloader +1
--------------------------------
If you are in doubt you can always put several stanzas
for the same system, and see which works.

2) You don't need to use the --root-directory option.
This is for installing grub for a system that is not running.

3) I don't know how your system works,
but on my SCSI system (Fedora) I cannot have /dev/sda4 and /dev/sda5 .
For historic reasons to do with IDE disks
I have to declare /dev/sda4 to be an "extended partition"
which is then divided into /dev/sda5 ... /dev/sda13 .

4) There are two precautions you could take.

a) Get Knoppix (Linux on a CD).
In my experience it is a life-saver if anything goes wrong booting.

b) I always save the MBR before installing anything on it,
with something like
dd if=/dev/sda of=mbr bs=512 count=1
Then if there is any problem I can re-install it with
dd if=mbr of=/dev/sda bs=512 count=1

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
.



Relevant Pages

  • Re: Grub did not install on dual boot machine.
    ... why did you "install" Linux on a FAT16 partition. ... See below re: grub. ...
    (comp.os.linux.setup)
  • Re: grub-install seems to be wiping my partitions
    ... Windows, and then, it's generally just to finally ... up to date and then get back to Linux, ... partition that Linux was on. ... Suddenly grub gave me the error 22, ...
    (Fedora)
  • Re: XP and Redhat: dual boot problem
    ... > To install GRUB as bootloader it would have been sufficient to ... > been that GRUB is installed and configured (to start Linux, ... second installation. ... > Partition having 2 logical partitions" from your first posting. ...
    (comp.os.linux.setup)
  • Re: [SLE] Urgent! Need help!
    ... Assuming that your linux partition is ok and its number is the same (you ... You'll se a prompt in a arrow style, like grub> ... I've been trying to recover my Windows machine from a backup. ...
    (SuSE)
  • Re: [SLE] Grub loading Stage2 read error
    ... hda7 Linux Reiserfs (root) ... partition, since if it can be convinced to boot from /dev/hda7, everything ... You installed grub to the /boot partition and not on the MBR ...
    (SuSE)