Reinstalling Grub2 using LiveCD

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Reinstalling Grub2 using LiveCD

Postby cra1g321 on Sun Oct 24, 2010 8:09 pm

These instructions are based on the instructions from the ubuntu help website - https://help.ubuntu.com/community/Grub2 ... m%20LiveCD
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 -
Code: Select all
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
Code: Select all
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
Code: Select all
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.
PC - Gigabyte 970A-DS3 AMD 970 , AMD Bulldozer FX-4 4170, Kingston HyperX Blu 4GB 1600MHz C9, Zotac Geforce 8800GT AMP Edition, OS's = Linux / WIN7
User avatar
cra1g321
Level 4
Level 4
 
Posts: 487
Joined: Fri Mar 19, 2010 1:19 pm
Location: Northern Ireland

Linux Mint is funded by ads and donations.
 

Re: Reinstalling Grub2 using LiveCD

Postby dawgdoc on Sun Oct 24, 2010 8:51 pm

Great job Craig.

Now we can point all the people who do not search the forums to here.
Image

SYSTEM: Compaq Presario CQ62 Dual-Boot: Mint 13 Gnome x32 PAE, LMDE
READING: The Autobiography of Benvenuto Cellini
User avatar
dawgdoc
Level 9
Level 9
 
Posts: 2690
Joined: Mon Oct 05, 2009 12:53 am
Location: Kentucky, USA the land of Mint Juleps

Re: Reinstalling Grub2 using LiveCD

Postby tdockery97 on Sun Oct 24, 2010 9:49 pm

I think the post should be stickied!
Image

HP Pavilion 17 Notebook, 8GB DDR3, 2.5GHZ A10-APU, Radeon HD 8650G
Registered Linux User #520972
User avatar
tdockery97
Level 13
Level 13
 
Posts: 4849
Joined: Sun Jan 10, 2010 8:54 am
Location: Salem, Oregon

Re: Reinstalling Grub2 using LiveCD

Postby caf4926 on Mon Oct 25, 2010 12:00 am

Nice work
Anyone that's interested can also see this:
https://wiki.ubuntu.com/Grub2#Recover%2 ... a%20LiveCD
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1778
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: Reinstalling Grub2 using LiveCD

Postby cra1g321 on Mon Oct 25, 2010 7:21 am

Thnx 4 the comments guys. Let me know of any improvements i could make to it.

Do you think i should post it on the community site ??
PC - Gigabyte 970A-DS3 AMD 970 , AMD Bulldozer FX-4 4170, Kingston HyperX Blu 4GB 1600MHz C9, Zotac Geforce 8800GT AMP Edition, OS's = Linux / WIN7
User avatar
cra1g321
Level 4
Level 4
 
Posts: 487
Joined: Fri Mar 19, 2010 1:19 pm
Location: Northern Ireland

Re: Reinstalling Grub2 using LiveCD

Postby AirValor on Mon Oct 25, 2010 4:48 pm

cra1g321 wrote:Thnx 4 the comments guys. Let me know of any improvements i could make to it.

Do you think i should post it on the community site ??


Definitely do that!

However, I suggest for finding out what drives are you should run this in the terminal.
Code: Select all
sudo fdisk -l


Following with
Code: Select all
sudo mkdir /media/sda

*note put the correct number after sda of which sda has Linux as its system

Then you mount it with
Code: Select all
sudo mount /dev/sda /media/sda

*note put the correct number after sda of which sda has Linux as its system

After that you can reinstall grub to it.
Code: Select all
sudo grub-install --root-directory=/media/sda /dev/sda

*note put the correct number after sda of which sda has Linux as its system


This worked flawlessly for me, I will post screenies if I boot to Mint :)
User avatar
AirValor
Level 1
Level 1
 
Posts: 18
Joined: Fri Oct 22, 2010 11:02 am

Re: Reinstalling Grub2 using LiveCD

Postby Thinker on Tue Apr 24, 2012 4:58 am

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


This is the best tutorial for me atleast. Thanks a lot.
Whether you love or hate, you can't debate that Mint is far better than Ubuntu
Thinker
Level 1
Level 1
 
Posts: 11
Joined: Tue Apr 24, 2012 4:08 am
Location: Ludhiana, Punjab, India

Linux Mint is funded by ads and donations.
 

Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 17 guests