使用 Windows bootloader 來 load Linux

上回提到如何重建 GRUB,這次講一下不使用 GRUB 作為主要 bootloader,而用 Windows 本身的 bootloader 來建立多系統的電腦。

使用 Windows NT/2000/2003/XP 本身的 bootloader 來 dual boot 需要一個叫 bootpart 的程式,在這裡下載。另外要注意安裝 linux 時要把 GRUB 裝在 linux 的分區,而不是裝在 MBR。

bootpart 執行後可以看到類似下面的資料,是所有硬碟的 partition 列表,

C:\>bootpart
Boot Partition 2.60 for WinNT/2K/XP (c)1995-2005 G. Vollant (info@winimage.com)
WEB : http://www.winimage.com and http://www.winimage.com/bootpart.htm
Add partition in the Windows NT/2000/XP Multi-boot loader
Run "bootpart /?" for more information

Physical number of disk 0 : 96e096d
0 : C:* type=7 (HPFS/NTFS), size= 15358108 KB, Lba Pos=63
1 : C: type=5 (Extended), size= 145476607 KB, Lba Pos=30716280
2 : C: type=7 (HPFS/NTFS), size= 145476576 KB, Lba Pos=30716343
Physical number of disk 1 : f6568938
3 : D:* type=83 (Linux native), size= 19535008 KB, Lba Pos=63
4 : D: type=5 (Extended), size= 2000092 KB, Lba Pos=39070080
5 : D: type=82 (Linux swap), size= 2000061 KB, Lba Pos=39070143

找到裝有 linux 的 partition,如上面的 3,執行下面的命令:
C:\>bootpart 3 bootlnx.sec ubuntu
意思是建立一個叫 bootlnx.sec 檔名的檔案,用第三個 partition boot,並用 “ubuntu” 的名字加入 Windows bootloader 的選單。執行完了之後,產生一個 bootlnx.sec 檔案,並在 boot.ini 中加了最後一行:

[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP Media Center Edition" /noexecute=optin /fastdetect
C:\bootlnx.sec="ubuntu"

這樣就 ok 了,重開機會看到上面的兩個選項 “Windows XP Media Center Edition” 及 “ubuntu”。

如果是使用 Windows Vista,則上面的方法方不適用,但有個更方便的程式可用,有漂亮的 UI,叫 EasyBCD (免費軟體),在這裡下載

(Visited 15,619 times, 1 visits today)

在〈使用 Windows bootloader 來 load Linux〉中有 3 則留言

  1. 自動引用通知: 重建 GRUB (linux boot loader)

發佈回覆給「h999342」的留言 取消回覆