Skip to main content.

NetBSD/i386 Frequently Asked Questions

Disk partitioning/booting

Specific hardware issues

Running the X Window System

Other NetBSD/i386 FAQs


Disk partitioning/booting

Boot floppy is too large to fit (top)

If you download the boot.fs image in 'ascii' mode (the default for the Windows FTP client and Netscape), it will automatically convert any newlines into carriage return/newline pairs, which renders the image useless (in addition to too large to fit onto the floppy).

If you are using the Windows FTP client you should type 'bin' to select binary mode before downloading the files.

If you are using some other method you may find it easier to download the boot.fs.gz file and use winzip to uncompress into boot.fs.

Using large drives on machines with a 540MB BIOS limit (top)

Enter a geometry of 1024/16/63 in the BIOS, and be sure to have your boot partition within the first 540M (so that the kernel can be loaded by BIOS routines). NetBSD will then be able to use the whole disk.

How to determine a "correct" disk geometry (top)

NetBSD uses the PC BIOS to load the boot program. In order for this to work both NetBSD and the BIOS must agree on the disk geometry (at least the part containing the boot partition).

The BIOS in PCs can only cope with a certain number of cylinders, heads, and sectors per disk (see table). (This includes BIOSes on SCSI cards).

Since many drives' real geometry cannot fit within these limitations a modern BIOS will 'translate' the geometry by picking fictitious values that multiply out to the same total size (or slightly less).

If a disk has a valid DOS MBR partition, (created by DOS, Windows, pfdisk, or similar) it will contain the "correct" BIOS geometry. NetBSD will use this as the BIOS geometry during sysinst. Unfortunately on an empty disk, or one without the MBR set up properly, NetBSD will get the BIOS geometry wrong. Ideally this information should be passed in from the boot program, but there is no certain method of determining the mapping of bios disk to netbsd disk, though it should be possible to improve on the current 0% hitrate.

One method of determining the "correct" translated geometry is to use 'pfdisk':

  1. Download pfdisk from ftp.NetBSD.org (or a mirror), in /pub/NetBSD/NetBSD-1.6.1/i386/installation/misc/pfdisk.exe.
  2. Run 'pfdisk 0' (0 is the first disk, 1 the second, etc).
  3. Type 'list'.
  4. Record geometry, reboot, and use for NetBSD.

BIOS disk parameter limits

Parameter Bits used Max value
Cylinders 10 1023
Heads 8 255
Sectors per track 6 63

(This limits drives to 8GBytes, at least from the BIOS' perspective).

Accessing Microsoft partitions (top)

NetBSD supports a number of different filesystems (for a complete list see fstab(5) including FAT, FAT32, NTFS4 and NTFS5 from Microsoft. Currently only read support works reliably for NTFS filesystems. Long filenames are supported on both FAT and NTFS.

To access another filesystem you have to set up a correct "disklabel" which tells the system where to find the data on the disk. With a correct "disklabel" you are able to "mount" it for use with NetBSD.

Setting up the disklabel

  1. Determine the disk containing the filesystem
    If you only have a single IDE/ST506 or SCSI disk it will be wd0 or sd0, if you have multiple disks you should check the output from "dmesg | more" to determine the correct disk's name.
  2. Determine the size and offset of the partition.
    Type "fdisk" and you will see the size and offset of the partitions which could be something like:
    NetBSD disklabel disk geometry:
    cylinders: 16938 heads: 15 sectors/track: 63 (945 sectors/cylinder)
    
    BIOS disk geometry:
    cylinders: 1023 heads: 240 sectors/track: 63 (15120 sectors/cylinder)
    
    Partition table:
    0: sysid 7 (OS/2 HPFS or NTFS or QNX2 or Advanced UNIX)
        start 63, size 3190257 (1557 MB), flag 0x80
            beg: cylinder    0, head   1, sector  1
            end: cylinder  210, head 239, sector 63
    1: sysid 169 (NetBSD)
        start 3193155, size 4096575 (2000 MB), flag 0x0
            beg: cylinder  211, head  45, sector  1
            end: cylinder  482, head  29, sector 63
    2: sysid 6 (Primary 'big' DOS, 16-bit FAT (> 32MB))
        start 7302960, size 4596480 (2244 MB), flag 0x0
            beg: cylinder  483, head   0, sector  1
            end: cylinder  786, head 239, sector 63
    3: sysid 15 (Ext. partition - LBA)
        start 11899440, size 4097520 (2000 MB), flag 0x0
            beg: cylinder  787, head   0, sector  1
            end: cylinder 1023, head 239, sector 63
    

    The example is from a disk with 4 partitions:
    0. Windows NT 4.0 NTFS4 partition
    1. NetBSD ffs partition
    2. MS-DOS FAT partition
    3. Windows 2000 NTFS5 inside an "extended" partition

  3. Type "disklabel <DISKNAME>"
    If the disk contains only MS-DOS partitions NetBSD will automatically generate a 'fake' disklabel containing an entry for the first MS-DOS partition.
    The output could look something like this:
    # disklabel wd0
    
    physical disk information
    8 partitions:
    #        size   offset     fstype   [fsize bsize   cpg]
      a:   410130  3193155     4.2BSD     1024  8192    16   # (Cyl. 3379 - 3812)
      b:   409185  3603285       swap                        # (Cyl. 3813 - 4245)
      c:  4096575  3193155     unused        0     0         # (Cyl. 3379 - 7713)
      d: 16006410        0     unused        0     0         # (Cyl.    0 - 16937)
      e:  3274425  4012470     4.2BSD     2048 16384    32   # (Cyl. 4246 - 7710)
    

    If your needed fstypes already are defined (i.e. MSDOS) you can skip down to partition mounting.

    If you do this before the NetBSD installation is up and running, you may want to use the mbrlabel(8) utility to synthesize a temporary in-core disklabel describing all the fdisk partitions on a disk. You can then use that information for creating a new disklabel consisting of the BSD and other-OS partitions.

  4. Prepare to edit the disklabel
    If you prefer to use an editor other than vi type "setenv EDITOR <YOUR_EDITOR>" eg. "setenv EDITOR pico".
  5. Edit the disklabel with "disklabel -e <DISKNAME>"
    Go down to the bottom of the disklabel and you are ready to edit your labels.

    You need two things:

    1. The next unused partition letter (eg: 'f').
    2. The 'start/size' value from fdisk (eg: '63').

    Add a new line at the bottom that for NTFS reads:

      <PARTITION>:   <SIZE>  <OFFSET>   NTFS
    

    A suitable entry for the above example would be (fsize, bsize and cpg are blank):

      f:  3190257       63       NTFS
    

    Add another line for MSDOS:

      <PARTITION>:   <SIZE>  <OFFSET>   MSDOS
    

    From the example the entry would be:

      g:  4596480  7302960      MSDOS
    

    Notes on partitions: NetBSD/i386 currently only supports eight partitions per disk ('a' - 'h'), also the 'number of partitions' line directly above the partition table should be greater or equal to the number of partitions defined.

  6. Save and check the disklabel
    Exit the editor, type "disklabel <DISKNAME>", and confirm your new partition is visible.

Mounting the filesystem

Every disk partition has a device entry in '/dev', the form of such an entry is '/dev/' followed by the diskname, followed by the partition letter. In the above example the device entry for the NTFS and MS-DOS partitions would be '/dev/wd0f' and '/dev/wd0g' respectively.

  1. Create a mountpoint for each partition
    "mkdir <MOUNTPOINT>", eg: "mkdir /msdos" and "mkdir /nt4".
  2. Mount the filesystems
    "mount -t <TYPE> <DEVICE> <MOUNTPOINT>", eg: "mount -t msdos /dev/wd0g /msdos" and "mount -t ntfs /dev/wd0f /nt4".
  3. Check all is ok
    "ls <MOUNTPOINT>", eg: "ls /msdos" and "ls /nt4".
  4. Set filesystems to be automatically mounted on boot
    If you want NetBSD to automatically mount the filesystems every time it boots you should edit /etc/fstab and add lines of the form:
        <DEVICE> <MOUNTPOINT>  msdos   rw
        <DEVICE> <MOUNTPOINT>  ntfs    rw
    

    Again, in the above example this would be:

        /dev/wd0g /msdos  msdos   rw
        /dev/wd0f /nt4    ntfs    rw
    

Booting NetBSD or DOS/Windows/other via a menu (top)

This assumes you have already partitioned your disk, and installed both NetBSD and whichever other OS you intend to use. It uses the OSBS boot selector.

If you have a disk or partition with more than 8GB or NetBSD should be installed at more than 2GB from the start of the disk, you might consider directly using the NetBSD bootmenu.

  1. Download the OSBS boot selector. This can be found on ftp.NetBSD.org as /pub/NetBSD/NetBSD-1.5.2/i386/installation/misc/osbsbeta.exe.
  2. Extract OSBS. Save osbsbeta.exe to a DOS disk, then run it. It will extract 'OS-BS\OSBS20B8.EXE'.
  3. Run 'OS-BS\OSBS20B8.EXE'
  4. Select 'Install' -> 'Boot menu'
  5. Press 'INSERT' for each partition you wish to add to the boot menu.
  6. Press 'ESCAPE' when done. You will be asked to select which OS to boot by default, how long to wait before booting it (10 seconds is reasonable), and whether to modify the start id on boot time (usually no).
  7. Save the boot menu, and quit.
  8. If you booted from floppy disk, remove it.

You should now be presented with the boot menu when the machine boots.

Another way, present since NetBSD 1.4 is to use the new NetBSD bootmenu:

  1. run 'fdisk -i -c /usr/mdec/mbr_bootsel' to install the bootmenu
  2. run 'fdisk -B' afterwards to interactively configure it (this step is not optional)

See also the fdisk(8) manpage.

Adding NetBSD to the Windows NT/2000/2003/XP boot menu (top)

Method 1) Use the NetBSD mbr code

Use the NetBSD mbr code which allows you to override options at boot time if required. This requires a working, bootable NetBSD installation. The NetBSD mbr code is installed in an empty file using the fdisk command in NetBSD

In this example, Windows Server 2003 is on disk 0 and a NetBSD 4.0 installation is on disk 1.

devel# rm -f nbmbr
devel# touch nbmbr
devel# fdisk -BF -c mbr_ext ./nbmbr
fdisk: primary partition table invalid, no magic in sector 0
fdisk: Cannot determine the number of heads
Update the bootcode from /usr/mdec/mbr_ext? [n] y

Boot selector configuration:
Timeout value (0 to 3600 seconds, -1 => never): [-1..3600 default: 10] 
Select the default boot option. Options are:

0: The first active partition
1: Harddisk 0
2: Harddisk 1
3: Harddisk 2
4: Harddisk 3
5: Harddisk 4
6: Harddisk 5
7: Harddisk 6
8: Harddisk 7
Default boot option: [0..8 default: 0] 2

We haven't written the MBR back to disk yet.  This is your last chance.
Should we write new partition table? [n] y

Copy nbmbr onto drive C: and add the following to the end of C:\boot.ini

c:\nbmbr="NetBSD disk 1"

boot.ini is hidden by default. To edit it, open drive C: from My Computer and choose "Folder Options..." on the Tools menu. Then click on the View tab and ensure the checkbox alongside "Hide protected operating system files (Recommended)" is unticked. Click on OK. You will then be able to see and double-click on boot.ini to edit it.

Method 2) Use bootpart to copy the existing code to bootblock

Within Windows, get bootpart from http://www.winimage.com/bootpart.htm and extract the files from the zip archive onto your harddisk. Go to a command prompt and navigate to the directory containing bootpart.exe. A session transcript is below. In this example, Windows Server 2003 is on disk 0 and a NetBSD 4.0 installation is on disk 1.

First run bootpart and determine the partition number (which are counted consecutively spanning disk numbers). Remember that NetBSD uses partition type a9 (in hex):

C:\bootpa26>bootpart
Boot Partition 2.60 for WinNT/2K/XP (c)1995-2005 G. Vollant (info@winimage.com)
WEB : http://www.winimage.com and http://www.winimage.com/bootpart.htm
Add partition in the Windows NT/2000/XP Multi-boot loader
Run "bootpart /?" for more information

Physical number of disk 0 : b4dab4da
 0 : C:* type=7  (HPFS/NTFS), size= 19580368 KB, Lba Pos=63
Physical number of disk 1 : 7f4c256b
 1 : D:* type=a9 , size= 39121456 KB, Lba Pos=63

We want to boot partition 1, so:

C:\bootpa26>bootpart 1 \nbboot "NetBSD disk 1"
Boot Partition 2.60 for WinNT/2K/XP (c)1995-2005 G. Vollant (info@winimage.com)
WEB : http://www.winimage.com and http://www.winimage.com/bootpart.htm
Add partition in the Windows NT/2000/XP Multi-boot loader
Run "bootpart /?" for more information
          
Physical number of disk 0 : b4dab4da
 0 : C:* type=7  (HPFS/NTFS), size= 19580368 KB, Lba Pos=63
Physical number of disk 1 : 7f4c256b
 1 : D:* type=a9 , size= 39121456 KB, Lba Pos=63
C:\nbboot written
C:\BOOT.INI updated

This creates a bootblock called nbboot in the root in drive C: and adds an entry to boot.ini called "NetBSD disk 1"

Method 3) Use grub4dos

The advantages of this method are that you have the wider array of grub options open to you, plus the kernel can be loaded from NTFS (if that is appropriate to your needs, usually you'd just load it from the root of your NetBSD installation). For instance, you might like to have a NetBSD recovery or installation kernel handy for troubleshooting even on a machine without a full NetBSD installation.

Download the latest version of grub4dos from http://sourceforge.net/projects/grub4dos and extract the files from the zip archive. Copy grldr to C:\ on Windows and then create c:\menu.lst (this can be created under Windows or NetBSD - the line endings are OK either way) similar to the following:

timeout=5
console terminal
Title NetBSD on disk 1 (chainloader)
    root(hd1,0)
    chainloader +1
Title NetBSD install kernel
    kernel --type=netbsd /NETBSD_INSTALL_LARGE.gz

Non-MULTIBOOT kernels (such as the install kernels) need --type=netbsd. MULTIBOOT kernels must not have this option.

Finally, in a similar way to that described in method 1), add a suitable line to C:\boot.ini, e.g.:

C:\gtldr="NetBSD GRUB"

Installing NetBSD on a disk which currently is entirely used by Dos/Windows (top)

If you have an installation where DOS/Windows currently occupies the whole disk, you can if there is space left on the drive, make the DOS/Windows partition smaller and then build a second partition to use with NetBSD.

The steps involved in this are

  • Moving all data of the DOS partition to the start of that partition using the tool defrag
  • Resizing the DOS partition using a tool called FIPS. Fips can be obtained from the FIPS WWW Site. Be sure to read all the documentation!
  • Installing a bootloader as described above
  • Installing NetBSD

Changing the partition sysid from 'old NetBSD or FreeBSD' (top)

From 1.3.3 onwards NetBSD has changed the default partition sysid from 165 to 169. This is to avoid a conflict with FreeBSD. A 1.3.3 (or newer) system will still boot from a partition with sysid 165, it will just give a warning each time it opens the partition. To convert a disk partition from 165 to 169, perform the following steps:

  1. Ensure you have a bootable 1.3.3 (or newer) floppy
    This is just in case something goes wrong. To boot the installed system from the floppy, boot the floppy, press space during the countdown and select 'boot hd0:'.
  2. Ensure you have bootblocks that understand the new ID
    If the system has been installed with a 1.3.3 or later sysinst you should be ok, otherwise run
    • '/usr/mdec/installboot biosboot.sym /dev/r{DISK}a'.
    If your kernel does not have 'options INSECURE' enabled you will need to shutdown to single user mode:
    • 'shutdown now'
    • press ENTER when prompted for a shell
    • 'fsck -p'
    • 'mount -vat ffs'
    • 'cd /usr/mdec ; ./installboot biosboot.sym /dev/r{DISK}a'
    Where {DISK} is wd0 for the first ATA (IDE) disk, sd0 for the first SCSI disk, etc.
  3. Change the partition id
    Run 'fdisk {DISK}'. One partition will be indicated as:
    X: sysid 165 (FreeBSD or 386BSD or old NetBSD)
    
    Where X will be 0, 1, 2, or most likely 3. Run 'fdisk -u -X {DISK}'
    1. ENTER to : Do you want to change our idea of what BIOS thinks? [n]
    2. y ENTER to : Do you want to change it? [n]
    3. 169 ENTER to : Supply a decimal value for "sysid" [165]
    4. ENTER to : Supply a decimal value for "start" [......]
    5. ENTER to : Supply a decimal value for "size" [.......]
    6. ENTER to : Explicitly specify beg/end address? [n]
    7. y ENTER to : Is this entry okay? [n]
    8. y ENTER to : Should we write new partition table? [n]
  4. Reboot to confirm all works.
    If you hit any problems you can use fdisk on the boot floppy to reset the values back.
  5. Be particularly relieved that NetBSD should not need to change its partition ID again.

After installing, I'm just getting LI when I reboot (top)

A stale LILO is causing your problem. To fix this you'd want to:

  1. Boot from the sysinst floppy
  2. Exit the installation system by selecting 'Run /bin/sh' from the Utility menu.
  3. Type 'fdisk -if'
  4. Reboot

dosboot.com resets the machine after loading the kernel (top)

If dosboot.com resets the machine immediately after loading the kernel, make sure you do not have "himem.sys" loaded. Be sure to check your "config.sys"!

How to get a DOS prompt if you have WinME installed, and all you have is a Win98 CD and no floppy to boot from (top)

The Windows 98 CD is a fine way to get a (real!) MS-DOS prompt if your machine has Windows Millennium Edition (Windows ME) installed, and if booting from floppy is not an option, as it's often the case with modern laptops. You can press shift+F5 to not load any drivers like "highmem.sys" (see above) when asked if you want to start with or without CD-ROM support. You can then access your C: drive where you've put tools like "dosboot.com" (available from ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-1.5.2/i386/installation/misc/dosboot.com) and a kernel before.

How do I make a one-floppy NetBSD system? (top)

Recently Lex Wennmacher added the package sysutils/fdgw to pkgsrc. The package is a tool to build one-floppy NetBSD systems. One application is to turn a PC without a hard disc into a cheap router.

There are two images that you can download from the main NetBSD ftp site. The ADSL router image has enough on it to provide a basic ADSL router system. The NAT router image is designed to provide a simple NAT router.

The images can be put onto a floppy using the dd command. For example,

dd if=adslrouter.img of=/dev/rfd0a bs=18k

Although both one-floppy NetBSD systems contain all the files required for proper operation, some customization is required (e. g. to define IP addresses and ipf filter rules). Please refer to Ken'ichi Fukamachi's fdgw home page for details.


Specific hardware issues

IRQ 2 and IRQ 9 (top)

On IBM AT and later machines (which includes all PCs capable of running NetBSD) IRQ 2 is mapped to IRQ 9 for various hardware reasons. On cards which feature a setting of "IRQ 2", you should select IRQ 9 in NetBSD kernel configuration files.

Problems with 'ne1: device time out' (top)

Old style ISA cards are configured for a specific address and IRQ. NetBSD can autodetect the address, but does not have a clean way to check for the IRQ, so the autoconfiguration tables contains entries for the most common values. If the address matches but the IRQ does not the device will timeout when used. This does not affect other busses such as PCI, EISA, or ISA-PnP.

If you have this problem, you have three options:

  • Change the settings on a card to match one of the entries in the kernel (src/sys/arch/i386/conf/GENERIC). Some use jumpers, and others have a DOS program, usually provided with the card.
  • Compile a new kernel to match the card settings.
  • Buy a different card - in modern PCI PCs an ISA network card can seriously impact the performance of other devices - a PCI card such as an fxp(4) (Intel etherexpress-pro), or tlp(4) (Tulip or clone) is recommended.
  • Manually change the kernel settings with ddb(4).
    1. Boot the kernel with '-d' (Hit the space bar, before boot countdown reaches 0), then type 'boot netbsd -d'.
    2. Enter x/xla loc,100. Record the offsets of fields with 0x280 in them. There are three ISA network cards in the GENERIC kernel with this address.
    3. Change the locations to the correct address for your cards: w/l loc+<offset> <address>.
    4. Change the IRQs to match your cards: w/l loc+<offset>+0x10 <irq>.
    5. Continue booting.

USB problem 'uhci0: couldn't map interrupt' (top)

This can be caused by the "Allocate interrupt for USB" option being disabled in the BIOS, possibly under the "PNP & PCI Setup". When enabled you will usually see the 'Serial Controller' listed with an IRQ on the BIOS screen just before it starts booting NetBSD.

What is 'WARNING: CYRIX 486DLC CACHE UNCHANGED'? (top)

This message indicates the kernel has detected a Cyrix 486DLC and since it does not know if it is safe on this machine, the Cyrix special cache settings have not been touched. This should only affect the Cyrix '386/486 hybrid' upgrade for 386 motherboards, and should not apply in any way to true 486 (or later) processors from any vendor, including Cyrix.

Many 386 motherboards (and CPUs) were too primitive to care about CPU cache coherency, requiring the DLC to flush its cache any time a bus hold was asserted by any bus device (indicating that a bus-master transaction was potentially in progress). This obviously results in a speed cost compared to running with full cache coherency.

There are two kernel options that can be set to affect the Cyrix cache:

  • options CYRIX_CACHE_WORKS
    This enables the CPUs cache, but tells it to flush the cache on every external bus hold request. Slower than a true 486, but faster than a 386 (which has no on-chip cache). This should work on most motherboards.
  • options CYRIX_CACHE_REALLY_WORKS
    This should only be used on motherboards specifically designed for the 486DLC/486DRX, which have correct and complete bus-mastering and cache coherency support (These are hard to find). This option lets the cache run full out without flushing on bus holds, as real 486s would.

By leaving them both undefined, the chip will run with whatever the BIOS sets up. Most BIOSs will not set any of the cache options, which is safest, but will give the least performance boost. If you have a true 486DLC/486DRX motherboard, or a DLC/DRX-aware BIOS, you may automatically get some of the performance boost listed above.

It's worth some experimentation. The system should fail fairly quickly after boot if the motherboard cannot support the option. Then just build a kernel with less aggressive optimizations. (Of course, don't overwrite your non-optimized kernel -- you'll need it to reboot if your new kernel doesn't work!)

My monitor goes into DPMS mode after "setting tty flags" (top)

At least one person has reported that their video card appears to not be probed correctly by the kernel. Specifically, after "setting tty flags" is printed, the screen goes black and the monitor goes into power-saving mode. The reported cause is that some video cards use the same I/O memory as what DOS calls COM4; for this reason, NetBSD's com3 (which corresponds to DOS's COM4) is disabled in the GENERIC kernel.

PCMCIA modem does not appear to work (top)

If you have a PCMCIA modem that does not appear to work, make sure you are using the com(4) device in hardware flow control mode. Many PCMCIA modems only work when using hardware flow control.

Installing on VIA EPIA hardware (top)

The NetBSD bootloader is currently broken on certain systems using the VIA C3 CPU most notably the VIA EPIA range of ITX boards. In the early stages of boot the screen will go out of sync and the system will hang. This will happen on NetBSD versions newer than 1.6.2. This is documented in PR/26007.

A workaround is to use the bootloader from 1.6.2 until PR/26007 is resolved.

You can work around this in either of two ways:

  1. If you have a spare system:

    • Move the hard drive to another motherboard

    • Install NetBSD 3.x

    • Reboot

    • Run the 1.6.2 version of installboot. For an ide drive

      installboot > /usr/mdec1.6/biosboot.sym /dev/rwd0a

      should work.

    • Move the hard drive to the Epia motherboard

  2. If you do not have a spare system you need to install 1.6.2 first:

    • Install minimal 1.6.2 (Only Kernel + Base + etc)

    • Log in as root and insert the 3.0.1 CD

      # mkdir /cdrom
      # mount /dev/cd0a /cdrom
      # mv /netbsd /netbsd.1.6.2
      # cp /cdrom/i386/binary/kernel/netbsd-INSTALL.gz /netbsd
      # shutdown -r now
    • The 3.0.1 install kernel should now be booting from the harddrive (make sure you're not booting the CD again!)

    • When the installer asks: “Do you want to update the bootcode in the Master Boot Record to the latest version of the NetBSD bootcode?” answer “NO

    • When the installer asks: “Would you like to install the normal set of bootblocks or serial bootblock?” answer “g: Use existing bootblocks

The vintage 1.6.2 can be found at ftp://ftp.NetBSD.org/pub/NetBSD-archive/NetBSD-1.6.2/i386/.


Running the X Window System

X will only run with an INSECURE kernel, or in single user mode (top)

When run without 'options INSECURE' NetBSD will disallow direct access to /dev/mem. If you use a graphics board which requires, or can benefit from, linear memory access you should install the Aperture Driver from the NetBSD packages collection (use "make install" in sysutils/aperture). This will permit the X server to directly access the VGA framebuffer even if kernel security level is > 0.

X fails with "Fatal server error: xf86MapVidMem: Could not map /dev/vga (Invalid argument)" (top)

This is a symptom of the problem described above.

X will not recognise a PS/2 mouse (top)

Up until 1.3.3 the default NetBSD/i386 GENERIC kernel does not have PS/2 mouse support enabled. In order to enable PS/2 support you need to build a custom kernel. Follow the instructions given and at stage 4 when you edit <MYCONF> you should search for the line:

   '#pms0    at pckbd? irq 12'

remove the initial '#', then continue building the kernel.
When you boot you should now see a line in the boot messages of the form 'pms0 at pc0' or 'pms0 at vt0'.

When setting up Xfree86 you should select the 'wsmouse' Mouse Device and the 'wsmouse' protocol.

How do I enable a wheel mouse? (top)

To enable wheel mouse operation, edit the /etc/XF86Config configuration file and add

   Option     "Buttons"       "5"
   Option     "ZAxisMapping"  "4 5"

to the

   Section "InputDevice"
      Identifier  "Mouse1"

section of the file.


Other NetBSD/i386 FAQs

Can NetBSD/i386 run Netscape and Mozilla? (top)

Yes. Netscape browsers can run on NetBSD/i386 through binary emulation.

Mozilla, where the source code is publically available, has been ported to run on NetBSD natively, and pre-built binary packages of Mozilla are available through the NetBSD packages collection (see www/mozilla).

The two easiest ways to get Netscape Navigator (stand-alone browser) or Netscape Communicator running on NetBSD/i386 are through BSDi binary emulation or Linux binary emulation. To run a BSDi version, you'll only need the kernel options for BSDi emulation in your kernel configuration file (the GENERIC kernel that gets installed with NetBSD has done this). Linux binary emulation under NetBSD/i386 relies on Linux libraries being under /emul/linux (see compat_linux(8)). The Linux versions are available through the NetBSD packages collection; if you install www/navigator or www/communicator, the dependencies of those packages will set up /emul/linux for you (or you can "make install" in emulators/suse_linux).

If you'd like to run binary-only plug-ins, such as Macromedia Flash, you'll need to have the Linux version of navigator / communicator.

Running Quake II for GNU/LINUX under NetBSD (top)

It is assumed that you already have NetBSD i386 up and running. You may also need to know how to build a kernel. These instructions are relative to the 1.4 (or newer) family of NetBSD releases, Quake II v3.20, and the NetBSD package set called suse_* v6.4 in emulators.

Other (especially later) versions will probably work at least as well.

Some caveats before you start:

  • You will need a fair bit of available disk-space for emulation binaries and for the Quake II game itself.
  • You will presumably have to install everything as root. This obviously means that you are trusting your system integrity and security to the suse_* & game authors. For a more or less personal system, this is not such a problem; use your best judgement. I have no reason to suppose that either set of authors is a particular threat, but the more complicated your system, and the more that you blindly trust components, the greater the danger.
  • The only graphics mode that Quake II supports correctly for me is ``ref_softx'', while my X server is in 8-bit mode. OpenGL does not seem to cooperate without ``glide'', and I have no glide support for my card (an STB Nitro 3D). Direct video supposedly works, but I am missing the necessary libraries. (This effectively means that you need to have set up the X Window System on your system.) The game actually plays in 24-bit X for me, but it distorts the graphics: It uses the standard sized windows, but horizontally squeezes the graphics by a factor of two, leaving blank (black) the right side of the graphics window.
  • The documentation claims that you can set up Quake II to be run by any user. For me, I have to run the game as root.
  • People successfully run Quake II servers under NetBSD; however, I have yet to be able to play it in network mode. I don't know what the problem is.

Above all, read the instructions that came with Quake II.

  1. If you are not running a GENERIC NetBSD 1.4.x or 1.5.x kernel, you may need to enable COMPAT_LINUX in your kernel config, rebuild, and reboot.
  2. You need to have installed the GNU/LINUX-compatibility package referenced above. N.B.: The linux_* packages do not provide what you need---although you may wish to lift the GNU/LINUX version of BASH from that package. (Because of the way emulation works, having some shell running under emulation may occasionally be useful. But, it is not essential.)
  3. mount(8) the distribution CD.
  4. Change into the CD's root directory.
  5. Run sh(1) /bin/sh setup.
  6. During setup, you will be asked about ``rpm''; this is the Red-Hat Package Manager, which is available from the NetBSD package system. (rpm was designed for GNU/LINUX.) However, when I tried to use it, the setup script refused to take advantage of it. Don't panic, though. I simply accepted the default; if you do this, setup will try to use cpio(1). If you don't use rpm, setup will ask for the location of cpio; under the NetBSD 1.4 family of releases, it is in ``/usr/bin/cpio''.
  7. Things should be fairly smooth, otherwise. Your CD may start and stop several times during setup (mine did). This appears not to be a problem. Looking at my CD, I see distinct track boundaries on the CD-ROM, and assume that it has something to do with how they recorded the master CD-ROM.

Tips and trouble shooting.

  • Do you dislike having visible ``window decoration'' (borders and whatnot)? If you browse your ../quake2/config.cfg file, you will find two options that control horizontal offset (apparently defaults to 3) and vertical offset (22). Set these to 0 and the titlebar/borders go away. This is of particular value if you are playing in a resolution equal to your screen resolution.
  • Since the game depends upon GNU/LINUX, you may wish to move Quake II into the GNU/LINUX directory tree. (This presumably will be done automatically if you use the GNU/LINUX BASH to run the setup script. If you run with the NetBSD sh, Quake II will go into /usr/local/games.)
  • If Quake II exits complaining about not finding a file called something like ``pics/colormap.pcx'', then you are probably not running as root. You may be able to fix it so that it works as non-root; but the simplest fix is to su to root and play the game that way.

Can you get a refund if you do not use Windows (top)

Some PC systems are only available with Microsoft Windows preinstalled. Part of the cost of such a system is for the Windows licence. If you do not want to use Windows, then you may be entitled to a refund from Microsoft. This however is a complicated an lengthy process.

The best approach is to find (and support) a reseller who can provide a PC without Windows altogether.

Debugging the NetBSD kernel via a serial line (top)

See the KGDB HOWTO.

Other sources of information