use*_*578 5 boot grub2 dual-boot windows-7
我的电脑装有 Windows 7。后来我擦除了磁盘并清理了安装的 Debian。后来,我需要 Windows,所以再次进行了 Windows 7 全新安装,然后安装了 Debian。然后,我安装了最新的 Ubuntu 并在此过程中删除了旧的 Debian。
但是当我现在启动计算机时,(旧的,debian)启动菜单显示:
Windows 7
Debian Linux
Run Code Online (Sandbox Code Playgroud)
如果我选择 Windows 7,我启动到 W7,没有问题,但是当我选择 Debian 时,计算机显示最新的 ubuntu 引导加载程序:
Ubuntu
Ubuntu with options
*some other option*
windows 7
Run Code Online (Sandbox Code Playgroud)
如果我在这里选择 Windows 7,我将再次进入第一个引导加载程序屏幕,而不是引导到 Windows 7。
Gparted 的截图:
我现在应该怎么做,删除旧的 Grub 并让最新的 Grub 加载程序启动到 windows7?
您已安装正确的 GRUB 引导加载程序!- 您只能看到旧的 Windows 启动菜单条目,因为安装 Ubuntu 后 Windows BCD 存储尚未修改。
启动 Windows 并以管理员身份打开命令提示符并执行:
bcdedit /enum all /v
Run Code Online (Sandbox Code Playgroud)
搜索 debian 启动项菜单...复制标识符并执行:
bcdedit /set {*} description "Ubuntu"
Run Code Online (Sandbox Code Playgroud)
将 * 替换为复制的标识符。
更新(包含针对 2015 年 12 月 8 日提供的新信息的说明)
首先重新安装 Windows 引导加载程序。
从 Windows 安装介质启动,然后在立即安装屏幕上选择修复您的计算机。
选择命令提示符并执行:
bootrec.exe /fixmbr
bootrec.exe /fixboot
bootrec.exe /rebuildbcd
Run Code Online (Sandbox Code Playgroud)
然后重新安装“Ubuntu”引导加载程序。
从 Ubuntu 安装介质启动并选择尝试 Ubuntu,而不在桌面上安装...
打开终端并执行:
sudo mount /dev/sda1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda
Run Code Online (Sandbox Code Playgroud)
注意:sda=磁盘| sda1 = Ubuntu系统分区(取自你问题中的屏幕截图)