Motivation: Dual-system grub repair MBR
Prerequisites: Ubuntu 9.04. Other System methods are similar.
Applicable: Windows and Linux dual systems are installed on different partitions, And the Linux boot program grub is installed on MBR by default.
Problem description: Linux cannot be started because grub in MBR is damaged after Windows is reinstalled.
Implementation: 1. Insert the Linux installation CD, select the first CD for trial, and enter the Linux Default User Name Ubuntu password is blank.
2. Start the terminal command system, enter the command sudo grub (Press ENTER), and enter the grub command environment.
3. Enter two commands in the following format:
Root Space (hdx, Y)
Setup space (hdx)
The first command indicates the partition of the root file system in Linux. X indicates the number of the hard disk in the nth part,
Numbers are from 0, 1, 2... usually a hard disk is attached to the computer. Therefore, hd0 is used here; y indicates the partition where the disk is located.
When Linux is started, the information displayed on the first black screen is what we need. You can also enter commands in the terminal.
View sudo fdisk-l
The second command installs grub on the hard disk MBR (primary boot sector ).
4. Note that there is a space between the command and the parameter. Otherwise, an error message is displayed.
Effect: very simple !!