Experiencing Linux on SPARC: The beginning...
By Martin Mueller on Jul 29, 2009
Since Linux is an ongoing hype, and since I found some spare time I decided to explore an unknown land (at least to me): How can one install a whole Linux system on recent SPARC gear? And, to not reinvent the wheel, the platform shall be a Logical Domain.
The first research targeted the available distributions. The Linux Kernel itself does have LDOMs support since 2.6.2x (IIRC it was 2.6.23), but the Kernel by itself is of little to no use at all. (The support for the sun4v architecture has been in 2.6 for a longer time, but besides the sun4v support one has to have support for the vnet and vdisk drivers.) Ubuntu had dropped support for sun4v/SPARC systems, my employer does not maintain it's own distribution or extend the support of existing (commercial) distros, so the most important distributions (SuSE and Redhat) were no choice.
This left me with free distros, namely
- Gentoo, which is a little freaky because one usually recomiles everything. But this recompilation makes it very "portable" and should provide optimal performance.
- Debian, which is well known in Linux land for being able to run virtually everything that is based on silicon and is easy to administer in daily operation
(I will not explore LFS which is even too freaky for me. Well, maybe I'll try that later too...)
Testing ground was a Niagara 2 based system in Sun-internal lab, right now it's actually a T5440 hosting my playground LDOMs (thanks to the simplicity of moving LDOMs around the actual system
doesn't matter much)
The only virtual services I used were:
root@batoka-labor,linux-boot>ldm add-vsw net-dev=nxge0 primary-nxge0 primary root@batoka-labor,linux-boot>ldm add-vds primary-vds primary
Both LDOMs had a straightforward setup (one core, 4G memory, virtual disk backed up by a ZFS volume):
root@batoka-labor,linux-boot>ldm create gentoo root@batoka-labor,linux-boot>ldm set-vcpu 8 gentoo root@batoka-labor,linux-boot>ldm set-mem 4G gentoo root@batoka-labor,linux-boot>ldm add-vnet main primary-nxge0 gentoo root@batoka-labor,linux-boot>ldm add-vdsdev /dev/zvol/rdsk/rpool/gentoo-root gentoo-root@primary-vds root@batoka-labor,linux-boot>ldm add-vdisk rootdisk gentoo-root@primary gentoo
I switched back and forth between the different boot CDs by simply changing the physical device backing up the virtual device cdrom:
root@batoka-labor,linux-boot>ldm add-vdsdev /root/linux-boot/install-sparc64-minimal-20090713.iso gentoo-cd-20090713@primary-vds root@batoka-labor,linux-boot>ldm add-vdisk cdrom gentoo-cd-20090713@primary gentoo
(The debian guest had the same configuration)