OS Hacking and more.


Making a dd'able OpenSolaris USB image

Recently I was sitting and thinking [deeply..zzz] about how it was that people who didn't already have OpenSolaris would be able to try out the OpenSolaris USB based installer distribution (the one made by distroconstructor & co.). You need to run the usbcopy script to even get the USB image copied to your usb stick, and that script uses all kinds of crazy Solaris-specific features...
Man, I really wanna be able to create this USB distro from linux...
So, instead of trying to rewrite the script and its oodles of sophisticated functions, why not just run it once, and create a disk image of its product--a dd'able OpenSolaris USB image!
That's exactly what I did. Basically, if you want to be able to create OpenSolaris USB distros from linux, all you need to do is get your hands on an image created in this method:
In Solaris, run usbcopy on [name of osol distro].usb, with a USB stick target that is ~1Gb in size.
Then once you've create that stick, dd if=[device path for stick] of=image.img bs=4096 , and you've created the new disk image, image.img. image.img has Grub and the MBR bits necessary to boot(which the .usb lacks), and can then be dd'ed to any usb stick from any operating system. So only one person needs to build one dd'able OpenSolaris image, and share it.
And the world can mass produce usb install kits for OpenSolaris regardless of a user's current operating system.

Note, if your looking to carry around OpenSolaris in your pocket, I strongly suggest that you use my persistent USB live boot instead of the above usb distro. See the concept for it here, and then pick up my automated installer. The difference is simple, my version is behaves like the version you install on a hard disk, which means you can install applications and keep all your data(oh, and you get ZFS too), where the other version is an installer tool.

I'm working on a less cludgy way to do this, involving modifying usbcopy to operate on disk images as opposed to usb sticks...that would make life nicer...we'll see...


Harriet said...

That's a brilliant idea to create a usb image. I borrowed one of my friend's promotional usb sticks, as she seems to always have a few spare for some reason, and followed your instructions and it all worked fine! Thanks for your help.

Anonymous said...

I've got loads of promotional usb sticks lying around, So I'll follow your instructions and see how I get on.

Thanks for the tips.