easybcd2.2手贱删除了windows7启动项,现在只ubuntu14.04了,求助恢复办法

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
awsd221
帖子: 3
注册时间: 2015-05-21 22:43
系统: windows7

easybcd2.2手贱删除了windows7启动项,现在只ubuntu14.04了,求助恢复办法

#1

帖子 awsd221 » 2015-05-22 7:10

萌新一枚,用的easybcd2.2在windows7下安装ubuntu14.04,主要参考的是这篇文章http://www.linuxidc.com/Linux/2014-04/100369.htm安装成功之后

第一次重启直接进入了win7,然后我就利用easybcd2.2添加引导项,选择的是 Grub(legacy)而不是Grub2,并按Remove删除安装时改的easybcd的menu.lst文件,并手动删除当初复制到c盘的vmlinuz,initrd.lz和系统的iso文件。

第二次重启显示的引导界面是两个选项,第一个是windows7默认,第二个是ubuntu
然后我闲着没事,按照帖子的最后额外提示登陆ubunutu打开终端输入命令sudo gedit /etc/default/grub并修改GRUB_TIMEOUT="10"然后在终端中输入sudo update-grub。

第三次重启在windows7下,主要是利用bcd的edit boot menu按钮修改默认开机选项,因为拿不准添加删除了几次ubuntu的引导项。目前回想起来,应该是当时关机重启时点快了,手贱删除了开机引导项中的默认windows7开机项。

再次重启首先显示 windows启动管理器界面,但是两个都是ubuntu的选项,随便点一个进去,进入ubuntu的引导界面,包含ubuntu和win7在内的五个启动项,但是点击win7的启动项跳转之windows的启动管理器界面,显示只有两个ubuntu选项,不能进入win7系统,成了死循环了。。。。目前只能在ubuntu上正常运作。

万分期待并感谢大神们的回复~~~


这是目前的grub命令结果
[sudo] password for wzy221:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.16.0-30-generic
Found initrd image: /boot/initrd.img-3.16.0-30-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done

目前登陆引导界面是两个选项,都是ubuntu
两个点击进去都一样,会出现五个选项,
1 ubuntu
2 ubuntu 高级选项 a ubuntu,linux3.16.0-30-gen
b ubuntu, with linux 3.16.0-30-generic(recoverymode)
其他三条和后grub命令中的三条一一对应,点击第一条能正常登陆进ubuntu系统,但是点击第5条登陆win7会自动跳转到引导界面两个ubuntu选项上去。
grub.cfg里关于windows7的代码
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-ACF210E9F210B992' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 ACF210E9F210B992
else
search --no-floppy --fs-uuid --set=root ACF210E9F210B992
fi
parttool ${root} hidden-
chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###
头像
wowoto
帖子: 3050
注册时间: 2009-04-11 12:17
系统: windows7

Re: easybcd2.2手贱删除了windows7启动项,现在只ubuntu14.04了,求助恢复办法

#2

帖子 wowoto » 2015-05-30 1:50

重装最快了 :em03 :em11
wowoto>ubuntu8.04>ubuntu9.04>Archlinux>FreeBSD8.0>Archlinux & end here.
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: easybcd2.2手贱删除了windows7启动项,现在只ubuntu14.04了,求助恢复办法

#3

帖子 poloshiao » 2015-05-30 6:30

grub.cfg里关于windows7的代码
set root='hd0,msdos1'
可能原因之一
你的 Windows 7 的開機檔案 Bootmgr 不見了
重建 Windows 7 的開機檔案 Bootmgr 看看
https://support.microsoft.com/en-us/kb/ ... wsignin1.0
注意 不是重建 Windows 的 開機引導 boot loader 這樣會覆蓋掉 Ubuntu 的 Grub 2
awsd221
帖子: 3
注册时间: 2015-05-21 22:43
系统: windows7

Re: easybcd2.2手贱删除了windows7启动项,现在只ubuntu14.04了,求助恢复办法

#4

帖子 awsd221 » 2015-06-02 14:13

pe ok
thanks a lot~
回复