How to install GRUB to MBR?

Discussion in 'Linux, BSD and Other OS's' started by blade, Apr 22, 2007.

  1. blade

    blade GEEK 2.0

    Likes Received:
    0
    Trophy Points:
    0
    How do you install GRUB to the MBR, what commands do I need to put in the Terminal.

    Currently, I have the Vista bootloader, with XP; the Vista OS is on my first sata drive and is on the first partition. I tried typing in... "grub> install (sd0,0)", but to no avail
     
  2. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    i've being searching through HWF for the commands and stuff that Addis was good enough to provide me with[ot]but i couldn't find them[/ot]you could also go through a tutorial like this and i think these are also relevant, this & this

    Edit: [ot]this one uses GRUB not LILO[/ot]
     
  3. motorheadbiker

    motorheadbiker Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    try dis "grub-install hda" hda is ur drive.. u can change it to any drive u want where u want to install the grub...
     
  4. blade

    blade GEEK 2.0

    Likes Received:
    0
    Trophy Points:
    0
    i have 2 drives though, a sata, and an ide, how is it suppose to know where exactly to install it if i jus put hda
     
  5. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    hda separates into hd = IDE hard disk, a = IDE hard disk number (a = IDE primary master, b = primary slave, c = secondary master, d = secondary slave) the number that appears after (e.g. hda1) is the partition number, partition number 5 (e.g. hda5) is always the extended partition (containing all logical partitions)[ot]i think SATA drive are listed as sda1 (e.g. this defines partition 1 on SATA disk 1[/ot]

    BTW: so if you want to boot the SATA drive the MBR for that disk would be sda, on IDE the MBR is on hda (the MBR is the default location for the boot sector, although you can change the default by adding a partition number)
     
  6. Addis

    Addis The King

    Likes Received:
    91
    Trophy Points:
    48
    Try
    Code:
    grub-install /dev/sda
    or /dev/sdb etc
     

Share This Page