環境 Vista SP1 ,Arch Linux
SDA1 vista c
SDA2 /boot
SDA3 SWAP
SDA6 /
SDA7 /home
SDA8 /data
SDA9 vista d
方法1:
1.匯出Linux引導記錄(Grub沒有安裝在MBR)
#dd if=/dev/sda2 of=/home/你的使用者名稱/arch.lnx bs=512 count=1
/dev/sda2視你的arch boot所在分區而定。
產生arch.lnx,用此檔案取代grldr.mbr。
2.在Vista的引導菜單中加入Ubuntu引導
在vista下,用管理員權限運行cmd,然後
bcdedit /create /d "ArchLinux" /application bootsector 得到了一個id字串
bcdedit /set {id} device partition=C:
bcdedit /set {id} path \arch.lnx
bcdedit /displayorder {id} /addlast
方法2:
ArchLinux早已安裝完畢,並且Vista SP1已經用VistaLoader啟用,
下載好grub4dos(wiki:http://grub4dos.sourceforge.net/wiki/index.php/Main_Page)
將GRLDR.MBR拷貝至Vista系統硬碟的根目錄下,如C:\。同時,也將GRLDR和menu.lst拷到系統硬碟的根目錄下。
需要注意的是,C:\GRLDR檔案本來就存在,任意改個名字即可。
重起後將首先進入grub4dos而不是像2000/2003/XP那樣首先進入Windows引導介面。
附上我的menu.1st
# This is a sample menu.lst file. You should make some changes to it.
# The old install method of booting via the stage-files has been removed.
# Please install GRLDR boot strap code to MBR with the bootlace.com
# utility under DOS/Win9x or Linux.
color black/cyan yellow/cyan
timeout 3
default /default
title Windows Vista
find --set-root /bootmgr
chainloader /bootmgr
title Arch Linux
root (hd0,1)
kernel /vmlinuz26 root=/dev/sda6 ro noapic vga=773
initrd /kernel26.img
title Arch Linux Fallback
root (hd0,1)
kernel /vmlinuz26 root=/dev/sda6 ro noapic vga=773
initrd /kernel26-fallback.img
title find and load NTLDR of Windows NT/2K/XP
fallback 1
find --set-root /ntldr
chainloader /ntldr
savedefault --wait=2
title commandline
savedefault --wait=2
commandline
title reboot
savedefault --wait=2
reboot
title halt
savedefault --wait=2
halt
title Install Arch
kernel (hd0,0)/isolinux/vmlinuz vga=773
initrd (hd0,0)/isolinux/initrd.img
title Install Ubuntu
find --set-root /ubuntu-8.04-desktop-amd64.iso
kernel (hd0,0)/casper/vmlinuz boot=casper
initrd (hd0,0)/casper/initrd.gz