Today I was rather irritated with the USB build instructions for OpenIndiana. Someone had taken the time to write excellent directions for the Mac but didn’t write anything for Solaris, Opensolaris, or OpenIndiana.
I thought this might be useful for some who wanted to give OpenIndiana a whirl without having to be an expert at drive naming conventions. Makes sense, right?
First, you have to identify your USB device. This can easily be done with ‘iostat -En’
Here is an example from my home file server.
root@caprica:~# iostat -En c3d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Model: ELITE PRO CF CA Revision: Serial No: 5B9A102B0 Size: 15.27GB <15267151872 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 0 c0t0d0 Soft Errors: 0 Hard Errors: 68 Transport Errors: 0 Vendor: PepperC Product: Virtual Disc 1 Revision: 0.01 Serial No: Size: 0.00GB <0 bytes> Media Error: 0 Device Not Ready: 68 No Device: 0 Recoverable: 0 Illegal Request: 2 Predictive Failure Analysis: 0 c4t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500541AS Revision: CC34 Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3026 Predictive Failure Analysis: 0 c4t1d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c4t2d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c4t3d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c4t4d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c4t5d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c1t1d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c1t2d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c1t3d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c1t4d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c1t5d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c6t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: INTEL SSDSA2M040 Revision: 02HD Serial No: Size: 40.02GB <40020664320 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 1 Predictive Failure Analysis: 0 c6t1d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: SAMSUNG SSD RBX Revision: 5D15 Serial No: Size: 64.02GB <64023257088 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 17 Predictive Failure Analysis: 0 c6t2d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: INTEL SSDSA2M040 Revision: 02HB Serial No: Size: 40.02GB <40020664320 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 4 Predictive Failure Analysis: 0 c5t8d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: SAMSUNG HD501LJ Revision: 0-13 Serial No: Size: 500.11GB <500107862016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 18 Predictive Failure Analysis: 0 c5t9d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: SAMSUNG HD501LJ Revision: 0-13 Serial No: Size: 500.11GB <500107862016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 18 Predictive Failure Analysis: 0 c5t10d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: SAMSUNG HD501LJ Revision: 0-13 Serial No: Size: 500.11GB <500107862016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 18 Predictive Failure Analysis: 0 c5t11d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: SAMSUNG HD501LJ Revision: 0-13 Serial No: Size: 500.11GB <500107862016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 18 Predictive Failure Analysis: 0 c5t12d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: SAMSUNG HD501LJ Revision: 0-13 Serial No: Size: 500.11GB <500107862016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 18 Predictive Failure Analysis: 0 c5t13d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: SAMSUNG HD501LJ Revision: 0-13 Serial No: Size: 500.11GB <500107862016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 18 Predictive Failure Analysis: 0 c5t14d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: SAMSUNG HD501LJ Revision: 0-13 Serial No: Size: 500.11GB <500107862016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 18 Predictive Failure Analysis: 0 c1t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST31500341AS Revision: CC1H Serial No: Size: 1500.30GB <1500301910016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 3024 Predictive Failure Analysis: 0 c5t15d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: SAMSUNG HD501LJ Revision: 0-13 Serial No: Size: 500.11GB <500107862016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 18 Predictive Failure Analysis: 0 c8t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST2000DL003-9VT1 Revision: CC32 Serial No: Size: 2000.40GB <2000398934016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 30 Predictive Failure Analysis: 0 c8t16d0 Soft Errors: 0 Hard Errors: 1 Transport Errors: 6 Vendor: ATA Product: ST2000DL003-9VT1 Revision: CC32 Serial No: Size: 2000.40GB <2000398934016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 1 Recoverable: 0 Illegal Request: 30 Predictive Failure Analysis: 0 c8t17d0 Soft Errors: 0 Hard Errors: 1 Transport Errors: 10 Vendor: ATA Product: ST2000DL003-9VT1 Revision: CC32 Serial No: Size: 2000.40GB <2000398934016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 1 Recoverable: 0 Illegal Request: 30 Predictive Failure Analysis: 0 c8t18d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST2000DL003-9VT1 Revision: CC32 Serial No: Size: 2000.40GB <2000398934016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 2 Predictive Failure Analysis: 0 c8t19d0 Soft Errors: 0 Hard Errors: 1 Transport Errors: 10 Vendor: ATA Product: ST2000DL003-9VT1 Revision: CC32 Serial No: Size: 2000.40GB <2000398934016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 1 Recoverable: 0 Illegal Request: 30 Predictive Failure Analysis: 0 c8t1d0 Soft Errors: 0 Hard Errors: 1 Transport Errors: 10 Vendor: ATA Product: ST2000DL003-9VT1 Revision: CC32 Serial No: Size: 2000.40GB <2000398934016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 1 Recoverable: 0 Illegal Request: 30 Predictive Failure Analysis: 0 c8t2d0 Soft Errors: 0 Hard Errors: 1 Transport Errors: 10 Vendor: ATA Product: ST2000DL003-9VT1 Revision: CC32 Serial No: Size: 2000.40GB <2000398934016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 1 Recoverable: 0 Illegal Request: 30 Predictive Failure Analysis: 0 c8t3d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: ATA Product: ST2000DL003-9VT1 Revision: CC32 Serial No: Size: 2000.40GB <2000398934016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 2 Predictive Failure Analysis: 0 c9t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 Vendor: PNY Product: USB 2.0 FD Revision: PMAP Serial No: Size: 2.02GB <2017460224 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 0 Predictive Failure Analysis: 0
There we go, all the way at the bottom we find the device name as c9t0d0. We want to make sure we get this right because we don’t want stomp all over another hard drive in the system.
Since this is a writeable dd image, we’ll use dd to write it. Take note of the device name used. It is not c9t0d0s0 like a regular disk, nor is it c9t0d0 like you would pass into ZFS. This is a USB device so it gets a funny little p0 at the end. The path to the device to use in this case is /dev/rdsk/c9t0d0p0 — note that you must use a raw device (rdsk).
root@caprica:/data/OS-images/oi# dd if=oi-dev-151a-x86.usb of=/dev/rdsk/c9t0d0p0 bs=1024k 0+9825 records in 0+9825 records out 1106312704 bytes (1.1 GB) copied, 293.49 s, 3.8 MB/s
Voila.
Or you could use usbcopy:
root@tsurumah:/home/majid/pkg# usbcopy sol-11-exp-201011-live-x86.usbFound the following USB devices:
0: /dev/rdsk/c12t0d0p0 3.8 GB SanDisk Cruzer 1.00
1: /dev/rdsk/c9t0d0p0 Generic- Compact Flash 1.01
2: /dev/rdsk/c9t0d1p0 Multiple Flash Reader 1.05
Enter the number of your choice: 0
WARNING: All data on your USB storage will be lost.
Are you sure you want to install to
SanDisk Cruzer 1.00, 3800 MB at /dev/rdsk/c12t0d0p0 ? (y/n) y
Copying and verifying image to USB device
Finished 824 MB in 261 seconds (3.1MB/s)
0 block(s) re-written due to verification failure
Installing grub to USB device /dev/rdsk/c12t0d0s0
Completed copy to USB
Yes, thanks for pointing that out. usbcopy will work for OI, but that utility does not ship in legacy Solaris systems.
To use this in OI systems you have to install the distribution-constructor package
eg. pkg install pkg:/install/distribution-constructor