Posted by & filed under AWS/Linux/Unix/Devops stuff.

Either my SuperMicro SATA adapter or DVD drive ended up being bad, as I was getting an amber light at boot and could not boot off of any CD/DVD media. I decided to instead install Solaris using my USB drive, and ended up struggling with this for several hours – this ended up being far more difficult than it probably ought to have been!

What I ended up doing was the following…

Either my SuperMicro SATA adapter or DVD drive ended up being bad, as I was getting an amber light at boot and could not boot off of any CD/DVD media. I decided to instead install Solaris using my USB drive, and ended up struggling with this for several hours – this ended up being far more difficult than it probably ought to have been!

What I ended up doing was the following:

  1. Present my USB drive to a Solaris VM
  2. From the Solaris VM copy over the contents of the Solaris DVD ISO to the USB drive, and prep the drive for booting

Simple enough, huh? Well, both ended up being tougher than they sound, particularly number two.

My VM host I used was VMWare Server (which NetMusician is already utilizing). I needed to startup the VMWare Infrastructure web interface as the root user (sudo firefox). Once I had done so it was easy to share my USB drive by clicking on the USB controller and selecting the drive, and connecting the drive within the guest console window.

Within Solaris, I used the instructions on this page and this other page. I don’t know if either page will work on their own, I didn’t try that, I decided to mix and match the more thorough set of instructions from 2007 with the instructions from 2008. The following is what worked for me:

  1. svcadm disable volfs
  2. rmformat -l, take note of the USB drive’s device node, which in my case was /dev/rdsk/c2t0d0p0
  3. fdisk -B [usbnode] (usbnode is the node recorded from the previous step)
  4. my USB drive is 320 gig, so I have space to burn. I created a generous set of partitions by defining them in a text file (slices.txt) with the following contents:
    slices: 0 = 2MB, 8000MB, "wm", "root" :
             1 = 0, 1MB, "wu", "boot" :
             2 = 0, 10000MB, "wm", "backup"
  5. rmformat -s ./path/to/slices.txt [usbnode]
  6. devfsadm; devfsadm -C
  7. newfs /dev/rdsk/[usbslice], where usbslice is the same as the usbnode, except replacing “p0″ for “s0″
  8. lofiadm -a /absolute/path/to/solarisdvd.iso
  9. mkdir /mnt/solmedia; mkdir /mnt/usbdrive
  10. mount -F hsfs -o ro /dev/lofi/1 /mnt/solmedia (you should find the contents of the ISO available in /mnt/solmedia now)
  11. mount -o nologging,noatime [usbslice] /mnt/usbdrive
  12. cd /mnt/solmedia
  13. find . | cpio -pdum /mnt/usbdrive
  14. /sbin/installgrub boot/grub/stage1 boot/grub/stage2 [usbslice]
  15. boot from the USB drive. The installer will fail before the files are copied to the local HDD. When it does, you’ll need to remount the USB drive to /cdrom (I’m not exactly sure why): mount -o ro /dev/dsk/c1t0d0s0 /cdrom (the device node might be different, give a few different ones a try until the Solaris DVD files are attached to /cdrom)
  16. install-solaris to complete the install. Be sure to uncheck your USB drive as a target install drive, or else you’ll overwrite the drive before it has a chance to complete the install!
  • Anonymous

    you should more clearly indicate this is for Solaris for Intel/AMD cpus… note that Sun SPARC machines cannot boot from the USB port.

    Check out the “Milax” port of Opensolaris if you want to see some cool options for USB install images (for Solaris on Intel/AMD).

  • http://www.netmusician.org joe

    Thank you, leaving out the Intel/AMD CPU requirement was an omission on my part, this has been corrected. I’ll check out Milax at some point too, I appreciate you making me aware of that, although there seems to be some dispute over whether it is a good idea to run OpenSolaris, as opposed to Solaris, in production environments?