跳到主要內容

製作FreeBSD可開機USB

雖然用UNetbootin 在各種平台都可利用開機iso/Disk image做出可開機USB,但因為它獨特的boot loader,FreeBSD或某些Linux Distribution會有問題。

以往FreeBSD的安裝媒體只有出ISO image,現在已經有memstick.img可選擇,例如:FreeBSD-8.2-RELEASE-i386-memstick.img。以前的方法(thinker)真的太麻煩了 :(


按照官方安裝手冊,若用FreeBSD要:
Writing the Image with dd(1)
Set the kern.geom.debugflags sysctl to be able to write a master boot record to the target device.
$ sudo sysctl kern.geom.debugflags=16
The .img file is not a regular file you copy to the memory stick. It is an image of the complete contents of the disk. This means that you cannot simply copy files from one disk to another. Instead, you must use dd(1) to write the image directly to the disk: (這裏假設USB是 /dev/sdc)
$ sudo dd if=FreeBSD-8.2-RELEASE-i386-memstick.img of=/dev/sdc bs=64k
手冊上沒寫,要先umount USB device,e.g.:
$ sudo umount /dev/sdc

Linux原本就可寫入MBR,所以只要:
$ sudo umount /dev/sdc
$ sudo dd if=FreeBSD-8.2-RELEASE-i386-memstick.img of=/dev/sdc bs=64k
Mac稍微麻煩一點,因為磁碟工具程式似乎不支援不認得的File System:
要知道mount到哪兒,可以在Terminal(終端機)看
$ sudo mount
若己經有檔案系統,可先別急著在Finder上按退出,因為會連device都退出 (這裏假設是 /dev/disk1)
$ sudo diskutil umount /dev/disk1
或是
$ sudo diskutil umount [你USB碟的Label名稱]
接下來
$ sudo dd if=FreeBSD-8.2-RELEASE-i386-memstick.img of=/dev/disk1 bs=64k

若是Windows可以利用 Image Writer for Windows

  1. Obtaining Image Writer for Windows
    Image Writer for Windows is a free application that can correctly write an image file to a memory stick. Download it from https://launchpad.net/win32-image-writer/ and extract it into a folder.
  2. Writing The Image with Image Writer
    Double-click the Win32DiskImager icon to start the program. Verify that the drive letter shown underDevice is the drive with the memory stick. Click the folder icon and select the image to be written to the memory stick. Click Save to accept the image file name. Verify that everything is correct, and that no folders on the memory stick are open in other windows. Finally, click Write to write the image file to the drive.

留言

這個網誌中的熱門文章

DBeaver 介面語言

DBeaver是我個人頗常用的一套跨平台Database管理工具,最近升級後發現Windows版本居然變成簡體中文,而且無法切換為英文。

Personal Bookmark

Java SE 6 + Firefox 2 UI 問題 As I do . Google拋棄了了SOAP API,浮想聯翩 https://www.gandi.net/ VS 2005 SP1中文版推出 Windows Vista中文版下載 ASP.NET 2.0網頁執行管線與快取原理 Cache 2.0快取架構與快取資料自動移除架構圖 flickr sync 分享與試用 SUN Looking Glass 3D圖形介面發布1.0 雅虎勵精圖治推動改革 Wait and see 國內某SOC疑遭駭客入侵 大砲開講 Very Important! 微軟公佈Vista安全程式介面草案 一窺Google開原碼庫房乾坤 qing is writing a dig girl net... wait and see

自然人憑證讀卡機驅動程式

鳥毅用的是第一代的自然人憑證讀卡機,EZ100PU(後來有同事買EZmini可以讀SIM卡似乎更好),每年報稅時用一次。 本來只是要申請些政府業務,一時之間找不到光碟,沒想到在 驅動程式下載 居然看到Linux和Mac的驅動程式,剩下的就是政府單位的網頁和程式應該改版了吧!!!