Find the answer to your Linux question:
Results 1 to 9 of 9
Install Mint on comp that has win7. All went well for a few months. Win7 MBR got corrupt so I reinstalled it. Comp just boots into win7 now. How do ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Location
    South Texas
    Posts
    28

    Mint 14 bootloader reinstall??


    Install Mint on comp that has win7. All went well for a few months. Win7 MBR got corrupt so I reinstalled it. Comp just boots into win7 now. How do I get the boot menu back so i can pick win7 or mint? Thanks

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    One of the easiest ways that I've found to restore GRUB is to use the Parted Magic LiveCD to boot the machine, and as it begins to boot, you pick the GRUB option that offers to boot into Linux using any working grub.cfg that it can find on that machine. Once the machine is fully booted, you log in as usual, then restore GRUB to your hard disk. For me, it's done (as root user) with the following command:

    Code:
    grub-install /dev/sda
    Be sure to change the drive letter at the end of the 'sda' to match your own device.
    oz

  3. #3
    Just Joined!
    Join Date
    Jan 2013
    Location
    South Texas
    Posts
    28
    Quote Originally Posted by oz View Post
    One of the easiest ways that I've found to restore GRUB is to use the Parted Magic LiveCD to boot the machine, and as it begins to boot, you pick the GRUB option that offers to boot into Linux using any working grub.cfg that it can find on that machine. Once the machine is fully booted, you log in as usual, then restore GRUB to your hard disk. For me, it's done (as root user) with the following command:

    Code:
    grub-install /dev/sda
    Be sure to change the drive letter at the end of the 'sda' to match your own device.
    Followed instructions and got this "grub-probe: error: failed to get canonical path of /cow" .

  4. $spacer_open
    $spacer_close
  5. #4
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Hello

    Sorry that method didn't work for you. I don't run Mint so can't test it, but you can check the following link for several other GRUB restoration methods that reportedly worked:

    Linux Mint Forums: View topic - Grub Boot Loader
    oz

  6. #5
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    909
    Mint 14 uses grub2, I believe.

    Boot from Mint livecd if you have it.
    Open command line.
    If you used logical volumes, run
    lvscan
    and determine which of your LVs is the / (root) volume. If lvscan isn't available, you can install the package on the live disk (in RAM, anyway) with
    apt-get install lvm2
    If you're not using logical volumes, you can just run fdisk -l (lower case L) to determine which is the root device.

    Next, mount the root device
    mount /dev/<device> /mnt

    If it mounts correctly, you should be good.
    Next, run
    chroot /mnt
    This will change the root of your system from the livecd to the actual installed mint system.
    Next, run
    grub-install (it may be grub2-install, varies by distro)

    It should run, and after it's finished, reboot the system.

    If you need help determining which one of your volumes is your root volume, paste the output of fdisk -l and lvscan in this thread.

  7. #6
    Just Joined!
    Join Date
    Jan 2013
    Location
    South Texas
    Posts
    28
    Quote Originally Posted by mizzle View Post
    Mint 14 uses grub2, I believe.

    Boot from Mint livecd if you have it.
    Open command line.
    If you used logical volumes, run
    lvscan
    and determine which of your LVs is the / (root) volume. If lvscan isn't available, you can install the package on the live disk (in RAM, anyway) with
    apt-get install lvm2
    If you're not using logical volumes, you can just run fdisk -l (lower case L) to determine which is the root device.

    Next, mount the root device
    mount /dev/<device> /mnt

    If it mounts correctly, you should be good.
    Next, run
    chroot /mnt
    This will change the root of your system from the livecd to the actual installed mint system.
    Next, run
    grub-install (it may be grub2-install, varies by distro)

    It should run, and after it's finished, reboot the system.

    If you need help determining which one of your volumes is your root volume, paste the output of fdisk -l and lvscan in this thread.
    device boot system

    /dev/sda1 hidden ntfs winre THIS IS THE HIDDEN PARTION TO RESTORE WINDOWS
    sda2 * hpfs/ntfs/exfat THIS IS SHOWN AS THE BOOT PARTITION
    sad3 extended
    sda4 linux
    sda5 linux
    sda6 linux swap / solaris
    sda7 linux
    sda8 linux swap / solaris
    sda9 linux
    sda10 linux

    sda10 has the mint partition i need to boot from. i did not post the START, END, BLOCKS, and ID of the Fdisk -l (took me a min to figure the 1 should of been an l)

    Running lvscan says NO VOLUME GROUPS FOUND.

    Thanks for your help.

  8. #7
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Hopefully, you still have the Mint 14 Live CD. If you do boot it up and open a terminal. If you are sure that sda10 is your Mint partition, first mount it:

    sudo mount -t ext4 /dev/sda10 /mnt

    Then run this command: sudo grub-install --root-directory=/mnt/ /dev/sda

    This should install Grub2 to the mbr pointing to its boot files on sda10. Take a look at the link below for a more detailed explanation of the commands:

    Reinstall grub2 from LiveCD - Linux Mint Community

    If for some reason that fails, post back.

  9. #8
    Just Joined!
    Join Date
    Jan 2013
    Location
    South Texas
    Posts
    28

    2nd post to post.

    Was able to mount sda10. Still would not install Grub---got same error message. Got the beloved Linux boot menu back. Pick the Mint boot option and it worked (just a few minor issues). Can I delete the partions that I do not use without any bad recourse? Thanks very much for your help.

    p.s. My first post back to your last post did not take. Hope this one does.

  10. #9
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Can I delete the partions that I do not use without any bad recourse?
    Not really. If you have the Mint root partition on sda10 and delete any partitions from 5-9, the Mint partition number will change and you will then again have to reinstall Grub. Which partitions do you want to delete?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •