OpenSolaris comes alive on a ramdisk
I have been awfully busy for a while. A big list of things on my plate have been keeping me up till midnight for some time. I did not even find time to post anything here. Among other things I have started working on an OpenSolaris based distro to help kick-start an OpenSolaris community in Bangalore, India, since there is a lot of interest for such a thing here. I have now reached a small milestone and am able to boot up a multiuser OpenSolaris environment from CD and get a working root login.
My approach has been to create a minimal root filesystem inside a file and boot OpenSolaris off the resulting ramdisk. The following is a brief list of what I had to do to get here:
Started off with reading the Grub based new boot architecture details. The crucial bit of info I learned here is that Solaris will try to boot from the initial ramdisk if the the "bootpath" property is missing from the bootenv.rc file.
Get hold of the latest Solaris Express build and created a script to create a miminal root filesystem in a file. Gzipped the file and added a Grub entry and rebooted.
All I got on my first boot off the ramdisk were errors from Kernel and finally a hang.
Lots of debugging and endless reboots later I managed to get rid of all the issues and had a complete miniroot/ramdisk that booted into a multiuser Solaris Nevada environment and allowed user logins.
Next I turned my attention to OpenSolaris and quickly built it using the nightly script. I also got hold of the closed binaries.
Now I had to face a stumbling block: The critical Math library (libm) is absent. OpenSolaris will not work without it. At first I thought of getting hold of the libm in glibc and port it to Solaris, but it is a sufficiently complex task made more difficult by the fact that GNU libm is tightly integrated into the glibc source requiring a full port of glibc! After looking at few other options I finally grabbed hold of FreeBsd. I have managed to hack FreeBsd'd libm enough to make OpenSolaris work with it, just has been done for the other distro SchilliX.
Build the OpenSolaris miniroot and create a botable iso using mkisofs.
So I now have a bootable CD with a ramdisk that boots OpenSolaris off the ramdisk. Though there are a bunch of issues giving some headache.
The next steps I need to do are: fix all the issues and get a fairly complete OpenSolaris environment, add open-source software, make this into a LiveCD distribution with X11+Gnome desktop. I will probably use the recently released JDS sources having Gnome 2.10 . Though the lack of the xsvc driver takes this into unfamiliar territory. The aperture driver looks like a workable replacement. Finally I intend to document this in detail and put up all my scripts, modified sources and build environent for others benefit and to make this into a community project.
How did you go about building the other two key pieces that aren't released yet (in addition to libm): Netscape portable runtime libraries and (according to a discussion on the opensolaris forum) a few required SMF files are missing too.
--Eric
Posted by Eric Boutilier on August 15, 2005 at 11:53 AM PDT #
Posted by Moinak on August 16, 2005 at 06:57 AM PDT #
Posted by Ujjaini on June 20, 2007 at 09:07 AM PDT #