如何将 Ubuntu 添加到 Windows XP boot.ini 文件中?

如何将 Ubuntu 添加到 Windows XP boot.ini 文件中?

可能重复:
是否可以使用 Windows 引导加载程序启动 Ubuntu?

我已经在与 Windows 不同的分区上安装了 Ubuntu 12.04 Alpha 2,并且想知道如何将操作系统添加到 boot.ini 以便我可以启动 Ubuntu。

答案1

Windows XP?嗯……

从 NT4 早期开始,此功能就一直有效:

  • 启动你的 Linux
  • 将 Windows 启动驱动器 R/W 挂载到 /media/fat
  • 以 root 身份执行dd if=/dev/sdxY of=/media/fat/linux.bin bs=512 count=1,替换sdxY为你的 linux 分区
  • 编辑你的 boot.ini 使其看起来像我的:
[引导加载程序]
超时=30
默认 = 多 (0) 磁盘 (0) rdisk (0) 分区 (5) \WINDOWS
[操作系统]
多 (0) 磁盘 (0) rdisk (0) 分区 (5) \WINDOWS="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Professional (安全模式)" /BASEVIDEO /SOS
c:\CMDCONS\BOOTSECT.DAT="Microsoft Windows XP 恢复控制台" /CMDCONS
c:\linux.bin="Grub (加载程序)"

您的结果可能会有所不同:Grub2 可能需要降级到 Grub 1.x 才能正常工作。

答案2

您没有将 Ubuntu 添加到 boot.ini。您将 windows 分区添加到 grub。

如果你必须这样做,它被描述这里用于使用 bitlocker 和 TPM 的实现。

答案3

我用易BCD(因为我用 fakeraid 在 EFI 主板上安装 GRUB 时遇到了麻烦。)页面底部有一个非商业用途的免费版本。

据我所记得,我设置了 Windows 引导加载程序以链式加载 grub。EasyBCD 中有一个自动方法,但对我来说不起作用。

相反,我使用以下 menu.lst 使其启动到旧版 GRUB:

# NeoSmart NeoGrub Bootloader Configuration File
#
# This is the NeoGrub configuration file, and should be located at C:\NST\menu.lst
# Please see the EasyBCD Documentation for information on how to create/modify entries:
# http://neosmart.net/wiki/display/EBCD/

# Boot automatically after 0 secs.
timeout 0

# By default, boot the first entry.
default 0

title (hd0,4)
root (hd0,4)
kernel /vmlinuz root=UUID=5827fd40-9b04-4f8a-bb0f-df1612670d89 ro
initrd /initrd.img

注意:(hd0,4) 表示我的根分区位于 /dev/sda5 上。UUID=X 是此卷的 uuid。您可以使用 找到它sudo blkid

相关内容