They offer different flash templates with latest features.
Login

Forgot password
Register
Latest changes

The idea module was updated:

  • We now have 10 statuses instead of 5
  • The review process now involves both moderators and developers
  • Moderators can now review form and content separately
  • Moderators can now delegate decisions to developers when they are unable to assess the pertinence or feasibility of an idea
Improve this website
  • Report bugs here.
  • Register ideas for improvements using the idea module on this website.
Back
Written by:
cra1g321
Score: 32
votes: 41
Format: Article

 Reinstall grub2 from LiveCD


These instructions are based on the instructions from the ubuntu help website - https://help.ubuntu.com/community/Grub2#Reinstalling from LiveCD
Il try and make them easier to understand as when i first saw them it looked a bit complicated. Please dont look at this post thinking its gonna take forever it wont. Just take your time and follow them correctly.

1. Ok 1st thing you want to do is boot into your LiveCD of Mint. (best to use the same version as the one you are running on your computer)Once everything is loaded and your at the mint desktop. Open the Mint Menu and type "Gparted" into the filter text box.When it loads you should see all the partitons that are on the hard drive. Linux Mint partitions will probaly be EXT4 and the windows partitions will probaly be NTFS.

2. Look at the list of partitons and see what one is the Linux Mint partiton.You can tell this by looking at the Mount Points of the partitons. You should see one with a "/" under Mount Point and its File system will likely be EXT4. When you have located this partition look to the left and see what it is called. For example mine is called dev/sda6 (yours may be something different like dev/sda1 etc)Now that you know what partition is the Linux Mint partition, just leave gparted open so you can look back at it again incase you forget. Now open up a Terminal by clicking the Mint menu then clicking "Terminal" under System.
Now we need to mount the Linux Mint partition so that we are able to use it (access it) . To do this copy and paste this code into the terminal sudo mount /dev/sdXY /mnt
You will need to change the XY part of the code to match the name of your Linux Mint partition. For example my mint partition is dev/sda6 so i would change the code to - sudo mount /dev/sda6 /mnt

Now that you edited the line of code to match your mint partiton, go ahead and press Enter on your keyboard then type in your password if your asked for it then press Enter again.(When your entering in your password you will not see any characters, letters numbers etc). It may look as if nothing has happened, but your Linux Mint partition will now be mounted. The terminal will display nothing after the $ sign like it did when you 1st open it.

3. Now we need to tell the computer to reinstall grub2 to the Linux Mint partition we just mounted. To do this copy and paste this line of code into the terminal sudo grub-install --root-directory=/mnt/ /dev/sdX
Again you will need to change this line of code to match your Linux Mint partition. Change the "X" at the end to match your mint partiton. My partition is dev/sda6 so i will change the the line of code to - sudo grub-install --root-directory=/mnt/ /dev/sda
It is IMPORTANT that you do not enter any number just the letters of the partitions.
When you have edited the line of code press Enter on your keyboard. You should then see a message saying Grub installer finished or something like that. Now close the terminal and gparted and reboot your pc/laptop without the livecd in the disc drive. To restart click the mint menu then click "Quit" then "Reboot".

*Note after you reboot you should see the grub2 menu you had before you installed/repaired windows. You may need to refresh (update) this menu so that it detects the new windows partition.
This can easily be done by logging into your Linux Mint, opening a Terminal then copying and pasting sudo update-grub then press Enter then enter your password then hit Enter again. You will then see it detecting all the bootable partitons on the Hard drive. When you it displays 'Done', reboot again and you should be able to boot into windows again.

I know this isn't the best tutorial for reinstalling grub but i hope it helps someone.


Tags: Reinstall grub2 mint Livecd
Created: 2 years ago.
Last edited: 2 years ago.
Read 6809 times.

Comments
2 weeks ago

AndrewGilbert-49
Thanks very much for this info. I was starting to sweat when firstly presented with Gparted then GRUB I am well on my way to being converted to Linux Mint. It might be useful, if you haven't included this in another tutorial, to note that the latest LMDE installer does all this for you. BUT you need to know basics like setting partition size and linux-swap partition size and file system it seems ext4 is the one to use. Once again I can't thank you enough if this info wasn't available I would have been going round in circles for a considerable time.
Regards
Andrew Gilbert (Converted and up and running)
 
3 months ago

user213
I have look ALL over the place for how to do this, almost gave up until I found this! Thank you very much!  
6 months ago

miraceti
Excellent tutorial, you just saved my data after my heat sink got lose and the crash damaged grub!

Thank you :D
 
6 months ago

harry655
very good  
8 months ago

yoyology
Excellent tutorial. Got me through when the Install Linux Mint application failed to produce a bootable machine.  
10 months ago

WebAvenger
I get this error:

mint@mint ~/Desktop $ sudo grub-install --root-directory=/mnt/ /dev/mapper/isw_eaajiabbia_M17X_RAID0p5
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
 
1 year ago

Thinker
Simple and Best Explaination.
 
1 year ago

abdoo47
Very useful , thank you.  
1 year ago

sayan_acharjee
@pintyoo33, Try CHROOT method from the link below:
https://help.ubuntu.com/community/Grub2#Reinstalling GRUB 2
 
1 year ago

pintyoo33
Hi guys! The tutorial is clear, and usefull! Need to thank, but I got some mistake. I followed your steppes, but I got an error message.
mint@mint ~ $ sudo mount /dev/sda2 /mnt
mint@mint ~ $ sudo grub-install --root-directory=/mnt/ /dev/sda
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
/usr/sbin/grub-setup: warn: Sector 32 is already in use by FlexNet; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track.
Installation finished. No error reported.

Can sbd help me to solve this problem? :|
 
1 year ago

caribriz
Thanks for this great tutorial. Easy to follow steps in newbie language. Made a daunting task easy for a first-timer.  
1 year ago

antioch
This saved me from submitting a problem and waiting for a solution.

This repair tutorial is just what I needed, exactly when I needed it.

Thank you.
 
1 year ago

tomapio
Thank you!.  
1 year ago

sdim
Very useful.  
1 year ago

cra1g321
Glad to hear it helped you, groucho1989  
1 year ago

groucho1989
Worked first time to recover grub menu lost after installing PCLinux OS as a 2nd OS to Mint11. Thank you.  
1 year ago

cra1g321
Im no linux expert, so im not completely sure what the error means. The grub-probe is the tool im assuming used for detecting what OS exist on the computer. The error is 'Cannot find a device for /boot' which i think means that it can't find a partition that is used for /boot, but i think dont think this makes any difference because ubuntu/linux mint and most distros dont actually create a /boot partition during installation, only one i know which does off the top of my head is Arch Linux.
So i dont think its error to be worrying about, its more just a notification rather than a error IMO.
 
1 year ago

cordoba57
I will add my "thank you" for this tutorial.

However, I too received the error message:

/usr/sbin/grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Install successful. No errors were reported

What's the source of the error, and is it safe to ignore? My system booted fine.

k
 
1 year ago

cra1g321
Glad it helped you Rikstation :)  
1 year ago

Rikstation
Very well written for newbies, The main things i was looking for were easy to find when scanning the page as they were in bold.
Promoted, Many thanks
 
2 years ago

noztox
@sayan_acharjee +1 ;)  
2 years ago

Alexio
A really easy to use Live CD that fixes the GNU GRUB in seconds is Rescatux:
1. Download the ISO, burn it onto a CD or create a bootable USB stick.
2. Boot the Live CD/USB and a nice wizard named Rescapp will guide you through your rescue tasks: just choose "Restore GRUB / Fix Linux Boot" to restore the GRUB.
3. Run "update-grub", then restart your computer.

Currently Rescatux only restores GRUB to the MBR, but more features should be available in the next versions.
 
2 years ago

sayan_acharjee
This did not work in my case, the grub-install command gave this error:
grub-probe: error: cannot find a device for /boot (is /dev mounted?).

Then I tried Method 3 of the tutorial below by using CHROOT, then only it worked.
https://help.ubuntu.com/community/Grub2#Reinstalling GRUB 2
 
2 years ago

MestreLion
Very nice tutorial! I already knew all the info in here, but man, it took a looong time to figure out... my life would be MUCH easier if I met this tutorial before. "sudo grub-install --root-directory=/mount/LABEL /dev/sdX" is really a life-saver command.

A few comments, hints and questions:
- Maybe for begginers step #1 and #2 would be easier if replaced by something like:

"Open Nautilus (Menu -> Computer), find your Linux/Mint partition (something like "xx GB Filesystem on xxx GB Hard Drive") and double-click it. That will mount it. Now mouseover the recently mounted partition and write down the mount point (something like /media/XXXX)"

That avoids using several programs (including the newbie-dangerous gParted), and its 100% GUI. It only needs Nautilus


- Why do i always get a mysterious error when i use install-grub from a LiveCD? The output is something like this:

$ sudo grub-install --root-directory=/mount/LINUX /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Install successful. No errors were reported

It does work, and my grub is restored, as if actually no errors had happen. So i usually just ignore that message... but always wondered what does that mean. It only happen when using a LiveCD. Using Mint 10 here (both Live and in LINUX partition. Any clue?
 
2 years ago

cra1g321
OMG i saved someones life ;)

Glad to hear it helped you.
 
2 years ago

romanybob
Perfect, saved my life ;)  
2 years ago

cra1g321
Plz vote if everything works fine for you ;)  
2 years ago

sayan_acharjee
Hi,
I am going to try this and will let you know the result here, but its look quite useful. :D
 
2 years ago

hasuin
Very useful. Thank you!  
2 years ago

JustJames
I like the tutorial, but it might also help to have an addendum for those poor souls like myself that made their lives more complicated by putting linux on an entirely different hdd.  
2 years ago

cra1g321
Plz leave a reply if you voted, so i can say thanks :)  
2 years ago

cra1g321
really surprised no one has made a tutorial on how to do this. This week I will be condensing this tutorial and my other tutorial (removing windows 7 from dual boot) so that they are clearer to read and understand.  

Other tutorials from cra1g321