Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Windows 2000 與 Linux 雙系統安裝:使用 NT Loader 引導 Linux

編輯:Linux 教學

在 Windows 2000 環境下安裝 Linux 雙系統,最穩妥的方式是保留 Windows 的 MBR(主開機記錄),改用 Windows 開機選單(NTLDR)來啟動 Linux。本文詳細記錄透過 LOADLIN 或 dd 方式將 Linux 開機磁區複製到 Windows 分區,並修改 boot.ini 實現雙系統選單的完整步驟。

安裝流程概覽

  1. 先安裝 Windows 2000,預留未分割空間給 Linux。
  2. 安裝 Linux(以 Linpus 為例),務必將 LILO/GRUB 安裝在 Linux 根分區的開機磁區(Boot Sector),而非 MBR。製作一張 Linux 開機磁片備用。
  3. 使用開機磁片進入 Linux 系統。
  4. 提取 Linux 分區第一磁區的開機程式碼到檔案 bootsect.lnx:
    # dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1
    (假設 Linux 安裝在 /dev/hda2)
  5. 將 bootsect.lnx 複製到 Windows C: 根目錄(可先複製到軟碟再轉移):
    # mount -t msdos /mnt/floppy
    # cp /bootsect.lnx /mnt/floppy
    # umount /mnt/floppy
  6. 在 Windows/DOS 環境下修改 C:\boot.ini 屬性並編輯:
    C:\attrib -s -r c:\boot.ini
    C:\edit boot.ini
    在 [operating systems] 區段末尾新增一行:
    C:\BOOTSECT.LNX="Linux"
  7. 恢復 boot.ini 屬性並重開機:
    C:\attrib +s +r c:\boot.ini

關鍵注意事項

  • 絕對不要將 Linux 開機管理程式寫入 MBR,否則會覆蓋 Windows 2000 的 NTLDR,導致無法進入 Windows。
  • dd 指令的 if= 參數必須指向 Linux 根分區(如 /dev/hda2、/dev/sda3 等),而非整顆硬碟。
  • boot.ini 路徑寫法為 C:\BOOTSECT.LNX,不區分大小寫,但建議大寫。
  • 若 Linux 核心更新或重裝,需重新執行 dd 更新 bootsect.lnx 並覆蓋 C: 根目錄舊檔。

優缺點分析

優點:Windows MBR 保持原狀,系統穩定;移除 Linux 時僅需刪除 bootsect.lnx 與 boot.ini 該行,極為乾淨。
缺點:每次 Linux 核心升級需手動同步開機磁區;若 Windows 重裝,需重做一次流程。

Copyright © Windows教程網 All Rights Reserved