Sddd

From Resin 4.0 Wiki

(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
 
= sddd - OSX SD Card Imaging Script =
 
= sddd - OSX SD Card Imaging Script =
  
sddd is a shell script to make writing disk images to raw device  easier, less error prone, and more informative.
+
sddd is a shell script to make writing disk images to raw devices easier, less error prone, and more informative.
  
 
sddd distinguishes itself from standard "dd" because it provides constant graphical feedback while writing to the disk.  dd is notorious for providing no feedback about what it's doing until complete.
 
sddd distinguishes itself from standard "dd" because it provides constant graphical feedback while writing to the disk.  dd is notorious for providing no feedback about what it's doing until complete.
Line 24: Line 24:
 
  <tr>
 
  <tr>
 
   <td>[[Media:Sddd.tar.gz|sddd.tar.gz]]</td>
 
   <td>[[Media:Sddd.tar.gz|sddd.tar.gz]]</td>
   <td>v1.0</td>
+
   <td>v1.1</td>
 
  </tr>
 
  </tr>
 
</table>
 
</table>
Line 30: Line 30:
 
== Instructions ==
 
== Instructions ==
  
# Download and save sddd.tar.gz to your home directory
+
# Download and save Sddd.tar.gz to your home directory
# Open command prompt and extract it (tar xvfz sdd.tar.gz)
+
# Open command prompt and extract it (tar xvfz Sddd.tar.gz)
# Make sddd executable if it not already (chmod u+x sddd)
+
# Make sddd executable if it's not already (chmod u+x sddd)
# Execute sddd as ./sddd <.img file> [<SD card device>]
+
# Execute sddd as ./sddd <disk.img> [<SD card device>]
  
 
== Usage ==
 
== Usage ==
Line 82: Line 82:
 
  0+30689 records out
 
  0+30689 records out
 
  1939865600 bytes transferred in 250.811770 secs (7734348 bytes/sec)
 
  1939865600 bytes transferred in 250.811770 secs (7734348 bytes/sec)
 +
Unmounting /dev/disk2...
 +
Unmount of all volumes on disk2 was successful

Revision as of 00:00, 8 February 2013

Embed-48.pngPie48.png

Contents

sddd - OSX SD Card Imaging Script

sddd is a shell script to make writing disk images to raw devices easier, less error prone, and more informative.

sddd distinguishes itself from standard "dd" because it provides constant graphical feedback while writing to the disk. dd is notorious for providing no feedback about what it's doing until complete.

This makes it great for writing Raspberry Pi images to an SD card, but it should work for writing to a USB drive also.

Requirements

  • OSX
  • SD card reader
  • diskutil (included with OSX)
  • dd (included with OSX)
  • pv (NOT included with OSX, get it from the MacPorts Project)

To get pv install MacPort. After MacPorts is installed, install pv via 'sudo port install pv'.

Download

sddd.tar.gz v1.1

Instructions

  1. Download and save Sddd.tar.gz to your home directory
  2. Open command prompt and extract it (tar xvfz Sddd.tar.gz)
  3. Make sddd executable if it's not already (chmod u+x sddd)
  4. Execute sddd as ./sddd <disk.img> [<SD card device>]

Usage

  • The first parameter is the disk image file.
  • The 2nd parameter (optional) is the disk device to write to. If not specified, sddd will prompt you to enter the device.
molson:~ paul$ ./sddd
sddd: usage   : sddd <source image> [<disk>]
     example : sudo ./sddd 2012-12-16-wheezy-raspbian.img disk2

Example

molson:~ paul$ sudo ./sddd Downloads/2012-12-16-wheezy-raspbian.img
/dev/disk0
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:      GUID_partition_scheme                        *250.1 GB   disk0
  1:                        EFI                         209.7 MB   disk0s1
  2:                  Apple_HFS Macintosh HD            249.2 GB   disk0s2
  3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk2
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:     FDisk_partition_scheme                        *8.1 GB     disk2
  1:             Windows_FAT_32                         58.7 MB    disk2s1
  2:                      Linux                         1.9 GB     disk2s2

Enter the SD card disk (disk0/disk1/disk2/disk3) ? disk2
WARNING: disk2 appears to be mounted, shall I unmount /dev/disk2 (y/n)? y
Unmounting /dev/disk2...
Unmount of all volumes on disk2 was successful
/dev/disk0
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:      GUID_partition_scheme                        *250.1 GB   disk0
  1:                        EFI                         209.7 MB   disk0s1
  2:                  Apple_HFS Macintosh HD            249.2 GB   disk0s2
  3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk2
  #:                       TYPE NAME                    SIZE       IDENTIFIER
  0:     FDisk_partition_scheme                        *8.1 GB     disk2
  1:             Windows_FAT_32                         58.7 MB    disk2s1
  2:                      Linux                         1.9 GB     disk2s2

WARNING: Writing to the wrong device will ruin your hard drive! Make sure you have entered SD card disk!
Write Downloads/2012-12-16-wheezy-raspbian.img to disk2 (y/n)? y
Writing Downloads/2012-12-16-wheezy-raspbian.img to disk2...
1.81GiB 0:04:10 [7.38MiB/s] [================================>] 100%            
0+30689 records in
0+30689 records out
1939865600 bytes transferred in 250.811770 secs (7734348 bytes/sec)

Unmounting /dev/disk2... Unmount of all volumes on disk2 was successful

Personal tools
TOOLBOX
LANGUAGES