Announcement

Collapse
No announcement yet.

Grub's gone missing

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Grub's gone missing

    I just attempted an install of 12.04 on my second hard drive. The problem is that the install put grub on /hdb instead of the mbr. Any idea how to fix this? If I could boot into it I should be able to get grub to write over the mbr, right?

    #2
    Firstly, either your post is missing something or you mis-spoke. For the record: Both your drives have an "MBR" so based on your post, you installed grub to the second drive's MBR (hdb) rather than the first drive (hda). If you install grub to a PBR (Partition Boot Record) it would be /dev/hda1 or whatever

    To fix this (if your bios doesn't support booting from your second drive) is boot to your install media (liveCD or liveUSB), mount your install partition somewhere, re-install grub to your desired location, reboot.

    Steps:

    1. Boot to liveCD or USB, open a terminal
    2. Mount your hard drive partition that contains /boot:
    sudo mkdir /mnt/install
    sudo mount /dev/hda1 /mnt/install
    3. Install grub to the MBR of drive "A"
    sudo grub-install --root-directory=/mnt/install /dev/hda
    4. Reboot

    Unless I left something out that should do it. ***NOTE*** This assumes that you didn't specify a separate /boot partition. If you did, mount that partition instead of your install partition. Also, if you can boot to the second drive, do that and then you need only do
    sudo grub-install /dev/hda
    Last edited by oshunluvr; May 11, 2012, 11:25 AM. Reason: fixed typo

    Please Read Me

    Comment


      #3
      Originally posted by oshunluvr View Post
      sudo grub-install --boot-directory=/mnt/install /dev/hda
      shouldn't that be /mnt/install/boot?

      Comment


        #4
        Thanks, I meant to use --root-directory. Since GRUB 1.99 you can also use --boot-directory with /mnt/install/boot.
        In the case of a separate boot partition, I believe you would use mount the /boot partition and the use --boot-directory with /mnt/boot.

        It's been awhile since I actually had to do this... thank goodness!

        Please Read Me

        Comment

        Working...
        X