方法一:
1.进入Ubuntu系统后打开终端
2.终端中输入以下命令
sudo gedit /boot/grub/grub.cfg
3.找到Windows的配置将其剪切到Ubuntu的前面
把下面
### BEGIN /etc/grub.d/30_os-prober ###
menuentry ‘Windows 7 (loader) (on /dev/sda1)‘ --class windows --class os $menuentry_id_option ‘osprober-chain-D4C4BF7AC4BF5E04‘ {
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 D4C4BF7AC4BF5E04
else
search --no-floppy --fs-uuid --set=root D4C4BF7AC4BF5E04
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 ###
拷贝到 ### BEGIN /etc/grub.d/10_linux ### de qianmian 之前
方法二:
1.终端中输入 sudo gedit /etc/default/grub
2.设置default-set=4