Ubuntu 和 XP 双系统启动顺序

Ubuntu 和 XP 双系统如何修改启动顺序

  • 将电脑启动进入 Ubuntu 系统下,
  • ctrl + alt + t 调出终端,
  • 输入: sudo gedit /boot/grub/grub.cfg
  • 输入密码,此时会打开 grub.cfg 文件,并修改

方法1 修改 default

找到 default 0,修改为4,保存即可,重启电脑时系统会自动选择XP启动项;

1
2
3
set default="0"
改为:
set default="4"

方法2 修改启动列表

在打开的 grub.cfg 文件中找到如下 win xp 的内容

1
2
3
4
5
6
7
8
9
10
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 1460AE9B60AE82DA
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

将该段(包括 BEGIN END)剪切放在

1
2
3
4
5
6
7
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
end if
### END /etc/grub.d/05_debian_theme ###

该段落下面,保存重启电脑,xp选项就会出现在第一行

本文标题:Ubuntu 和 XP 双系统启动顺序

文章作者:史彦超

发布时间:2016年10月11日 - 22:10

最后更新:2021年07月20日 - 16:07

原始链接:https://doingself.github.io/2016/10/11/2016-10-11-Ubuntu%E5%92%8CXP%E5%8F%8C%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E9%A1%BA%E5%BA%8F/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。

Donate comment here