怎样修改使双系统为xp默认启动!!

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
头像
stefaniesun555
帖子: 54
注册时间: 2009-05-01 0:28

怎样修改使双系统为xp默认启动!!

#1

帖子 stefaniesun555 » 2009-11-01 9:38

首先谢谢smallapple!!让我找到了这个文件,已前一直认为在 menu.lst里面 ,没想到新的9.10改到grub.cfg了
现在不知到把下面的代码 怎么改才能让 XP为默认起动
我装的是 9.10的 ubuntu 和 xp !!
请帮我 看看 下面 这个 !

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 97b58c73-d959-46f9-8d43-fb3fc6d03d06
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 97b58c73-d959-46f9-8d43-fb3fc6d03d06
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=97b58c73-d959-46f9-8d43-fb3fc6d03d06 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 97b58c73-d959-46f9-8d43-fb3fc6d03d06
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=97b58c73-d959-46f9-8d43-fb3fc6d03d06 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 541012e11012c9be
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
头像
atealxt
帖子: 72
注册时间: 2008-11-26 16:52

Re: 怎样修改使双系统为xp默认启动!!

#2

帖子 atealxt » 2009-11-01 9:57

还没装9.10,看了一下代码感觉可以这么做

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 97b58c73-d959-46f9-8d43-fb3fc6d03d06
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root=(hd0,1)
search --no-floppy --fs-uuid --set 541012e11012c9be
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###


### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 97b58c73-d959-46f9-8d43-fb3fc6d03d06
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=97b58c73-d959-46f9-8d43-fb3fc6d03d06 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,9)
search --no-floppy --fs-uuid --set 97b58c73-d959-46f9-8d43-fb3fc6d03d06
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=97b58c73-d959-46f9-8d43-fb3fc6d03d06 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

PS:编辑前请备份原文件
头像
stefaniesun555
帖子: 54
注册时间: 2009-05-01 0:28

Re: 怎样修改使双系统为xp默认启动!!

#3

帖子 stefaniesun555 » 2009-11-01 10:03

恩恩 ,这个备份是只到的 ,只是 现在对 那些 命令 挺生 疏的 不知到 是否 为 :
sudo cp /boot/grub/grub.cfg /boot/grub/grub.cfg.bak
mckeyu
帖子: 289
注册时间: 2008-11-07 3:42

Re: 怎样修改使双系统为xp默认启动!!

#4

帖子 mckeyu » 2009-11-01 10:16

何必那么麻烦呢
新手直接用startupmanager
这个启动管理器在新立得里面有 :em05
头像
stefaniesun555
帖子: 54
注册时间: 2009-05-01 0:28

Re: 怎样修改使双系统为xp默认启动!!

#5

帖子 stefaniesun555 » 2009-11-01 10:29

mckeyu 写了:何必那么麻烦呢
新手直接用startupmanager
这个启动管理器在新立得里面有 :em05
那方便的话,这个怎么用呐?
ubuntu下这里的软件装了之后 连个影子都找不到!!
jkleo
帖子: 61
注册时间: 2009-10-26 22:57

Re: 怎样修改使双系统为xp默认启动!!

#6

帖子 jkleo » 2009-11-01 10:41

stefaniesun555 写了:
mckeyu 写了:何必那么麻烦呢
新手直接用startupmanager
这个启动管理器在新立得里面有 :em05
那方便的话,这个怎么用呐?
ubuntu下这里的软件装了之后 连个影子都找不到!!

sudo startupmanager
头像
stefaniesun555
帖子: 54
注册时间: 2009-05-01 0:28

Re: 怎样修改使双系统为xp默认启动!!

#7

帖子 stefaniesun555 » 2009-11-01 10:55

jkleo 写了:
stefaniesun555 写了:
mckeyu 写了:何必那么麻烦呢
新手直接用startupmanager
这个启动管理器在新立得里面有 :em05
那方便的话,这个怎么用呐?
ubuntu下这里的软件装了之后 连个影子都找不到!!

sudo startupmanager
恩恩 已经试了一下!!
和你说的一样 , 谢谢上面的 几位!!


不过还是想知道那个代码 怎么改 , 想多知道点儿!!
头像
czjl
帖子: 765
注册时间: 2008-07-28 10:02

Re: 怎样修改使双系统为xp默认启动!!

#8

帖子 czjl » 2009-11-01 11:01

根据你的情况,将set default="0" 中的值0,改为 2
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 怎样修改使双系统为xp默认启动!!

#9

帖子 smallapple » 2009-11-01 15:00

2L的方法可以。
default 改为 4 也行。
头像
daf3707
论坛版主
帖子: 12731
注册时间: 2007-06-13 15:57
来自: 在他乡

Re: 怎样修改使双系统为xp默认启动!!

#10

帖子 daf3707 » 2009-11-01 15:03

多看看小苹果的签名吧,这样改了之后如果更新内核又变了,
cr2121
帖子: 46
注册时间: 2009-04-25 9:24

Re: 怎样修改使双系统为xp默认启动!!

#11

帖子 cr2121 » 2009-11-01 16:00

楼主这个可以参考以下:
viewtopic.php?f=139&t=237149
他山之石,可以攻玉
史上最好用播放器http://tg.player.qq.com/cgi-bin/download?id=411533646
头像
HHHJustin
帖子: 3
注册时间: 2009-10-19 22:08

Re: 怎样修改使双系统为xp默认启动!!

#12

帖子 HHHJustin » 2009-11-03 10:25

2楼正解
ubuntu fans
帖子: 16
注册时间: 2007-03-19 13:27

Re: 怎样修改使双系统为xp默认启动!!

#13

帖子 ubuntu fans » 2009-11-04 7:06

终于找到答案了,谢谢 :em11
回复