lost and found ( for me ? )

Showing posts with label MBR. Show all posts
Showing posts with label MBR. Show all posts

overwrite grub installed in MBR

I have installed two Linux distributions in my laptop , one is Linux Mint 12 and the other is Fedora 16.

Linux Mint’s grub has been installed in MBR ( /dev/sda )
Fedora’s grub has been installed in /dev/sda1 ( = /boot )

overwrite MBR’s grub with Fedora’s.

on Fedora , issue grub2-install

Fedora# grub2-install /dev/sda

After issuing grub2-install , Fefora’s grub will be installed in MBR ( in this case , /dev/sda )
You could boot both Fedora and Linux Mint after overwriting MBR’s grub with Fedora’s.

grub : MBRに再インストールする方法

-  / と /boot が同じパーティションの場合

# grub-install /dev/hda ( /dev/sda などのハードディスク名 )

-  / と /boot が異なるパーティションの場合

# grub-install --root-directory=/ /dev/hda

今回は、/ と /boot を同じパーティションにしているので、

[root@arizona ~]# grub-install /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(hd0)     /dev/sda
[root@arizona ~]# echo $?
0
[root@arizona ~]#

get things done!