NetBSD/cobalt Frequently Asked Questions

It is intended for this to become a repository of frequently asked questions (and answers) specific to NetBSD/cobalt.

General Questions

Other sources of information


General Questions


How do I install on my fresh Cobalt? (top)

Until an install kernel is built you will have to do everything manually. This includes:

If you are unfamiliar with NetBSD or how to layout portions of the system, take a look at The NetBSD Guide.

Since the kernel does not have the ramdisk image to support an installer it has to have its root filesystem provided externally. The NFS server must be able to serve out not just files, but also device nodes (/dev entries). This may not be possible with non-Unix-like NFS servers. First one needs to prepare the server and then netboot the kernel. See the NetBooting question for details. After setting up the diskless root, you will want to copy the sets over for easy installation.

The original disk in the cobalts came partitioned for Linux. The first FDISK partition is special (Linux root (/)) and must always exist. This is because the firmware looks to there for the kernel to boot. The remaining partitions can be removed and the space used for NetBSD. See the preparing the harddisk for installing NetBSD question for instructions.

Note: If your system did not have Linux on it before, tools to build an ext2fs in the first FDISK partition can be found in pkgsrc under pkgsrc/sysutils/ext2utils

The last step is to configure the system. The NetBSD Guide can assist you in this.

What can I do with the front panel buttons? (top)

  1. Hold the reset button ("pencil" button left of the keypad area on the front) in while powering on to toggle on/off the firmware console on the serial port. It runs at 115200 bps, 8N1. After changing that setting, the machine needs another power-cycle to actually use the new setting.

    Press the space bar while the diagnostics run to halt the autoboot process.

    Type ? at the firmware prompt to get a list of commands.

  2. Holding in all four cursor buttons while powering on boots the kernel /usr/games/.doug .

  3. Holding in the left and right cursor buttons in while powering on executes the command bfd /boot/vmlinux.gz root=/dev/nfs nfsroot=/nfsroot, resulting in a netboot. On RaQ 1's, the default kernel name is vmlinux_RAQ.gz and on RaQ 2's, it is vmlinux_raq-2800.gz.

How do I do a netboot? (top)

Break into the debugger (see above), you can netboot with e.g. with the following command:
bfd /netbsd.gz nfsroot=/home/raq/root

The firmware is picky about syntax and in general, so if things fail mysteriously, try to conform to the conventions described above. For netbooting, you need to NFS-export the directory given to "nfsroot=", and the named kernel ("/netbsd.gz") needs to be in that directory. You will also need to setup rarp and dhcp. Once the kernel is loaded with the command line values, the data given via DHCP is used to mount the root filesystem. Here is a DHCP entry that is known working:

host raq {
        hardware ethernet 0:10:e0:0:52:62;	# raq MAC
        fixed-address 10.0.0.15;		# raq address
        filename "/netbsd.gz";			# kernel name in root-path
        option root-path "/home/raq/root";	# absolute dir on nfs server
        server-name="10.0.0.3";			# IP of nfs server
}
See the Diskless NetBSD HOW-TO.

Are there any restrictions on the kernel that can be loaded? (top)

The firmware can only load gzipped kernels, and they have to be smaller than about 1000000/2500000 bytes compress/uncompressed.

Also, various models expect different filenames for the kernel as noted above. You can use the /usr/mdec/installboot script to create them all.

What's the process when booting from local disk? (top)

The disk is expected to have an "FDISK" style partition table with a "Linux native" (ID 131) partition with an ext2fs (old style, pre-Linux 2.2; see posting by Andrew Gillham for more details).

The default autoboot process loads a gzip'ed ELF kernel from /boot/vmlinux.gz (or /boot/vmlinux_RAQ.gz or /boot/vmlinux_raq-2800.gz) from the EXT2 filesystem on the first MBR partition on the primary disk.

There is no provision for changing the boot path beyond disabling autoboot and the kernel (or the boot loader, if/once we should write one) must always be gzip'ed.

When there is no NetBSD disklabel on the disk, the four MBR partitions are mapped to [e-h].

How do I prepare the harddisk for installing NetBSD? (top)

The firmware basically needs:

Everything else on the Linux filesystem can be trashed as it is totally unnecessary. You should be able to just fdisk/partition/newfs and copy a kernel onto the new filesystem. You shouldn't need to do a complete install on the disk.

The disk that comes in the Raq2 has four partitions:

  1. linux root (/): Recognizes as /dev/wd0e when there's no NetBSD disklabel on the disk, e.g. when doing a netboot. This partition has the bootable kernel in compressed for in /boot/vmunix.gz.
  2. linux swap: This can be used later to swap into when NetBSD is installed, saves setting up a NetBSD swap partition. Identified as /dev/wd0f.
  3. linux /var: This 200MB partition has some data on it that I decided to ignore, and keep on the disk in case I need to go back to Linux. Identified as /dev/wd0g in default disklabel.
  4. linux /home: This >3GB partition had very little data on it that I copied over to the Linux /var partition so that I can use it for NetBSD's system disk. Identified as /dev/wd0h by default, installation steps below.

All the Linux partitions are of ext2 filesystem, and they can be checked (if needed) and mounted from NetBSD with:

	fsck -t ext2fs /dev/wd0e
	fsck -t ext2fs /dev/wd0g
	fsck -t ext2fs /dev/wd0h
	mount -t ext2fs /dev/wd0e /mnt
	mount -t ext2fs /dev/wd0g /mnt/var
	mount -t ext2fs /dev/wd0h /mnt/home
Before installing NetBSD, it is recommended to back up the data of the Linux /home partition to the Linux /var partition. Then, use NetBSD's "fdisk -u" comman to change the partition ID from 131 (Linux userland) to 169 (NetBSD). Following a reboot to get the new partition data, a disklabel can be written:

	disklabel wd0 >x
	disklabel -r -R wd0 x
The disklabel now lacks a NetBSD root partition (wd0a), and we use the old Linux home partition (wd0h) for that. Just change the "h:" in "disklabel -e wd0" to "a:" and you're set. Next, create a filesystem and mount it:
	newfs /dev/wd0a
	mount /dev/wd0a /mnt
After that, the NetBSD sets can be extracted from NFS. You need to extract at least etc, base and kern, comp is strongly recommended, the others (text, games, man, xbase, ...) don't hurt. The sets are in the "cobalt/binary/sets" of the latest NetBSD release:
	tar tar pzvxCf /mnt etc.tgz
	tar tar pzvxCf /mnt base.tgz
	tar tar pzvxCf /mnt kern.tgz
After that, the "/dev" dir needs to be populated:
	cd /mnt/dev
	sh MAKEDEV all
The final step is to create a bootable kernel in the right place. For that, we compress the kernel from the "kern" set, and put it on the Linux root dir. Setting up an entry in (/mnt)/etc/fstab to do so is recommended:
	/dev/wd0e /altroot ext2fs rw 0 1
With that line in (/mnt)/etc/fstab, we can mount the Linux root partition, and drop our kernel in the expected place:
	mount /altroot
	cd /altroot/boot
	mv vmunix.gz vmunix.gz.linux
	cp /netbsd vmunix
	gzip -v9 vmunix
Note that the kernel needs to be presend (and in sync!) in the following places:

After these steps, the firmware should be able to find the kernel and boot it:

	reboot
What follows is that the system will boot and needs to get configured. If you have trouble mounting the root filesystem read/write, the command to get that is "mount -u /dev/wd0a /". Now setup /etc/rc.conf and enjoy!

Sorry, there's no all-singing, all-dancing install-routine (yet).

Serial Interface for the Qube2700 (top)

The Qube2700 is shipped without any serial interface. It is however possible to construct one by following these instructions. Should

This serial interface is however not a full I/O serial due to both hardware and software limitations. It can only be used while talking with the boot ROM or reading console about which can come in handy while debugging.

In your Qube2700 you should find a print on the PCB as (or similar):

        Cobalt Microserver, Inc.
        CPU Board 850-00101

You would then have a 18 or 20 pin header titled "SCC CON" adjacent to the AMD 28F040 chip. The pinout of the header is as follows:

            memAD0  2    1   +5V
            memAD1  4    3   Dadr0
            memAD2  6    5   Dadr1
            memAD3  8    7   serialInt_low
            memAD4  10   9   serialClk
            memAD5  12   11  serialCs_low
            memAD6  14   13  tied to devWr_low
            memAD7  16   15  no-connect
         devRd_low  18   17  ground
         devWr_low  20   19  ground

The pin 20 and pin13 tie is because there are some systems with 18-pin headers, and some with 20-pin.

The schematic is made with OrCAD and requires only an 85c30 serial chip, a DS14C239, and a few resistors and caps to build.

The system hangs at random times (top)

If you experience weird, random hangs when accessing the disk (e.g. via disklabel), when doing NFS writes etc., have a look at the order of memory modules in your machine! E.g. if you have a big and a small module, and you put them in in the wrong order, the "BIOS" will complain about that:
 5.Bank 0:.................................16M
 6.Bank 1:.................................0M
 7.Bank 2:.................................16M
 8.Bank 3:...............................**Simm0 must be >= Simm1**
The above example is for a 16MB module in the slot near the case, and a 32MB module in the other slot. With such a config, you can experience all sort of weird problems. If you exchange them, all will be good. The boot message should be:
 5.Bank 0:.................................16M
 6.Bank 1:.................................16M
 7.Bank 2:.................................16M
 8.Bank 3:.................................0M

Where can I find the latest snapshot of NetBSD/cobalt? (top)

Check out ftp://ftp.netbsd.org/pub/NetBSD/arch/cobalt/.

How do I get "make install" working for the kernel? (top)

The kernel Makefile shipped with the cobalt port can be tuned to actually install a kernel into the right location. For that to happen, put the following into your /etc/mk.conf:

# Determine machine name. Could as well hardcore different
# install-kernel-machinename install targets for different machines.
MACHINE_NAME!=	uname -n

# Place where the ext2fs partition is mounted, there should be a 
# "boot" subdir where the kernel "vmlinux.gz" is located
BOOTDIR?=	/altroot/boot

# Build name for new kernel - can do something more exciting with
# using date etc., override by setting in /etc/mk.conf.
.if !defined(NEWKERNEL)
NEWKERNEL!=     echo vmlinux-`sed -n < vers.c '/osrelease/s/.*"\(.*\)".*/\1/p'`-`date +'%Y%m%d'`-`cat version`.gz
.endif

install-kernel-${MACHINE_NAME}:
	gzip -c9 netbsd >${BOOTDIR}/${NEWKERNEL}
	rm -f ${BOOTDIR}/ovmlinux.gz
	ln ${BOOTDIR}/vmlinux.gz ${BOOTDIR}/ovmlinux.gz
	ln -f ${BOOTDIR}/${NEWKERNEL} ${BOOTDIR}/vmlinux.gz
	rm -f /netbsd
	cp netbsd /netbsd		# for vmstat and friends only

With that, 'make install' should put the kernel into the right location(s).

Up to NetBSD/cobalt Port Page
NetBSD Home Page
NetBSD Documentation top level

(Contact us) $NetBSD: faq.html,v 1.11 2001/05/23 02:44:03 hubertf Exp $
Copyright © 2000 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.