grub 修复

mm@mm-desktop:~$ sudo -i (获取root权限)
[sudo] password for mm:
root@mm-desktop:~# fdisk -l (查看ubuntu所在分区)

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd012d012

Device Boot Start End Blocks Id System
/dev/sda1 * 1 510 4096543+ 7 HPFS/NTFS
/dev/sda2 1786 38913 298230629+ f W95 Ext'd (LBA)
/dev/sda3 511 1785 10240000 83 Linux (在这里,sda3。你的可能是2,3,4,5,6.。。自己改下)
/dev/sda5 1786 14583 102799892 b W95 FAT32
/dev/sda6 14584 23803 74059600 7 HPFS/NTFS
/dev/sda7 23804 38913 121371043+ 7 HPFS/NTFS

Partition table entries are not in disk order
Note: sector size is 2048 (not 512)

Disk /dev/sdb: 3946 MB, 3946838016 bytes
64 heads, 32 sectors/track, 940 cylinders
Units = cylinders of 2048 * 2048 = 4194304 bytes
Sector size (logical/physical): 2048 bytes / 2048 bytes
I/O size (minimum/optimal): 2048 bytes / 2048 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 941 3854326 b W95 FAT32
Partition 1 does not start on physical sector boundary.
root@mm-desktop:~# mount /dev/sda3 /mnt (把sda3挂载到/mnt)
root@mm-desktop:~# grub-install --root-directory=/mnt/ /dev/sda (安装grub2到主硬盘)


你可能感兴趣的:(grub)