|
|
The following is a technical recipe or "howto" document for one successful procedure to install the Red Hat Linux distribution onto a Sun Cobalt Qube 3 model internet appliance.
Warning! Use this procedure at your own risk.
- Red Hat on a Qube 3: Introduction
- Using Flashtool to Upgrade Qube 3 Proms
- Inside the Cobalt GenIII Kernel RPM, Part 1: Preparing a Sandbox
- Inside the Cobalt GenIII Kernel RPM, Part 2: Making the Ext3 Patch
- Inside the Cobalt GenIII Kernel RPM, Part 3: Building to Spec
- Installing Red Hat Linux, Part 1: Stock Distribution
- Installing Red Hat Linux, Part 2: Customization for Cobalt
- Installing Red Hat Linux, Part 3: Booting the Qube 3
- Ideas for Managing Red Hat Linux on the Cobalt Qube 3
At this stage, the IDE hard drive from the Cobalt Qube 3 appliance has been filled with a fresh installation of the Red Hat Linux 7.2 distribution software.
Do not reboot the desktop machine with the newly installed distribution intended for the Cobalt Qube 3 hardware. Doing so may record inaccurate configuration data from the desktop machine's architecture.
Instead, reboot the desktop machine using the Red Hat Linux 7.2 Install CD 1 again. Specify entry into the Linux Rescue Mode from the CD 1's special LILO prompt.
You will need the following files accessible on the desktop machine. It would be most convenient if they were all recorded on a CD-R, or on a second hard drive to be mounted temporarily. With a little work, it's also possible to configure the network and use wget to fetch the files across a LAN.
[From the stock Red Hat Linux 7.2 RPMs on the Installation discs:] glibc-*.i386.rpm mgetty-*.i386.rpm (and any other i386 RPMs where a i686 RPM also exists, such as openssl) [From the kernel build process, and/or from Tim Hockin's site:] kernel-2.4.*.i386.rpm [From the stock Cobalt Qube 3 RPMs available on the OS Restore Disc:] panel-utils-*.i386.rpm panel-scripts-*.noarch.rpm
Once the rescue mode environment starts, a few tools will automatically ask or detect a few preferences.
Accept the opportunity to mount and chroot the hard drive's filesystems. These mounted filesystems will appear underneath the /mnt/sysimage directory in the rescue mode. The rescue mode will start a new limited single user shell (called hush) for the administrative work described here.
Mount the CD-R, or the secondary hard drive containing the required upgrade files. Or, to use wget over a network, configure the ethernet interface now. The details for this step obviously vary from device to device.
It is important to be chroot'ted into the mounted image of the installed system at this point, so that RPM will install packages to the correct locations.
At this point, the drive is ready to accept all of the customizations required to turn a stock Red Hat Linux installation into a configuration suitable for the Cobalt Qube 3 appliance's architecture.
Remove or quarantine the default /etc/modules.conf file that was installed by Red Hat's installer.
# mv /etc/modules.conf /etc/no-modules.conf
Install the custom Cobalt Qube 3 Generation III 2.4 series kernel built or acquired previously.
# rpm -i kernel-2.4.*.i386.rpm
Ensure the glibc to be run on the Cobalt Qube 3 Athlon class hardware is not of the i686 architecture. This entails forcing the i386 architecture glibc files, and then removing or quarantining the i686-specific library files. You must also do this for any other RPMs that ship both i386 and i686 versions.
# rpm -i --force glibc-*.i386.rpm # mv /lib/i686 /lib/no-i686Warning! If the above step is not performed properly, the best diagnostic is a large number of "Segmentation fault" errors reported in /etc/rc.sysinit, as seen in the first boot of the Cobalt Qube 3 appliance. This is one major troubleshooting benefit of configuring and using the secure serial console features of the Qube appliance.
If not done during the earlier installation, install the Red Hat mgetty package for secure serial console capabilities now.
# rpm -i mgetty-*.i386.rpm(Reports indicate that the agetty package installed by default for Red Hat Linux may also work satisfactorily, though this procedure has only been tested with the mgetty package.)
Add the lcd panel utilities (most notably lcd-write and lcd-sleep) from the Cobalt Qube 3 OS Restore Disc.
# rpm -i panel-utils-*.i386.rpmSome copies of the Cobalt OS Restore Disc may have multiple versions of the panel-utils and panel-scripts packages. Find and use the most recent for the architecture. The "pacifica" script packages are for Raq architectures, and the "carmel" scripts are intended for Qube architectures.
Add a line "ttyS0" to the end of the /etc/securetty file to enable the physical serial port for secure console operation.
# vi /etc/securetty
+ ttyS0
Add a line of type "TO" to the /etc/inittab file to start a re-spawnable mgetty-based serial console login process.
Also remove the six Red Hat standard mingetty virtual console screens that will not run on a Cobalt Qube 3. These are mostly harmless, but will try unsuccessfully to respawn several times each, every five minutes, adding noisy messages to the log files and serial console screen.
# vi /etc/inittab
- 1:2345:respawn:/sbin/mingetty tty1 - 2:2345:respawn:/sbin/mingetty tty2 - 3:2345:respawn:/sbin/mingetty tty3 - 4:2345:respawn:/sbin/mingetty tty4 - 5:2345:respawn:/sbin/mingetty tty5 - 6:2345:respawn:/sbin/mingetty tty6 + TO:2345:respawn:/sbin/mgetty -x0 -r -s 115200 ttyS0
Inspect the /dev/lcd device entry. This should have been created during the installation of the panel-utils package, but could be created with mknod now if required. (The command would be mknod /dev/lcd c 10 140 if necessary.)
# ls -l /dev/lcd crwxrwxr-x 1 root root 10, 140 Oct 6 2000 lcd
When booting a headless device, if the filesystems are marked "dirty" or improperly unmounted, they should be checked for inconsistencies. This can be difficult if the administrator cannot interact with the system, as is usually the case on a Cobalt Qube 3 appliance.
ext2: To use the experimental Cobalt kernel as-is, which supports ext2 but not ext3, then the following step is recommended to force filesystem checks on each boot.
ext3: To use the experimental Cobalt kernel, rebuilt to support ext3 journalling on all filesystems, the following step is not required. Using a journalling filesystem is highly recommended for headless systems such as the Cobalt Qube 3, as it helps to ensure filesystem integrity even when unmounted improperly.
If using the ext2 format, create a permanent reply file for the filesystem check. This is not required if all data partitions are using the ext3 format.
# echo "-y" > /fsckoptions # chattr +i /fsckoptions
Exit any and all rescue mode shells. Some desktop systems may not correctly power down themselves in rescue mode. Synchronize and commit all changes to the drives, unmounting all partitions if possible. Then power down the desktop machine.