pgyang 发表于 2013-1-15 02:13:30

Ubuntu10.04和WINDOWS xp双系统启动顺序设置

虽然了很久的ubuntu,但是一直也没有用,今天终于想用了一用,结果一对问题,解决问题方法就用博客记下了
 
我装掉是双系统,分了20G给ubuntu,但是发现开机的grub菜单是默认ubuntu启动的,我毕竟用ubuntu比较少,还是xp比较多,所以就去网上找资料设置了一下
 

具体做法如下:
1.应用程序---》附件---》终端,输入
sudo chmod   777   /boot/grub/grub.cfg
 
2.输入密码:输入密码,直接回车,然后输入
sudo gedit /boot/grub/grub.cfg
 

3.编辑grub.cfg
 

 
### 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 ##刚才抄下的UUID放这里!
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 已经为第一启动项了。
 
 
 
 
 

 
页: [1]
查看完整版本: Ubuntu10.04和WINDOWS xp双系统启动顺序设置