Installing Solaris from a USB Disk
By Tim Cook on Sep 06, 2008
I regularly do a full install of a Solaris Development release onto my laptop. Why full? Well, that is another story for another day, but it is not because the Solaris Upgrade software; including Live Upgrade; is lacking.
I decided I no longer see the sense of burning a DVD to do this; and I know that Solaris can boot from a USB device.
I used James C. Liu's blog as an inspiration, but the following is what I have found worked well to boot an install image located on a USB disk. You may also be interested in the Solaris Ready USB FAQ.
NOTE: This procedure only has a chance of working if you have a version of Solaris 10 or later that uses GRUB and has a USB driver that works with your drive.
- Set up an 8GB "Solaris2" partition on the USB drive using fdisk. Make it the active partition.
- Set up a UFS slice using all but the first cylinder of that 8GB
as slice 0 using format. Run newfs. Mount.
The first cylinder ends up being dedicated to a "boot" slice. I do not know what it is used for, perhaps avoidance of overwriting PC-style partition table & boot program.
- Mount the DVD ISO using lofiadm/mount (hint: google lofiadm solaris iso)
- Use cpio to copy the contents of the DVD ISO into the UFS
partition on the USB drive, e.g:
# cd <rootdir of DVD ISO> # find . | cpio -pdum <rootdir of USB filesystem>
- Run installgrub to install the stage1 & stage2 files from the DVD
ISO onto the USB drive
If the filesystem on your USB drive has mounted as /dev/dsk/c2t0d0s0 for example, then use:
# cd <rootdir of DVD ISO> # /sbin/installgrub boot/grub/stage1 boot/grub/stage2 /dev/rdsk/c2t0d0s0
- Boot off the USB disk. It uses the same GRUB install that would be on a DVD.
- Now, I can not remember whether the next step was either:
- Wait for the install to fail (unable to find distribution), or:
- Exit/quit out of installation
...but you need to get to a shell.
- Manually mount the USB partition at /cdrom
NOTE: your controller numbers are probably not as you expect at this point, so double-check what you are mounting.
- Re-start the install
I used "suninstall". I think you can use "solaris-install" instead.
The install seemed to run fine from there, however it went through a sysconfig stage after the reboot.
Then I ended up with one teeny problem - my X server would not start.
I discovered some issues with fonts, and then decided to check the install log. I discovered a number of packages had reported status like:
Installation of <SUNWxwfnt> partially failed. 19997 blocks pkgadd: ERROR: class action script did not complete successfully Installation of <SUNWxwcft> partially failed. Installation of <SUNW5xmft> partially failed. Installation of <SUNW5ttf> partially failed. Installation of <SUNWolrte> partially failed. Installation of <SUNWhttf> partially failed.
I have since pkgrm/pkadd-ed these packages (using -R while running the laptop on an older release with the new boot environment mounted), and all is now well.