A unique Live Media Kit and Distro Constructor feature
By moinakg on Oct 20, 2007
Sometime back an interesting feature got added to the Live Media Kit. This kit allows one to take a Solaris Express install DVD and build a Solaris Express Live bootable DVD out of it. This kit has formed the basis of the initial prototype work that we did for Slim Install. Eventually we will be moving to using the Distro Constructor once it stabilizes. Though the Distro Constructor has taken the same core ideas and some of the actual logic from the Live Media Kit.
Towards the middle of last year I did some performance enhancements that dealt with laying out file data on the CDROM to reduce booting time. That is explained at "The BeleniX LiveCD Performance Story Part 3.
I used this technique for the Live Media Kit as well to gain big performance benefits. However initially I/O tracing required one to build a modified DVD image collect trace data and process it. This is typically been done for every subsequent BeleniX release. I spent some time looking at making it more automatic and did some initial changes to easily build I/O tracing enabled LiveCD/DVD images. Subsequently Dave Miner took those changes and refined them and got them into the Live Media Kit. This requires the DTraceToolkit to be present in the LiveCD/DVD image.
So now it is easy to boot an OpenSolaris LiveCD and select "Solaris (32 bit) I/O tracing" boot option in the Grub menu. One dosen't even have to build a tracing enabled image. The trace data gets collected into a file called traceout on the root filesystem on harddisk. This means that this has to be necessarily on a system that already has Solaris installed on the harddisk. Subsequently one has to run the "proc_tracedata" script in the LiveKit to build a mkisofs sortfile called iso.sort.
This, to my knowledge, is probably the first time that any LiveCD kit is making it so easy to do this optimization. Of course thanks in no small terms to DTrace. Similar optimization, though with a different logic, is done for many Linux LiveCDs as well but those sometimes lack in effectiveness and require system call tracing to collect huge trace data. Subsequently that tracedata is processed via cut-ing, sort-ing, awk-ind, grep-ing and so-on in a nightmarish shell pipeline. And this is mostly done manually by those LiveCD maintainers. More often than not folks re-mastering Linux LiveCDs complain that their re-mastered LiveCDs are slower to boot than the original.
With the LiveKit tracing is now a part of the startup scripts and is as easy as selecting a boot option as mentioned above. The script "live-devices-local" that replaces devices-local in the Live environment has code to enable tracing if that boot option is detected. Scroll to the end to see the actual code - it is quite simple. This means that DVDs that other folks create will boot as fast as the original without too much of work needing to be done.
And of course that has already gone into the distro constructor. This optimization does make a huge difference in the bootup time. You can checkout the DIstro Constructor mercurial repository from here: ssh://hg.opensolaris.org/hg/caiman/distro_constructor