在ubuntu11.04下安装XP,有选项XP就是进不去,原来是安装WIN7的64位的,但是发现很多开发环境在64位的WIN7下搭不起来,想装回XP,可是经过(sudo update-grub)有XP选项,会蓝屏一下然后重启。
下面是分区情况:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
224 heads, 63 sectors/track, 22150 cylinders
Units = cylinders of 14112 * 512 = 7225344 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe0aee0ae
Device Boot Start End Blocks Id System
/dev/sda1 * 15 4354 30617600 7 HPFS/NTFS
/dev/sda2 4354 17416 92160000 7 HPFS/NTFS
/dev/sda3 17416 20318 20480000 7 HPFS/NTFS
/dev/sda4 20318 22150 12928001 5 Extended
/dev/sda5 20318 21984 11756544 83 Linux
/dev/sda6 21985 22150 1170432 82 Linux swap / Solaris
查看/boot/grub/grub.cfg文件:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 17f89e84-0731-4ae3-9cae-ea3d24270eb2
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 17f89e84-0731-4ae3-9cae-ea3d24270eb2
set locale_dir=($root)/boot/grub/locale
set lang=zh_CN
insmod gettext
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/light-gray
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu,Linux 2.6.38-8-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 17f89e84-0731-4ae3-9cae-ea3d24270eb2
linux /boot/vmlinuz-2.6.38-8-generic-pae root=UUID=17f89e84-0731-4ae3-9cae-ea3d24270eb2 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic-pae
}
menuentry 'Ubuntu,Linux 2.6.38-8-generic-pae (恢复模式)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 17f89e84-0731-4ae3-9cae-ea3d24270eb2
echo 'Loading Linux 2.6.38-8-generic-pae ...'
linux /boot/vmlinuz-2.6.38-8-generic-pae root=UUID=17f89e84-0731-4ae3-9cae-ea3d24270eb2 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-generic-pae
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 17f89e84-0731-4ae3-9cae-ea3d24270eb2
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 17f89e84-0731-4ae3-9cae-ea3d24270eb2
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)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 025CFD0F5CFCFDEB
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.
# menuentry "Windows XP" {
# set root=(hd0,1)
# ntldr /ntldr
# boot
# }
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
请问这是怎么回事?如何解决?谢谢!
求助,在ubuntu11.04下安装XP,有选项XP就是进不去
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 9
- 注册时间: 2008-12-12 16:37
- blambin
- 帖子: 283
- 注册时间: 2009-09-22 17:00
- 系统: arch , win10
- 联系:
-
- 帖子: 9
- 注册时间: 2008-12-12 16:37
Re: 求助,在ubuntu11.04下安装XP,有选项XP就是进不去
我在PE下用GHOST安装的啊
-
- 帖子: 2
- 注册时间: 2011-05-28 23:32
Re: 求助,在ubuntu11.04下安装XP,有选项XP就是进不去
用命令sudo gedit /boot/grub/grub.cfg
修改如下:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7" {
set root=(hd0,1)
ntldr /bootmgr
boot
}
### END /etc/grub.d/30_os-prober ###
修改如下:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7" {
set root=(hd0,1)
ntldr /bootmgr
boot
}
### END /etc/grub.d/30_os-prober ###
-
- 帖子: 2
- 注册时间: 2011-05-28 23:32
Re: 求助,在ubuntu11.04下安装XP,有选项XP就是进不去
用命令sudo gedit /boot/grub/grub.cfg
修改如下:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows XP" {
set root=(hd0,1)
ntldr /ntldr
boot
}
### END /etc/grub.d/30_os-prober ###
修改如下:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows XP" {
set root=(hd0,1)
ntldr /ntldr
boot
}
### END /etc/grub.d/30_os-prober ###
-
- 帖子: 9
- 注册时间: 2008-12-12 16:37
Re: 求助,在ubuntu11.04下安装XP,有选项XP就是进不去
谢谢5楼,用上面的命令已经可以进入XP了,XP也可以正常使用了,longsooooon 写了:用命令sudo gedit /boot/grub/grub.cfg
修改如下:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows XP" {
set root=(hd0,1)
ntldr /ntldr
boot
}
### END /etc/grub.d/30_os-prober ###
但是运行这个命令:sudo update-grub会有下面的提示:
/etc/grub.d/30_os-prober: 263: Syntax error: "(" unexpected (expecting "done")
-
- 帖子: 9
- 注册时间: 2008-12-12 16:37
Re: 求助,在ubuntu11.04下安装XP,有选项XP就是进不去
XP里的boot.ini文件内容:
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect