Vista和Linux共存的2種方法

來源:互聯網
上載者:User

環境 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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.