Documentation du Dr FRAPPE

Ce wiki regroupe les résultats de mes expériences en informatique accumulés au cours de mes recherches sur le net.

Dans la mesure du possible, j'ai cité mes sources ; il en manque certainement… :-)

Reinstaller grub2 depuis un LiveCD

These instructions are based on the instructions from the ubuntu help website - 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.

0.1. Pré-requis


0.2. Première étape

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.

0.3. Autres étapes

0.3.1. Deuxième étape

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.

0.3.2. Troisième étape

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”.

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.

0.4. Conclusion

sudo mount /dev/sda1 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.

0.5. Problèmes connus

0.6. Voir aussi

Contributeurs principaux : IDENTIFIANT.