windows如何引導linux

來源:互聯網
上載者:User

   用Windows引導Linux(Windows7+Ubuntu)

  啟動到linux (Ubuntu)

  sudo dd if=/dev/sda of=/media/linux.lnx bs=512 count=1

  將它cp到你的win根目錄,例如是C:/,為了保險,最好將其屬性改為"+s +h +r",也就是"系統,唯讀

  ,隱藏"

  >attrib +s +r +h c:linux.lnx.而且我建議你對這個檔案做多個備份!

  然後重啟到win

  進入後確認你的系統根目有linux.lnx這個檔案

  如果是win 2000/XP直接修改boot.ini

  boot.ini請在win 下修改,因為編碼不同! 大俠除外。

  它可能隱藏和唯讀

  然後在後面加入

  如果有

  代碼:

  time=0

  請將0更改!如time=5

  代碼:

  C:/linux.lnx="linux"

  儲存!

  然後你就可以重啟win看效果了。

  如果Vista/Windows 7,因為採用啟用了新的引導方式,即是一個bcdedit的執行引導程式操作。

  複製好引導檔案後,還需要進一步作如下修改

  ***************************************************

  方案A:

  bcdedit /create {ntldr} /d "Ubuntu Linux"

  bcdedit /set {ntldr} device partition=C:

  bcdedit /set {ntldr} path /ntldr

  bcdedit /displayorder {ntldr} /addlast

  方案B:(注意要根據第一個命令返回結果做相應修改):

  bcdedit /copy {ntldr} /d "Ubuntu Linux";系統會提示說"已將該項成功複製到 {8de1dad8-d399

  -11db-b639-000aeb2dc0ba}",其中的{8de1dad8-d399-11db-b639-000aeb2dc0ba}就是"Ubuntu Linux"

  的啟動標識符。不同的作業系統可能會不一樣。

  再輸入:bcdedit /set {你的Linux標識符} device partition=C:,系統會提示"操作成功完成".

  輸入:bcdedit /set {你的Linux標識符} path /ntldr,

  最後輸入:bcdedit /displayorder {你的Linux標識符} /addlast.

  儲存退出,重啟之後你就會看到Windows 7 和 Ubuntu Linux的雙啟動菜單了。

  方案C:

  輸入bcdedit /? 查看相關的協助資訊

  1.使用bcdedit配置新引導項

  >bcdedit /create /d "Linux" /application osloader

  #建立新項,也就是建立新引導項,成功後會返回一guid值

  格式如下:{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

  >bcdedit /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} drive partition=C:

  #設定新引導項檔案所在分區

  >bcdedit /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} path linux.lnx #設定啟動項檔案在分區中

  的相對路徑,注意檔案之前的""是必須的,表明是所在分區的根目錄下。若假設該檔案在c:windows

  下,則應改為windowslinux.另外path後面有一個空格

  >bcdedit /displayorder {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} /addlast

  #設定引導項順序,addlast為將其添加到引導項列表的最後,也可改為addfirst,表示添加到最前。至此

  添加新引導項的操作已成功,但是現在還不能引導,為什麼呢??

  >bcdedit /default {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

  #此命令可選,如果要將此項設為預設引導項的話,就執行它

  下面就可直接執行bcdedit查看一下配置情況了

  ***************************************************

  如果Windows引導正常了,就可以清理掉MBR記錄了。

  步驟:

  win9x的引導盤啟動(或者用其他磁碟管理工具也行)

  代碼:

  fdisk /mbr

  這樣grub引導就沒有了,只剩下Windows的引導方式了。

  用Windows引導Linux(Windows7+Ubuntu)

  啟動到linux (Ubuntu)

  sudo dd if=/dev/sda of=/media/linux.lnx bs=512 count=1

  將它cp到你的win根目錄,例如是C:/,為了保險,最好將其屬性改為"+s +h +r",也就是"系統,唯讀

  ,隱藏"

  >attrib +s +r +h c:linux.lnx.而且我建議你對這個檔案做多個備份!

  然後重啟到win

  進入後確認你的系統根目有linux.lnx這個檔案

  如果是win 2000/XP直接修改boot.ini

  boot.ini請在win 下修改,因為編碼不同! 大俠除外。

  它可能隱藏和唯讀

  然後在後面加入

  如果有

  代碼:

  time=0

  請將0更改!如time=5

  代碼:

  C:/linux.lnx="linux"

  儲存!

  然後你就可以重啟win看效果了。

  如果Vista/Windows 7,因為採用啟用了新的引導方式,即是一個bcdedit的執行引導程式操作。

  複製好引導檔案後,還需要進一步作如下修改

  ***************************************************

  方案A:

  bcdedit /create {ntldr} /d "Ubuntu Linux"

  bcdedit /set {ntldr} device partition=C:

  bcdedit /set {ntldr} path /ntldr

  bcdedit /displayorder {ntldr} /addlast

  方案B:(注意要根據第一個命令返回結果做相應修改):

  bcdedit /copy {ntldr} /d "Ubuntu Linux";系統會提示說"已將該項成功複製到 {8de1dad8-d399

  -11db-b639-000aeb2dc0ba}",其中的{8de1dad8-d399-11db-b639-000aeb2dc0ba}就是"Ubuntu Linux"

  的啟動標識符。不同的作業系統可能會不一樣。

  再輸入:bcdedit /set {你的Linux標識符} device partition=C:,系統會提示"操作成功完成".

  輸入:bcdedit /set {你的Linux標識符} path /ntldr,

  最後輸入:bcdedit /displayorder {你的Linux標識符} /addlast.

  儲存退出,重啟之後你就會看到Windows 7 和 Ubuntu Linux的雙啟動菜單了。

  方案C:

  輸入bcdedit /? 查看相關的協助資訊

  1.使用bcdedit配置新引導項

  >bcdedit /create /d "Linux" /application osloader

  #建立新項,也就是建立新引導項,成功後會返回一guid值

  格式如下:{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

  >bcdedit /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} drive partition=C:

  #設定新引導項檔案所在分區

  >bcdedit /set {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} path linux.lnx #設定啟動項檔案在分區中

  的相對路徑,注意檔案之前的""是必須的,表明是所在分區的根目錄下。若假設該檔案在c:windows

  下,則應改為windowslinux.另外path後面有一個空格

  >bcdedit /displayorder {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} /addlast

  #設定引導項順序,addlast為將其添加到引導項列表的最後,也可改為addfirst,表示添加到最前。至此

  添加新引導項的操作已成功,但是現在還不能引導,為什麼呢??

  >bcdedit /default {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

  #此命令可選,如果要將此項設為預設引導項的話,就執行它

  下面就可直接執行bcdedit查看一下配置情況了

  ***************************************************

  如果Windows引導正常了,就可以清理掉MBR記錄了。

  步驟:

  win9x的引導盤啟動(或者用其他磁碟管理工具也行)

  代碼:

  fdisk /mbr

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.