用LIVE安装盘进入系统(ubuntu的也行),然后cd切换到 / 目录,再打上
fdisk -l,看下的硬盘类型。我的如下
代码:
[email protected]:/home/cncjm# cd
[email protected]:~# fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf52e900a
Device Boot Start End Blocks Id System
[color=#FF0000]/dev/sda[/color]1 * 63 52436159 26218048+ 7 HPFS/NTFS/exFAT
/dev/sda2 52436221 312576704 130070242 f W95 Ext'd (LBA)
/dev/sda5 52436223 140536619 44050198+ 7 HPFS/NTFS/exFAT
/dev/sda6 140537856 140732415 97280 83 Linux
/dev/sda7 140734464 160264191 9764864 83 Linux
/dev/sda8 160266240 226547711 33140736 83 Linux
/dev/sda9 226548693 232830044 3140676 7 HPFS/NTFS/exFAT
/dev/sda10 232830108 236926619 2048256 82 Linux swap / Solaris
/dev/sda11 236926683 312576704 37825011 7 HPFS/NTFS/exFAT
红色的看到没,/dev/sda ,你的可能不是跟我同一类型的,自己看看,然后打上grub-install +你的硬盘类型,我的是dev/sda,所以我就打上
grub-install /dev/sda,结果显示,
代码:
[email protected]:~# grub-install /dev/sda
Installation finished. No error reported.
然后再继续打入
update-grub大概显示这样子
代码:
[email protected]:~# grub-install /dev/sda
Installation finished. No error reported.
[email protected]:~# update-grub
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.1.0-1-amd64
Found initrd image: /boot/initrd.img-3.1.0-1-amd64
Found memtest86+ image: /memtest86+.bin
Found memtest86+ multiboot image: /memtest86+_multiboot.bin
Found Microsoft Windows XP Professional on /dev/sda1
grep: input file ‘/boot/grub/grub.cfg.new’ is also the output
done
重启,选择你要的系统进入,你的WIN7和debian又回来了。
