用bcdedit引導(dǎo)linux
1、概述
之前xp時代可通過修改系統(tǒng)分區(qū)下(c:/)的隱藏系統(tǒng)文件boot.ini來引導(dǎo)其他系統(tǒng)
Vista時代使用了全新的引導(dǎo)方式,因此配置不同
首先:win+R打開命令窗口,執(zhí)行cmd,打開命令提示符
輸入bcdedit /? 查看相關(guān)的幫助信息
2、使用bcdedit配置新引導(dǎo)項
>bcdedit /create /d "Linux" /application osloader
#建立新項,也就是建立新引導(dǎo)項,成功后會返回一guid值
格式如下:{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
>bcdedit /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} drive partition=C:
#設(shè)置新引導(dǎo)項文件所在分區(qū)
>bcdedit /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} path /linux.bin #設(shè)置啟動項文件在分區(qū)中的相對路徑,注意文件之前的“/”是必須的,表明是所在分區(qū)的根目錄下。若假設(shè)該文件在c:/windows/下,則應(yīng)改為/windows/linux。另外path后面有一個空格
>bcdedit /displayorder {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} /addlast
#設(shè)置引導(dǎo)項順序,addlast為將其添加到引導(dǎo)項列表的最后,也可改為addfirst,表示添加到最前。至此添加新引導(dǎo)項的操作已成功,但是現(xiàn)在還不能引導(dǎo),為什么呢??
>bcdedit /default {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
#此命令可選,如果要將此項設(shè)為默認(rèn)引導(dǎo)項的話,就執(zhí)行它
下面就可直接執(zhí)行bcdedit查看一下配置情況了
3、剛才的引導(dǎo)項配置完了,但是說還不能引導(dǎo),為什么呢?
因為引導(dǎo)項的文件并不存在。
4、用光盤引導(dǎo)進(jìn)入linux的單用戶rescue模式
對于fedora,系統(tǒng)會被掛載在/mnt/sysimage/下面,這時執(zhí)行命令
#dd if=/mnt/sysimage/dev/sda5 of=/mnt/sysimage/dev/sdb/linux.bin bs=512 count=1
命令中假設(shè)grub裝到了sda5分區(qū)的前512字節(jié)中,并且假設(shè)輸出linux.bin到設(shè)備sdb
然后重新啟動進(jìn)入windows vista,把linux.bin復(fù)制到c:/下,為了保險,最好將其屬性改為“+s +h +r”,也就是“系統(tǒng),只讀,隱藏”
>attrib +s +r +h c:/linux.bin
完成。
新聞熱點
疑難解答
圖片精選