How to install OpenSolaris on crappy USB disk, or joy of open source hacking ;)
By Lubos Kosco on May 25, 2009
So after some time passed since my tests of OpenSolaris on USB key/disk install I decided to try again.
This time however I only had a crappy Akasa Integral USB enclosure with some old 40GB disk (this device popped up as "Initio MK8025GAS USB Device" ) to be used as installation target.
You might ask why I call it crappy ... simply ... if you plug this disk into systems that don't care that much about standards it will work. However in Solaris it wasn't detected by rmformat, just dmesg confirmed its presence, but that was it.
With Milos Muziks help and Chris Gerhards neat scsi.d we figured out that the problematic one is not the usb driver(note that builds before 103 were unusable with it ), but scsa2usb driver which one might know as mass storage driver (or: SCSI to USB bridge driver , if I refer to man scsa2usb) which was showing that the device doesn't respond correctly.
With above troubleshooting done it was fairly easy to nudge Solaris to talk to such disk, just add this line at the end of
attribute-override-list = "vid=0x13fd pid=0x550 rev=0x312 reduced-cmd-support=true";
which will basically enable restricted SCSI commands for the device and then the usb disk will pop up in rmformat, or in format -e
Note that I got the vid, pid and rev from appropriate section of prtconf -Vp output.
Now the question was, how to get this "workaround" into some installer and install OpenSolaris on such disk.
First thing was to get a medium, that can be somehow modified, e.g. an USB installation image such as the one from genunix.org. Then I used an usb install stick creator from Hiroshi Chonan to get a bootable stick done ... but wait ... the stick didn't see my "crappy" usb disk!
Sooo ... I started my virtualbox instance of OpenSolaris, I plugged in the USB, told virtualbox to mount it to the virtual machine.
Once I mounted the USB disk, I found and backed up boot/amd64/x86.microroot from the media. Then I needed to edit the scsa2usb.conf inside this microroot.
First rename to .gz , then to gunzip , then lofiadm -a of the unzipped file, then a mount , then edit the file, add the proper line, then umount, then lofiadm -d , then gzip it and then move it back to USB flash as boot/amd64/x86.microroot. Then unmount the usb and you're ready to boot on "real iron". Note that I edited amd64 bit one, since amd64 bit kernel started for my installation (I am on Intel 64bit , but not Itanium), one would need to edit the boot/x86.microroot for 32 bit.
After this change on USB installer (see, if I was using CD installer this step would be a bit more harder ), you can easily install from USB key onto the crappy USB disk, which is now magically available and installer does it job (hooraayyy!).
After installation is done, you just reboot and enjoy - but keep the disk in the same USB port (otherwise you'll hit the bug with zfs boot and physical path which I think in current state just panics the kernel )!