---
title: "Ubuntu9.10以上版本和Windows xp双系统启动顺序设置"
author: "yarin"
date: "2010-06-06T03:07:39Z"
tags: []
categories: ["操作系统"]
slug: "ubuntu9-10-windows-xp"
draft: false
lastmod: "2010-06-06T03:08:26Z"
id: 684987
url: "https://yarin.iteye.com/blog/684987"
---

由于从Ubuntu9.10开始使用grub2来引导 系统，新版grub2的引导配置文件就不再是menu.lst了，而是/boot/grub/grub.cfg文件，这与旧版本不同了，而且为了安全起 见，该文件默认为“只读”属性，因此在修改启动菜单之前你必须先将其文件属性改为“可读写”后方可修改文件内容。

具体做法如下：

1.应用程序---》附件---》终端，输入

```
sudo chmod   777   /boot/grub/grub.cfg
```

2.输入密码：输入密码，直接回车，然后输入

```
sudo gedit /boot/grub/grub.cfg
```

3.编辑grub.cfg

方法一：  
将

```
set default="0" 
```

改为

```
set default="4" 
```

方法二：  
将

```
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows XP (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set B2CC3F5FCC3F1CD3 
chainloader +1
}

### END /etc/grub.d/30_os-prober ###
```

剪切到：

```
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,8)'
search --no-floppy --fs-uuid --set 27cc65d6-0513-4f68-8c42-901f871052ae
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=27cc65d6-0513-4f68-8c42-901f871052ae ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,8)'
search --no-floppy --fs-uuid --set 27cc65d6-0513-4f68-8c42-901f871052ae
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=27cc65d6-0513-4f68-8c42-901f871052ae ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,8)'
search --no-floppy --fs-uuid --set 27cc65d6-0513-4f68-8c42-901f871052ae
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,8)'
search --no-floppy --fs-uuid --set 27cc65d6-0513-4f68-8c42-901f871052ae
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
```

4.重新启动看看WINDOWS XP 已经为第一启动项了。