开机选择winxp on /dev/sda1还是直接进入grub,进不了XP,求救各位大侠。。。。

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
zhihong
帖子: 7
注册时间: 2010-11-16 11:45
送出感谢: 0
接收感谢: 0

开机选择winxp on /dev/sda1还是直接进入grub,进不了XP,求救各位大侠。。。。

#1

帖子 zhihong » 2010-11-16 11:47

Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Windows is installed in the MBR of /dev/sda

sda1: _________________________________________________________________________

File system: ntfs
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda1 and
looks at sector 301049872 of the same hard drive for
core.img, but core.img can not be found at this
location. No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /boot.ini /grldr /ntldr /NTDETECT.COM

sda2: _________________________________________________________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System:
Boot files/dirs:

sda6: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda6 starts
at sector 63.
Operating System:
Boot files/dirs:

sda7: _________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

sda8: _________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 63 31,455,269 31,455,207 7 HPFS/NTFS
/dev/sda2 31,455,331 312,576,704 281,121,374 f W95 Ext d (LBA)
/dev/sda5 31,455,333 115,346,699 83,891,367 7 HPFS/NTFS
/dev/sda6 115,346,763 271,369,979 156,023,217 7 HPFS/NTFS
/dev/sda7 271,370,240 279,369,727 7,999,488 82 Linux swap / Solaris
/dev/sda8 279,371,776 312,580,095 33,208,320 83 Linux

the logical partition /dev/sda8 is not contained in the extended partition /dev/sda2

blkid -c /dev/null: ____________________________________________________________

Device UUID TYPE LABEL

/dev/sda1 94788FA2788F822A ntfs Win XP
/dev/sda2: PTTYPE="dos"
/dev/sda5 2614084B14082083 ntfs 应用程序
/dev/sda6 3CFCAB83FCAB35D4 ntfs 音乐娱乐
/dev/sda7 bf6966a7-78f2-4390-85b8-405f9a03d206 swap
/dev/sda8 59d61701-dc13-4a2a-98ac-0fb9e03708e6 ext4
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sda8 / ext4 (rw,errors=remount-ro,commit=0)
/dev/sda1 /media/Win XP fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)


================================ sda1/boot.ini: ================================

;

;Warning: Boot.ini is used on Windows XP and earlier operating systems.

;Warning: Use BCDEDIT.exe to modify Windows Vista boot options.

;

[boot loader]

timeout=3

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

c:\ieldr="Chameleon"
=========================== sda8/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="4"
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 part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 59d61701-dc13-4a2a-98ac-0fb9e03708e6
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 59d61701-dc13-4a2a-98ac-0fb9e03708e6
set locale_dir=($root)/boot/grub/locale
set lang=zh
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 59d61701-dc13-4a2a-98ac-0fb9e03708e6
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=59d61701-dc13-4a2a-98ac-0fb9e03708e6 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 59d61701-dc13-4a2a-98ac-0fb9e03708e6
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=59d61701-dc13-4a2a-98ac-0fb9e03708e6 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### 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='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 59d61701-dc13-4a2a-98ac-0fb9e03708e6
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set 59d61701-dc13-4a2a-98ac-0fb9e03708e6
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 (hd0 /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 94788fa2788f822a
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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

=============================== sda8/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda8 during installation
UUID=59d61701-dc13-4a2a-98ac-0fb9e03708e6 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda7 during installation
UUID=bf6966a7-78f2-4390-85b8-405f9a03d206 none swap sw 0 0

=================== sda8: Location of files loaded by Grub: ===================


154.1GB: boot/grub/core.img
152.4GB: boot/grub/grub.cfg
144.2GB: boot/initrd.img-2.6.35-22-generic
154.1GB: boot/vmlinuz-2.6.35-22-generic
144.2GB: initrd.img
154.1GB: vmlinuz
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53
送出感谢: 0
接收感谢: 108 次

Re: 开机选择winxp on /dev/sda1还是直接进入grub,进不了XP,求救各位大侠。。。。

#2

帖子 onshoestring » 2010-11-16 12:54

/etc/grub.d/40_custom加入如下内容:
menuentry "Grub for Dos" {
search --set -f /grub.exe
linux /grub.exe
}

代码: 全选

sudo update-grub
下载grub4dos, http://nufans.net/grub4dos/current_release/grub4dos-0.4.4-2009-10-16.zip,把grub4dos文件grub.exe复制一份到c:\

c:\建立一menu.lst文件,内容如下。
default 0
timeout 0
title WindowsXp
chainloader (hd0,0)/ntldr
boot
头像
ptptptptptpt
帖子: 3711
注册时间: 2006-09-19 18:16
送出感谢: 0
接收感谢: 1 次

Re: 开机选择winxp on /dev/sda1还是直接进入grub,进不了XP,求救各位大侠。。。。

#3

帖子 ptptptptptpt » 2010-11-16 12:55

grub 下按 c键,进入命令行,手动输入

代码: 全选

chainloader   (hd0,msdos1)+1
boot
试试
zhihong
帖子: 7
注册时间: 2010-11-16 11:45
送出感谢: 0
接收感谢: 0

Re: 开机选择winxp on /dev/sda1还是直接进入grub,进不了XP,求救各位大侠。。。。

#4

帖子 zhihong » 2010-11-16 14:36

我按2楼朋友的办法还是不行,启动不了出现提示:
Booting windowsXP
chainloader (hd0,0)/ntldr
Error 15:File not found
press any key to continue.......
头像
mjp123
帖子: 685
注册时间: 2009-04-09 15:06
送出感谢: 1 次
接收感谢: 12 次

Re: 开机选择winxp on /dev/sda1还是直接进入grub,进不了XP,求救各位大侠。。。。

#5

帖子 mjp123 » 2010-11-16 16:29

从别的机子拷一个ntldr到c盘下试试
zhihong
帖子: 7
注册时间: 2010-11-16 11:45
送出感谢: 0
接收感谢: 0

Re: 开机选择winxp on /dev/sda1还是直接进入grub,进不了XP,求救各位大侠。。。。

#6

帖子 zhihong » 2010-11-17 21:44

问题已解决,谢谢各位大侠。
回复

回到 “启动和引导”