升级到Snow Leopard的时候,找到的是dmg文件。
Mac自带的磁盘工具支持将dmg写入到USB stick,并用USB stick来引导安装。
当时就想,是不是iso文件也可以这样做?
今天准备装Ubuntu 10.10的时候,在Ubuntu的安装向导中找到了答案:
- Download the desired file
- Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight)
- Convert the .iso file to .img using the convert option of hdiutil (e.g.,
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso) - Note: OS X tends to put the
.dmgending on the output file automatically. - Run
diskutil listto get the current list of devices - Insert your flash media
- Run
diskutil listagain and determine the device node assigned to your flash media (e.g. /dev/disk2) - Run
diskutil unmountDisk /dev/diskN(replace N with the disk number from the last command; in the previous example, N would be 2) - Execute
sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m(replace/path/to/downloaded.imgwith the path where the image file is located; for example,./ubuntu.imgor./ubuntu.dmg). - Using
/dev/rdiskinstead of/dev/diskmay be faster.
If you see the errordd: Invalid number '1m', you are using GNU dd. Use the same command but replacebs=1mwithbs=1M.
If you see the errordd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the ‘Disk Utility.app’ and unmount (don’t eject) the drive. - Run
diskutil eject/dev/diskNand remove your flash media when the command completes - Restart your Mac and press
altwhile the Mac is restarting to choose the USB-Stick
从第5步起,也可以直接用“磁盘工具”代替
原文地址:http://www.ubuntu.com/desktop/get-ubuntu/download
另外,上文也提到了在Windows下将iso做成可引导USB stick的方法。用这个小工具应该比UltraISO要方便吧。
近期评论