TShopping

 找回密碼
 註冊
搜索
查看: 2346|回復: 2
打印 上一主題 下一主題

[分享] 如何使隨身碟能開機的方法

[複製鏈接]
跳轉到指定樓層
1#
發表於 2008-7-30 13:48:24 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
 
Push to Facebook
http://www.ubuntu-tw.net/modules/newbb/viewtopic.php?post_id=25170

Paul_Chang
之前發了文 "請問有那些廠牌的隨身碟不支援開機?" http://www.ubuntu.org.tw/modules/newbb/viewtopic.php?topic_id=5680&forum=11 ,很遺憾沒有得到明確的協助,更感慨竟有人貼圖諷刺,卻不提供解決辦法.


不過經過幾天的研究和測試,我整理了以下內容和大家分享:

隨身碟的晶片並不全部支援開機,但使用適當的開機程式(Boot Loader),則晶片不支援開機的隨身碟也能開機了,目前在Linux下主要使用兩種開機程式(Boot Loader),Syslinux和GRUB,分別說明如下:

(隨身碟的代號假設為 /dev/sdb,這可在terminal中鍵入指令fdisk -l查得;而在/media中隨身碟的代號假設為 disk,這可在terminal中鍵入指令ls /media查得)

1. Syslinux

適用於晶片支援開機的隨身碟,開機選項存放在檔案syslinux.cfg中,電腦系統中必須先已安裝套件syslinux(版本3.30以上)和mtools,然後執行下列指令以使隨身碟能開機:

$ syslinux -sf /dev/sdb


2. GRUB

適用於所有的隨身碟,開機選項存放在檔案menu.lst中,執行下列指令以使隨身碟能開機:

$ mkdir -p /media/disk/boot/grub
$ cp /usr/lib/grub/i386-pc/* /media/disk/boot/grub/
$ gedit /media/disk/boot/grub/menu.lst

確認磁碟代號為 hd0,如下例
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-16-generic
root (hd0,1)

再輸入以下指令:

$ echo '(hd0) /dev/sdb' > /media/disk/boot/grub/device.map
$ grub-install --root-directory=/media/disk /dev/sdb

如出現以下訊息即表示隨身碟能開機了

Installation finished. No error reported.
This is the contents of the device map /media/liveusb/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sdb


PS: 我成功地在一晶片支援開機的威剛隨身碟上安裝了Clonezilla,而在另一晶片不支援開機的金士頓隨身碟上安裝了gparted-livecd-0.3.4-8

 

臉書網友討論
2#
發表於 2013-11-12 01:00:38 | 只看該作者
不錯,感謝版主

版主招募中

*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-20 07:29 , Processed in 0.065851 second(s), 19 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表