Saturday, July 04, 2009

reinstall grub

when grub is broken, you can not log any host system(or just windows). here are the ways to boot linux system and reinstall grub:

1. by system rescue rom disc:
insert disc to ROM and boot from that, then chroot to host system, then type grub-install /dev/sda command..
2. by windows
log into windows if you can and setup a windows version grub, then reboot to log into linux, then type grub-install /dev/sda command..
3. by a usb stick or usb hard disk..
insert the usb device into  another linux computer.
type the command:
grup-install /dev/sda --root-directory=/media/disk
here /dev/sda means the usb device
--root-directory= specify the mount point of the usb device's partition.
then remove the usb device and insert it to the computer who's grub need reinstall. the boot from the usb device. start host's linux with grub command manually. the type the command to reinstall grub:
grup-install /dev/sda


No comments: