Navigation

 

Linux Kernel Versions

Toolbox

Gentoo Install

From Parvi - Open source software and patches

Jump to: navigation, search

Contents

Introduction

Back when I first had thoughts of running Gentoo on a Cobalt RaQ 3i that was given to me, my only limit was the kernel. I was limited by the original ROM which knew not how to deal with 2.4.x and 2.6.x kernels. So, much thanks to the Cobalt ROM team over on SourceForge for pushing ahead after Sun pulled out.

Everyone said it could not be done, that the 2.6.x kernels would never run on a Cobalt. Well, I'm persistant and have time to burn. And I burned it; 8 hours of it. For 8 hours I dealt with compiler errors, kernel panics, and booting kernels over a serial console. In the end I was left with a working 2.6.8.9 linux kernel booting Gentoo on a Cobalt RaQ 3i. Here's to the ones who said it could not happen, let them gawk at where this "project" has gone.

This is a culmination of all the information needed to successfully install and boot Gentoo linux on a Sun Cobalt RaQ 3, 4, or some subversion thereof.

Foreward

Currently, the only method to install Gentoo to a Cobalt is to pull the Cobalt's drive(s) and put it/them in a secondary build system. While this is not ideal from a physical work aspect, it does typically speed up the build process. Work is under way to contruct an NFS netbootable LiveCD to use as a platform for a non-invasive installer.

Assumptions

This guide assumes you are familiar with the Gentoo Handbook covering general installation. It also assumes you have a second computer you can use to build the operating system on. Furthermore it assumes you will have no problem rebooting this second computer, unless you have a USB to IDE adapter.

Pre-install Tasks

Before you begin installing the operating system, you need to update your ROM image. I've written a guide on how to do this. Take heed the warnings, I'm serious.

Pull the drive

Once you've successfully updated the ROM image, you can pull the primary drive from the Cobalt and place it in your build system. I know this is inconvenient, but for now, it's what you need to do. Now go get that screw driver and have some fun.

Boot the build system

It's now time to boot up your build system using the Gentoo LiveCD, available from your local mirror service. You'll want to get the system on the internet, helps a bit when trying to download stuff.

Installation

Disk Partitioning

Partitioning of a disk for a Cobalt requires some thought and a little knowledge about how you can break things in the future. The biggest issue is updating your kernel; do it wrong, the system won't boot, and you either get to pull the drive again or send a kernel via the serial console (not fun). So, it would be prudent to have two boot partitions; one to have a known bootable kernel on, and another to have your new kernel reside on. Call it a backup, or a life saver... We'll call it a good idea.

Your boot partitions should be about 32MB each (for good measure), swap should be about two times the size of your RAM (less is fine), the rest is up to you (I would make it / since it's never fun to deal with extended partitions). If you have a second disk in your Cobalt, you can always make that /home, keep user data seperated. Or if you feel like playing with software RAID, go for it, but I'm not going to cover that here.

My RaQ 3i has two 30GB drives, here's my layout:

   Device   Boot   Start     End     Blocks   Id  System       Mount Point
/dev/hda1              1      63      31720+  83  Linux        /boot
/dev/hda2             64     126      31752   83  Linux        /bootb
/dev/hda3            127    1119     500472   82  Linux swap   (none)
/dev/hda4           1120   58168   28752696   83  Linux        /
/dev/hdc1              1    3649   29310561   83  Linux        /home

Partitions and file systems

The only real requirement regarding file system choice is that of your boot partitions. These MUST be ext2, there is no room for discussion on this. The bootloader kernel can only read ext2. Your root file system can be whatever your little heart desires, I like ReiserFS.

Unpacking your stage tarball, and beyond

At this point, you've got to make your choice on a stage file to start from. A stage 3 will go a heck of a lot faster, but you're currently limited to the x86 stage 3 (I do have a K6 version in the works). Stage 1's and 2's are almost not worth the extra time unless you really know what you're doing or enjoy stairing at your navel.

You can continue with a standard Gentoo installation all the way up to the point where you install your kernel. Don't forget to setup /etc/fstab.

Kernel configuration, compilation, installation

At the time of this writing the current Gentoo kernel tree version is 2.6.14-gentoo-r5, and the vanilla kernel is 2.6.14.5.

Which ever kernel you choose, you're going to want to patch the source tree with my kernel patch (for front panel LCD/LED/Button support, and motherboard device support). If your Cobalt has an Intel NIC, chances are the onboard checksum is wonky; so included with the kernel patch is my e100 driver patch; just enable CONFIG_E100_IGNORE_CSUM or choose the "Ignore Bad Checksum" option under the E100 network driver.

Regarding configuration of your kernel, I do have base configurations for the RaQ 3 and RaQ 4 that contain the required options for your system to boot. These do not include filesystem support. These should only have options added to them.

Once you've configured your kernel, issue the following commands:

# make vmlinux modules modules_install
# strip vmlinux
# bzip2 vmlinux
# cp vmlinux.bz2 /boot/

And be sure to double check the size of /boot/vmlinux.bz2. It needs to be less than 1800KB.

Playing Suzy House Maker

You're probably wondering, "What about lilo/grub?". Well, they're not needed. One thing about Cobalts is they don't have video cards, so Linux virtual console support is a waste of kernel space (remember we have only 1800k compressed to work with). Because of this, you need to comment some lines out of /etc/inittab and uncomment one or two others.

You will need to comment all of these lines:

c1:2345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux

Depending on how many serial ports your Cobalt has, you will need to uncomment one or two of these lines and change the "9600" to "115200":

#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100

In order to login as root via the serial console(s) you'll need to add the following to your /etc/securetty:

ttyS0
ttyS1

Also, because we have no video card we have no need of setting a console font, so:

# rc-update del consolefont

Final Configuration

So you can exit out of your chroot and shutdown your build system. Take hold of your drive and place it back in your Cobalt. Boot the Cobalt with a serial console attached.

When prompted to press the spacebar to enter the ROM menu, happily depress it as instructed. Enter the boot menu by typing "boot" and pressing Enter. You will need to set two devices in the ROM:

First, set your root partition via the following command (drive and partition are my own, your's may differ):

> set_root_dev hda4

Next, you'll need to tell the ROM which partition is your boot partition (drive and partition are my own, your's may differ):

> set_boot_dev hda1

Finishing the Job

Type "reboot" and you should be golden.

Copyright © 2005-2012 Jeff Walter