How to re-install grub 2 from a live CD
Without the need to chroot.
1) boot your Ubuntu karmic koala or later 'desktop 'live CD, or anotherkarmic installation such as an operating system in a USB device orwhateveryou have to use as a rescue disk.
Tip: it will make your Ubuntu life alot easier if you take a few minutes to set a nice user-freindly filesystem label in your Linux file systems,
How to Set File System labels with gparted.
2) the operating system you want to fix needs to be mounted.
Just go 'places' --> 'removable media 'or just 'places' and look under 'computer' For the disk or partition you want to mount and click on it.-Also see
Click-Icon mounting.
Youshoshould see an icon for it on your desktop, but what you may not see isthe 'mount point', which will normally be located in your/mediadirectory. we will need to know the file path and name of the mount point.
3) find the name of the mount point,
Thefile path that is returned from theabove command will be needed for making up the next command. the nameof the mount point might be a file system label or UUID number. formy example I'll just usethe word 'disk' for short.
4) run the grub-setup command, inserting the-D option and specifying thepath to the/boot/GRUB directory of the operating system you're re tryingto fix,
Sudo grub-setup-D/Media/Disk/boot/GRUB/dev/SDA |
The-D option tells grub to use files from the specified directory.
Please substitute the word 'disk' with the name of your own mount point as found in step 3)
The '/dev/SDA' part tells grub-setup to install grub to MBR in the first hard disk, which is called'/dev/SDA '.
You may use the same command to install grub in any other disks in yourcomputer by replacing the/dev/SDA part of the command with/dev/SDB or/dev/SDC and so on.
-Ifthe command fails with feedback about not being able to access adevice. map file, you might need to try again and specify the exactdevice. Map File to use with the-M option.
Sudo grub-setup-D/Media/Disk/boot/grub-M/Media/Disk/boot/GRUB/device. MAP/dev/SDA |
The-M option tells grub what device. map you want to use.