Copying ISO Images To USB

From MediaWiki
Revision as of 06:57, 1 February 2014 by Paul Blankenbaker (talk | contribs) (Created page with "= Directly Copying ISO Image To USB = One of the simplest methods to convert a ISO image to bootable USB is to directly copy the image to the USB media. The ''dd'' command can b...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Directly Copying ISO Image To USB

One of the simplest methods to convert a ISO image to bootable USB is to directly copy the image to the USB media. The dd command can be used for this purpose on Linux and Mac based systems.

Here are some things to be aware of when using the dd method:

  • The entire USB flash drive is used. Hence, if you use a 16GB flash drive, you won't be able to store information on any of the remaining disk space.
  • The systems which you want to boot from need to support booting from USB ISO images in addition to or instead of booting from USB FAT images. This may lead to better or worse compatibility.
  • You will not have access to all of the fancy features available when using the Live USB tools (separate writable home partition, overlay, etc).

Using dd - Linux System

The following demonstrates how to use dd on a Linux system to copy the contents of the ISO image to a 8GB USB flash drive ("/dev/sdc") from the command line. An 8GB Block Size ("BS") was used for file transfer optimization. Make sure the USB flash drive is not mounted prior to performing the copy. The cmp utility is used after the copy for verification.

[root@shopper2 Downloads]# ls -al ./nst-20-5102.x86_64.iso 
-rw-r--r-- 1 root root 2002780160 Dec  2 06:21 ./nst-20-5102.x86_64.iso
[root@shopper2 Downloads]#
[root@shopper2 Downloads]# lsscsi -s
[0:0:0:0]    disk    ATA      OCZ-VERTEX3      2.25  /dev/sda    120GB
[1:0:0:0]    disk    ATA      SanDisk SDSSDX24 R211  /dev/sdb    240GB
[12:0:0:0]   disk    SanDisk  Cruzer           1.01  /dev/sdc   8.00GB
[root@shopper2 Downloads]#
[root@shopper2 Downloads]# dd if=./nst-20-5102.x86_64.iso of=/dev/sdc bs=8M
238+1 records in
238+1 records out
2002780160 bytes (2.0 GB) copied, 519.832 s, 3.9 MB/s
[root@shopper2 Downloads]#
[root@shopper2 Downloads]# cmp -l ./nst-20-5102.x86_64.iso /dev/sdc
cmp: EOF on ./nst-20-5102.x86_64.iso
[root@shopper2 Downloads]#

Using dd - Mac System

It is also possible to use the dd command to copy the contents of the ISO image to a USB flash drive having a capacity of 2GB (or more). The following demonstrates how to do this from the command line on a Mac. The diskutil utility was used prior to invoking the dd command determine the device entry for the USB flash drive and to unmount any active partitions.

taco-e:tlp pkb$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *512.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            511.8 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *750.2 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS TIMEMAC                 749.8 GB   disk1s2
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.0 GB     disk3
   1:             Windows_FAT_32 tldboot                 128.0 MB   disk3s1
   2:                      Linux                         7.9 GB     disk3s2
taco-e:tlp pkb$ diskutil unmountDisk /dev/disk3
Unmount of all volumes on disk3 was successful
taco-e:tlp pkb$ sudo dd if=/Volumes/public/vm/iso/nst-20-5102.i686.iso of=/dev/disk3 bs=$((8*1024*1024))
220+1 records in
220+1 records out
1847590912 bytes transferred in 2957.797273 secs (624651 bytes/sec)
taco-e:tlp pkb$ diskutil eject /dev/disk3
Disk /dev/disk3 ejected
taco-e:tlp pkb$