我在 1 个硬盘上安装了 windows XP Professional,在我的第二个硬盘上安装了 Ubuntu 10.10。启动时计算机完全跳过 grub 菜单并直接启动到 10.10。
我尝试在安装 Windows 硬盘驱动器的情况下运行 os-prober,然后更新 grub,但它没有用。
有任何想法吗?
我已经更改了引导顺序,以便首先使用带有 xp 的 HDD,但是计算机仍然引导到 linux。
我尝试运行 grub-install /dev/sda 并得到了这个
/usr/sbin/grub-setup: warn: Sector 32 is already in use by FlexNet; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track..
/usr/sbin/grub-setup: warn: Sector 33 is already in use by FlexNet; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track..
Installation finished. No error reported
我使用磁盘实用程序进行了检查,我的 xp 硬盘驱动器的代码是 sdb,所以我运行了 camand grub-install /dev/sdb shich 给了我这个
Installation finished. No error reported.
所以我重新启动但它仍然没有工作。
还有其他想法吗?
附加信息
gedit /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 part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
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,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
set locale_dir=($root)/boot/grub/locale
set lang=en
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-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro quiet splash
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
echo 'Loading Linux 2.6.35-28-generic ...'
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-28-generic
}
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,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c 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,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c 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,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###
须藤fdisk -l:
Disk /dev/sda: 80.1 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008a483
Device Boot Start End Blocks Id System
/dev/sda1 * 1 9352 75112448 83 Linux
/dev/sda2 9352 9734 3068929 5 Extended
/dev/sda5 9352 9734 3068928 82 Linux swap / Solaris
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc5d6c5d6
Device Boot Start End Blocks Id System
/dev/sdb1 1 60800 488375968+ 7 HPFS/NTFS
须藤 blkid
/dev/sda1: UUID="d682c9bd-dd89-4827-9802-a1f921ebe21c" TYPE="ext4"
/dev/sda5: UUID="09e9c2cb-d903-4f0b-a181-536951845231" TYPE="swap"
/dev/sdb1: UUID="B21844EB1844AFE1" TYPE="ntfs"
sudo os-prober
(没有什么)
Boot Info Script 0.55 dated February 15th, 2010
============================= Boot Info Summary: ==============================
=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #1 for (,msdos1)/boot/grub.
=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
partition #1 for (,msdos1)/boot/grub.
sda1: _________________________________________________________________________
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
sda2: _________________________________________________________________________
File system: Extended Partition
Boot sector type: Unknown
Boot sector info:
sda5: _________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sdb1: _________________________________________________________________________
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs:
=========================== Drive/Partition Info: =============================
Drive: sda ___________________ _____________________________________________________
Disk /dev/sda: 80.1 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders, total 156368016 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 * 2,048 150,226,943 150,224,896 83 Linux
/dev/sda2 150,228,990 156,366,847 6,137,858 5 Extended
/dev/sda5 150,228,992 156,366,847 6,137,856 82 Linux swap / Solaris
Drive: sdb ___________________ _____________________________________________________
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start End Size Id System
/dev/sdb1 * 63 976,751,999 976,751,937 7 HPFS/NTFS
blkid -c /dev/null: ____________________________________________________________
Device UUID TYPE LABEL
/dev/sda1 d682c9bd-dd89-4827-9802-a1f921ebe21c ext4
/dev/sda2: PTTYPE="dos"
/dev/sda5 09e9c2cb-d903-4f0b-a181-536951845231 swap
/dev/sda: PTTYPE="dos"
/dev/sdb1 B21844EB1844AFE1 ntfs
/dev/sdb: PTTYPE="dos"
============================ "mount | grep ^/dev output: ===========================
Device Mount_Point Type Options
/dev/sda1 / ext4 (rw,errors=remount-ro,commit=0)
=========================== sda1/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 part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
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,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
set locale_dir=($root)/boot/grub/locale
set lang=en
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-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro quiet splash
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
echo 'Loading Linux 2.6.35-28-generic ...'
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-28-generic
}
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,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c 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,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d682c9bd-dd89-4827-9802-a1f921ebe21c 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,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d682c9bd-dd89-4827-9802-a1f921ebe21c
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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=(hd1,1)
chainloader (hd1,1)+1
}
### 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 ###
=============================== sda1/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
/dev/sda1 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=09e9c2cb-d903-4f0b-a181-536951845231 none swap sw 0 0
=================== sda1: Location of files loaded by Grub: ===================
51.7GB: boot/grub/core.img
58.5GB: boot/grub/grub.cfg
1.2GB: boot/initrd.img-2.6.35-22-generic
1.3GB: boot/initrd.img-2.6.35-28-generic
58.2GB: boot/vmlinuz-2.6.35-22-generic
51.7GB: boot/vmlinuz-2.6.35-28-generic
1.3GB: initrd.img
1.2GB: initrd.img.old
51.7GB: vmlinuz
58.2GB: vmlinuz.old
=========================== Unknown MBRs/Boot Sectors/etc =======================
Unknown BootLoader on sda2
00000000 d9 ed 13 ab ff a8 33 8c 01 b2 47 99 e1 4a b1 f1 |......3...G..J..|
00000010 69 5f a7 29 a4 1a 03 9e 31 b9 45 02 71 e6 58 78 |i_.)....1.E.q.Xx|
00000020 3d f6 ee 7b 3e 33 1b 82 c6 7d cf 1a c8 e7 bc 2f |=..{>3...}...../|
00000030 b9 e1 70 75 cf 18 aa e7 d5 7e 3c f1 b4 e7 9e 3a |..pu.....~<....:|
00000040 55 38 f1 b4 ee 78 59 0b 5e f7 3c 4c 57 73 9c 2a |U8...xY.^.<LWs.*|
00000050 28 f1 19 ed 11 9c b2 19 e2 80 92 1c 7b 84 ee 0b |(...........{...|
00000060 e2 c0 ac af 0a 50 42 b9 cf 0c dc 2c 20 77 85 dc |.....PB...., w..|
00000070 8f 70 5f 7b 84 9b a1 f7 8c 2d ee 70 5c ae f7 39 |.p_{.....-.p\..9|
00000080 63 f7 09 8a ec 79 4c ed 9f cc ad 3c f8 1b 47 7d |c....yL....<..G}|
00000090 3f 97 d5 16 cb 29 45 38 25 61 36 08 de 10 93 0f |?....)E8%a6.....|
000000a0 95 4f ea 54 f9 89 ff f1 bf 9a cc bb fd b6 22 b1 |.O.T..........".|
000000b0 65 08 05 21 78 19 46 b0 24 7e fb de d4 b3 ba d6 |e..!x.F.$~......|
000000c0 ec 11 65 82 ee 10 1d 12 04 91 da 6d 67 47 ea 9b |..e........mgG..|
000000d0 6f b0 aa fb cb 67 10 64 86 e8 26 85 fb f9 50 77 |o....g.d..&...Pw|
000000e0 9d 13 9b 9e d9 11 f3 a1 50 1b 11 b7 93 79 9f ab |........P....y..|
000000f0 c1 b6 86 0f 35 ed d4 9f dc f8 db bd ed 45 3a 68 |....5........E:h|
00000100 54 68 4a 1d d1 fc b8 c9 72 b4 d7 7b 60 e7 39 2f |ThJ.....r..{`.9/|
00000110 2a 0a 4e 52 72 52 c6 e2 2a 55 6a 2a e1 82 40 71 |*.NRrR..*Uj*..@q|
00000120 11 11 e0 53 d6 ff 1b a9 c6 65 df 1e b7 15 6f a2 |...S.....e....o.|
00000130 15 02 a4 6d 19 b7 78 57 a6 ee 9e 36 08 7d 6f 7c |...m..xW...6.}o||
00000140 fd f7 7c d5 40 ff 0f c7 97 dc aa 00 ce 8b bb dc |..|.@...........|
00000150 e2 eb 1c 50 74 d8 14 cc 9a d6 5c a2 ab f2 67 f9 |...Pt.....\...g.|
00000160 58 ed 43 79 0e 78 7a 5c a6 f8 7b e8 05 4e 62 8a |X.Cy.xz\..{..Nb.|
00000170 0a 5f 22 ee a6 38 b9 e1 32 45 97 08 cc 75 66 c6 |._"..8..2E...uf.|
00000180 b3 a2 2d 89 a1 e9 95 21 28 53 fd dd be b1 b2 a2 |..-....!(S......|
00000190 78 3f a3 c9 3d e3 31 54 88 cf 78 0d e1 21 a8 74 |x?..=.1T..x..!.t|
000001a0 06 60 9d 21 c6 7a 24 e1 cc 28 f8 98 e0 99 e3 fc |.`.!.z$..(......|
000001b0 fa 8b eb d5 56 03 20 b8 54 ba c6 ee 9f 57 00 fe |....V. .T....W..|
000001c0 ff ff 82 fe ff ff 02 00 00 00 00 a8 5d 00 00 00 |............]...|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200
无论您要运行哪个操作系统, Grub 都必须安装在计算机启动的硬盘中。这意味着在 BIOS 中设置为第一个引导设备的硬盘驱动器。
您的 BIOS 可能设置为启动您的“第二”手驱动器,Ubuntu 可能是启动分区,因此完全跳过 grub。
所以,我的提示是:
转到您的 BIOS。通常这意味着在启动过程中按 DEL 或 F2 或其他键。正确的密钥取决于您拥有的计算机/品牌/型号。通常在PC启动时,会出现“Press XXX for BIOS settings”之类的文字
在 BIOS 设置屏幕上,尝试找到您的启动选项。它们的位置还取决于您的计算机/品牌/型号。确保您选择您的第一个硬盘驱动器作为您的第一个引导设备。保存设置并退出。
现在,在那个硬盘驱动器(通常是 /dev/sda)中安装 grub。像这样:
grub 安装 /dev/sda
如果您在切换硬盘启动顺序后无法启动 ubuntu,请更改回之前的设置(这样您就可以重新启动 Ubuntu)。现在您的第一个硬盘驱动器(具有 XP 分区的那个)可能是
/dev/sbd
. 只需使用上述命令替换sda为sdb。现在返回 BIOS 并再次更改引导顺序如果你需要,我可以给你更详细的说明。给我您的计算机(或主板)品牌和型号,以便我指导您获取 BIOS 键和菜单。另外,请发布以下内容:
希望有帮助!
更新:
从您发布的所有文件中,我有两个理论:
1 - grub-install 警告建议我实际上没有安装。阅读此处了解有关 FlexNet 和 Grub 的详细说明。FlexNet 看起来像一个许可证管理器,具有反盗版保护功能,可将数据写入 grub 用于其多引导代码的 MBR 空间。因此,您的 XP 中可能有一些依赖于 FlexNet 的软件,而 Grub 拒绝覆盖它,因此拒绝自行安装。相同的链接包含有关如何解决该问题的信息。
如果没有在 MBR 上安装 grub,您的 HD 将以传统方式启动:在您的第一个 HD 中标记为可启动的分区。这意味着 Ubuntu(检查 fdisk 的 /dev/sda1 标记为引导分区)
2 - 此外,您的 grub.cfg 不会显示 windows XP,就好像 os-prober 没有找到它一样。(看看你的
### BEGIN /etc/grub.d/30_os-prober ###
部分。它应该是这样的(只是一个例子):相反,您的没有菜单条目。不知何故,grub 在扫描您的驱动器时没有“找到”您的 XP 分区,或者认为它不是一个有效的操作系统。
因此,由于 grub 菜单除了 Ubuntu 之外没有其他操作系统,它会自动跳过菜单并直接启动到您的第一个(也是唯一的)操作系统。您可以通过在 POST 之后立即按住 SHIFT 键来强制 grub 显示菜单。但是,同样,它只有 Ubuntu(和 memtest,以及以前的内核和恢复模式),而不是 XP。
因此,要么没有安装 grub(当它找到 FlexNet 并静默中止时它会重新使用它),或者它已安装,但由于它只有 Ubuntu,它绕过了菜单。或两者。任何都可以让 Ubuntu 启动。
现在让我们检查并修复这两个理论:
1
是否实际安装了 grub
/dev/sda
?在启动时按住 SHIFT,菜单将显示而不是被绕过。如果它没有显示,grub 并没有实际安装。通过从 MBR 中删除 FlexNet 代码来做到这一点(上面的相同链接有关于如何操作的说明)。然后安装grub并检查是否没有警告。请记住,从 MBR 中擦除 FlexNet 将使其依赖的软件无法工作
2
您的 XP 安装是否有效?它可以在没有 grub 的情况下在单操作系统环境中启动吗?不知何故,grub 的 OS Prober 并不这么认为。那么让我们测试一下:
在 Ubuntu 中,使用 gParted 将其分区标记为 BOOT(右键单击分区 -> 标志 -> 勾选 BOOT)
另外,尝试安装您的 XP 分区(在 Nautilus 中双击它)并检查它是否正常。看看它的
boot.ini
文件。应该是这样的:[boot loader] timeout=30 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 /usepmtimer
断开 Ubuntu HD。只留下 XP 之一。设置 BIOS 以启动它。尝试查看 XP 是否有效(它可能还不会,但谁知道呢?)
使用任何 Windows 可启动 CD / USB / 软盘,使用Windows(不是 linux!)
fdisk /mbr
擦除它的 grub。不用担心,grub 只在您的第一个硬盘驱动器 /dev/sda 中需要,并且由于这将在结束时返回到 /dev/sdb,因此该 HD 上不需要 grub。现在试试。它应该工作。没有?然后使用 XP 启动 CD 修复该安装。如果那是您唯一连接的 HD 并且 XP 是唯一的操作系统,分区标记为启动,具有清理的 MBR 和修复的安装,它必须启动,否则以后 grub 将无法帮助您...
有用?凉爽的!重新连接另一个(Ubuntu)HD,像以前一样设置它(在 BIOS 中启动 HD),启动 Ubuntu 并
grub-install /dev/sda
再次运行。操作系统探测器现在应该检测到 XP,并且在其列表中有 2 个操作系统,菜单将在启动时显示。哇,这是一个很长的答案。你有很多功课要做。我希望一切正常。祝你好运!
以上部分来自您的引导信息脚本输出。对于正常工作的 Windows XP 安装,最后一行应该是
您的 Windows 分区似乎没有 Windows 启动所需的文件。这就是为什么 os-prober 没有检测到任何 Windows 安装的原因,这也意味着 GRUB 无法执行任何操作来使 Windows 启动。
在不了解这些文件丢失原因的更多信息的情况下,我无法解决问题。你知道他们为什么失踪吗?
从第二个硬盘(或您拥有 GRUB 的任何磁盘)启动
我的访客 PC 就是这样。当我打开它时,它像任何单个分区 PC 一样立即进入 XP。
当我想要 Ubuntu 时,我会在 POST 时进入引导选择,然后选择我的第二个硬盘驱动器并加载 GRUB。
因此,这实际上取决于您如何为您的 MBR 等进行设置。