Skip to content

Diskless Linux on a Sunblade 100

Initially written on 2006-05-17

On my other (x86/amd64) diskless machines, I use PXE with pxegrub. My setup is quite similar to (and inspired by) this one.

Now, on sparc machines, there is no BIOS nor PXE. But you don't need all that, since you have the Open Boot... This is how I managed to make my Sunblade 100 totally diskless (using a "vanilla" kernel, the latest version being currently 2.6.16.16).

Note: In this example, 10.0.0.10 will be my dhcp/nfs/tftp server which I will refer to as 'fileserver'. 10.0.0.30 is the sunblade.

- when configuring the kernel:
[*] Default bootloader kernel arguments (ip=dhcp root=/dev/nfs nfsroot=10.0.0.10:/diskless/sunblade)

(in "Networking" -> "Networking support" -> "Networking options")
[*]   IP: kernel level autoconfiguration
[*] IP: DHCP support
[*] IP: BOOTP support
[*] IP: RARP support

(in "File systems" -> "Network File Systems")
<*> NFS file system support
[*] Provide NFSv3 client support
[*] Root file system on NFS

Configure all other settings as you would do for a disk install, but make sure you compile your NIC driver in the kernel (not as module)

Then:
make
make modules_install
make tftpboot.img ROOT_IMG=/dev/null
(the resulting tftpboot.img will be in arch/sparc64/boot/tftpboot.img)

I copied tftpboot.img to fileserver as tftpimage-2.6.16.16, and added the following entry in my dhcpd.conf:
host sunblade {
hardware ethernet 00:03:BA:08:12:34;
fixed-address 10.0.0.30;
always-reply-rfc1048 on;
filename "sunblade/boot/tftpimage-2.6.16.16";
}


Finally, to net-boot your diskless Sunblade you'll need to enter
boot net:dhcp
in the Open Boot prompt. When you are happy with it, you can set it as default:
setenv boot-device net:dhcp cdrom disk net



Notes:

- apparently, instead of using make tftpboot.img you can just "elftoaout" vmlinux

- another alternative would be to use tilo, which comes with silo, to build the image

Gentoo sparc: sys-devel/kgcc64 vs. sys-devel/gcc-sparc64 (blocking each other)

If you get this:
[blocks B ] sys-devel/gcc-sparc64 (is blocking sys-devel/kgcc64-3.4.6)

Check this thread on the gentoo forums:
There are a couple of architectures on Gentoo that have a 32-bit userland, but need a 64-bit kernel compiler. kgcc64 is an attempt to provide one package for all of those architectures rather than the gcc- packages that exist now. The way we migrated over to this caused the issue you are seeing.

Basically, you'll need to
emerge --unmerge gcc-sparc64 && emerge sys-devel/kgcc64


TestDisk / PhotoRec: tool to recover lost files and partitions (Gentoo Linux)

Homepage: http://www.cgsecurity.org/

Description in portage: Multi-platform tool to check and undelete partition, supports reiserfs, ntfs, fat32, ext2/3 and many others. Also includes PhotoRec to recover pictures from digital camera memory.

Installation (Gentoo Linux amd64):

echo 'app-admin/testdisk ~amd64' >> /etc/portage/package.keywords
echo 'app-admin/testdisk jpeg ntfs' >> /etc/portage/package.use
emerge -av app-admin/testdisk

To use it, just run 'photorec' as root in a shell window. Despite the name, photorec will find and recover many files, not only pictures. You'll find the full list on the PhotoRec homepage.

I haven't tried TestDisk yet, but PhotoRec has been useful several times already.

Flash, RealPlayer & Firefox on x86_64 Gentoo

It's as simple as:
# required as of now to get Flash 9
echo 'net-www/netscape-flash ~amd64' >> /etc/portage/package.keywords
emerge -av netscape-flash
echo 'media-video/realplayer nsplugin' >> /etc/portage/package.use
emerge -av realplayer
echo 'net-www/nspluginwrapper ~amd64' >> /etc/portage/package.keywords
emerge -av nspluginwrapper

Now I just need to figure out how to get sound when realplay is launched from Firefox (it works with the Flash plugin or when realplay is launched from a regular shell).

Swiss Keyboard Layout in recent xorg ("AltGr doesn't work")

It took me a while to figure out what was going on, so I hope this can be useful to someone else...

In gentoo, you need to unmerge x11-misc/xkeyboard-config and emerge x11-misc/xkbdata instead. (I have xorg-x11 7.1)

Then your keyboard section in xorg.conf needs to look like this:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "ch(fr)"
EndSection


fr_CH will not work. well, it sort of worked, but none of the AltGr combinations would work, regardless of what I tried with xmodmap, despite the keycode returned by xev being correct etc.