分类: LINUX
2011-04-08 13:05:08
Note: Ubuntu is primarily distributed over the Internet as CD/DVD image files, called ISOs. If you have downloaded an ISO image, please refer instead to (to install an ISO image on a USB flash drive) or (to burn an ISO image onto a CD-ROM).
The Ubuntu 9.04 netbook remix and some specialized machine images are distributed as disk image files, called IMGs. This page describes how to install from a .IMG file.
You need to write the downloaded IMG image to a device that your computer can boot from. For netbooks this is usually a flash memory device, such as a USB flash drive or SD memory card. You can also write the IMG file to an external USB hard drive, although these instructions use the term "flash media". The device must have sufficient capacity for the install (1 GB or larger is recommended), and you may need a USB adapter or SD card reader on your computer in order to write to it.
Warning: This will destroy all data on the destination device. Please backup all data to other media before proceeding.
Be sure to verify that your computer supports booting from the device you have selected for installation. Many computers can boot from a USB drive, and some from other sources. Check the documentation on your specific model of computer for the procedure to boot from the selected device.
The page has links to the IMG and ISO image files, as well as other methods of .
Before writing your flash, it is highly recommended that you verify the md5 sum (hash) of the .img file. For instructions, please see . For the current list of Official Ubuntu MD5 hashes, see the MD5SUMS file for the release you're using under (and optionally the signatures in the MD5SUMS.gpg file), or see . This ensures that the file was not damaged during the download process and is 100% intact.
Download Disk Imager from https://launchpad.net/win32-image-writer/+download
Download flashnul from
Run flashnul -p
Run flashnul
If your release does not include this, download it from
If imagewriter fails to launch, you may need to install python glade2 support. Install the python-glade2 package or Run sudo apt-get install python-glade2
sudo apt-get install usb-imagewriter
Open Applications -> Accessories -> Image Writer
KDE users will find this in Applications -> Utilities -> Image Writer
sudo imagewriter
on some usb-imagewriter versions (console command: imagewriter) the application fails to write if the image path contains blank spaces, exiting with ": list index out of range".
Be very careful about which /dev device you write to. If your machine is booted up off of disk /dev/sda, and your usb stick is on /dev/sdc, and you accidentally write to /dev/sda instead of /dev/sdc, your filesystem will be irreparably damaged and you will lose all of your files.
Look at the output of sudo dmesg | tail -20 to determine the device node assigned to your flash media (ignore the device number; e.g. /dev/sdc, not sdc1)
[ 5046.396364] usb-storage: device scan complete
[ 5046.397075] scsi 10:0:0:0: Direct-Access USB Flash Memory 1.00 PQ: 0 ANSI: 0 CCS
[ 5047.068761] sd 10:0:0:0: [sdc] Mode Sense: 23 00 00 00
[ 5047.068769] sd 10:0:0:0: [sdc] Assuming drive cache: write through
[ 5047.075021] sdc: sdc1
[ 5047.076459] sd 10:0:0:0: [sdc] Attached SCSI removable disk
Run sudo umount /dev/devicenode
Run sudo dd if=/path/to/downloaded.img of=/dev/devicenode bs=1M
Run diskutil list to get the current list of devices
Run diskutil list again 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.img with the path where the image file is located; for example, ./ubuntu.img, /dev/rdiskN is faster than /dev/diskN). If you see the error dd: Invalid number `1m', you are using GNU dd. Use the same command but replace bs=1m with bs=1M.
Run diskutil eject /dev/diskN and remove your flash media when the command completes