Skip to main content.
Google custom search

NetBSD/cobalt Frequently Asked Questions

General Questions

Other sources of information


General Questions

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

The easiest way is to use the Restore CD. If you don't have an i386 server or would like to install manually, use the following procedure.

  • set up an NFS server to serve a diskless filesystem and (optionally) the kernel
  • repartition the drive, set up filesystems, and extract the sets with sysinst

To configure a server for netboot, see the NetBooting question.

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. This partitioning is handled by sysinst during installation.

The last step is to configure the system. The afterboot(8) man page and 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) 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. Pressing and holding all four cursor buttons while powering on boots the kernel /usr/games/.doug .
  3. Pressing and holding the left and right cursor buttons while powering on executes the command bfd /boot/vmlinux.gz root=/dev/nfs nfsroot=/nfsroot , resulting in a netboot. On RaQ 1s, the default kernel name is vmlinux_RAQ.gz and on RaQ 2s, it is vmlinux_raq-2800.gz .

How do I netboot? (top)

Break into the debugger (see above) and then you can netboot with, e.g., the following command:

  # bfd /netbsd.gz nfsroot=/home/raq/root

The firmware is picky in general, and especially about syntax, 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 executable and in that directory. You will also need to set up RARP and DHCP. Once the kernel is loaded, the data provided by DHCP is used to mount the root filesystem. Here is a DHCP entry that is known to work:

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 for more information about setting up a diskless environment.

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 approximately 1000000/2500000 bytes compressed and uncompressed, respectively.

Also, various models expect different filenames for the kernel as noted below.

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 this posting by Andrew Gillham for more details).

The default autoboot process loads a gzip'ed ELF kernel or boot loader 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 must always be gzip'ed.

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

How can I boot a non-default kernel? (top)

NetBSD/cobalt has a native bootloader and uses it, so you can just specify an alternative kernel at the bootloader prompt.

If you don't use the bootloader and are still loading your kernel directly, you can boot a non-default kernel (see above), with the following steps:

  • Copy a compressed kernel to, e.g., /boot/test.gz on the ext2 partition that has the usual kernels
  • Shut down the system
  • At the console, type:
      # bfd /boot/test.gz

Note that the firmware has a size restriction when loading a kernel directly, so it's strongly recommended that you use the bootloader.

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

The firmware basically needs:

  • An "FDISK" style partition table with a "Linux native" first partition is formatted as ext2fs.
  • /boot/vmlinux.gz -- holds the gzipped kernel or boot loader (in Linux partition)
  • /boot/vmlinux_RAQ.gz -- alternative name for RaQ 1
  • /boot/vmlinux_raq-2800.gz -- alternative name for RaQ 2
  • /usr/games/.doug -- optional backup kernel (in the same Linux partition)

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 compressed kernel or boot loader held at /boot/vmlinux.gz.
  2. Linux swap: This can be used later to swap into when NetBSD is installed; saves setting up a NetBSD swap partition. Identifies as /dev/wd0f.
  3. Linux /var: This 200MB partition has some data on it that you may want to leave in case you need to go back to Linux. Identifies as /dev/wd0g.
  4. Linux /home: This >3GB partition has very little data on and can be copied over to the Linux /var partition so that you can use this partition as NetBSD's system disk. Identified as /dev/wd0h by default, installation steps below.

All the Linux partitions have ext2 filesystems, 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 command 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 needs 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:", the filesystem type to 4.2BSD, 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. You need to extract at least etc, base and kern. comp is strongly recommended, and the others (text, games, man, xbase, ...) don't hurt. The sets are in the cobalt/binary/sets directory of the latest NetBSD release.

  # tar pzvxCf /mnt etc.tgz
  # tar pzvxCf /mnt base.tgz
  # tar pzvxCf /mnt kern.tgz

After that, device nodes need to be created:

  # cd /mnt/dev
  # sh MAKEDEV all

The final step is to ensure we can boot a NetBSD kernel with the bootloader. It's also recommended to create an entry in (/mnt)/etc/fstab to mount the Linux root partition:

  /dev/wd0e /altroot ext2fs rw 0 1

Compress the boot loader extracted from base.tgz and put it on the Linux root partition.

  # mount /altroot
  # cd /altroot/boot
  # mv vmlinux.gz vmlinux.gz.linux
  # cp /usr/mdec/boot vmlinux
  # gzip -v9 vmlinux

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 set up /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 you choose to do this we do, of course, not take any responsibility in the event that something goes wrong.

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, 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 requires only a Z85C30 serial chip, a DS14C239, and a few resistors and capacitors to build.

This schematic uses 44-Pin PLCC package 85C30, but maybe it's easier to use 40-Pin DIP package to build the interface from scratch. You can also use other major RS232C serial line drivers like MAX232C or compatibles with some modification.

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! For example, if you have a big and a small module, and you put them 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

How do I install without a serial cable? (top)

The easiest way is to use the Restore CD. If you don't have an i386 server or would like to install manually, use the following procedure.

Prepare netboot host:

  1. mkdir /nfsroot
  2. ftp ftp.NetBSD.org/.../{base.tgz, etc.tgz, kern-GENERIC.tgz}
  3. tar zxpf base.tgz; tar zxpf etc.tgz; tar zxpf kern-GENERIC.tgz
  4. cd dev; MAKEDEV all
  5. cd etc ; edit rc.conf to enable multiuser boots, inetd, telnet. Add secure lines to /etc/ttys. Edit fstab to:
    10.10.10.10:/nfsroot    /       nfs  rw 0 0
    
  6. mkdir /nfsroot/boot
  7. copy a bootloader in usr/mdec directory
  8. gzip and rename the bootloader properly. For Qube2: vmlinux_raq-2800.gz
  9. edit /etc/dhcpd.conf. You'll need at least the following:
    subnet 10.10.10.0 netmask 255.255.255.0 {
    	range 10.10.10.125 10.10.10.135;
    	option routers 10.10.10.10;
    }
    host qube {
    	hardware ethernet 0:10:e0:xx:yy:zz;
    	fixed-address 10.10.10.130;
    	filename "/vmlinux.gz";
    	option root-path "/nfsroot";
    }
    
  10. edit /etc/exports and add:
    /nfsroot -maproot=root 10.10.10.130
    
  11. enable nfs and dhcpd on host server.

Netboot the qube:

  1. hold down the two left-right arrow buttons.
  2. hopefully, all has gone well and you should be able to bring it up and telnet in. Use tcpdump or net/wireshark to check.

Do the actual install:

  1. Run fdisk -u wd0 . Make a small Linux partition and a large NetBSD one.
  2. Run disklabel -i -I wd0 . Configure to suit.
  3. newfs_ext2fs -O 0 /dev/wd0e
  4. newfs /dev/wd0a and so on.
  5. mount /dev/wd0a /mnt
  6. cp or tar everything onto /mnt
  7. cd /mnt/etc and edit files so that it doesn't try to netboot anymore. Change fstab , set up ifconfig.* files if needed.
  8. umount /mnt; mount /dev/wd0e /mnt
  9. mkdir boot . Copy gzipped bootloader as /boot/vmlinux.gz or whatever.
  10. reboot

Everything should now come up. You have a NetBSD system installed on your qube/raq.

Major gotchas: /etc/ttys must have secure added. Enable telnet. Check various names of the kernels.

How do I create a Restore CD? (top)

Please see the Restore CD HOWTO for detailed instructions on how to create your own Restore CD.


Other sources of information

Diskless NetBSD HOW-TO (top)

NetBSD Serial Port Primer (top)

Homepage of the Official Cobalt users group (top)

The TeamRushmere TeraQube2 (top)

Step by Step instructions on turning the Cobalt Qube2 into a really useful server : http://www.teraqube.co.uk/.

Resources from Sun Cobalt (top)