<?xml version="1.0"?>
<!DOCTYPE webpage
 PUBLIC "-//NetBSD//DTD Website-based NetBSD Extension//EN"
        "http://www.NetBSD.org/XML/htdocs/lang/share/xml/website-netbsd.dtd">

<webpage id="ports-i386-faq">
<config param="desc" value="NetBSD/i386 Frequently Asked Questions"/>
<config param="cvstag" value="$NetBSD: faq.xml,v 1.9 2009/09/19 17:11:04 snj Exp $"/>
<config param="rcsdate" value="$Date: 2009/09/19 17:11:04 $"/>
<head>

<!-- Copyright (c) 2006
	The NetBSD Foundation, Inc.  ALL RIGHTS RESERVED. -->

<title>NetBSD/i386 Frequently Asked Questions</title>
</head>

<sect1 role="toc">

   <sect2 id="dualbooting">
     <title>Getting along with other operating systems</title>

     <sect3 id="ms_partition">
       <title>Accessing Microsoft partitions</title>
       <para>
         NetBSD supports a number of different filesystems (for a complete list see
         &man.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.
       </para>
       <para>
         To access another filesystem you have to set up a
         <code>disklabel</code>, which tells the system where to find the
         data on the disk. With a correct <code>disklabel</code> you are
         able to <code>mount</code> it for use with NetBSD.
       </para>
       <para>
         <emphasis role="bold">Setting up the disklabel</emphasis>
       </para>
         <orderedlist>
           <listitem>Determine the disk containing the filesystem<html:br/>
             If you only have a single disk it will be <emphasis>wd0</emphasis>
             or <emphasis>sd0</emphasis>, depending on whether you have IDE
             or SCSI. If you have multiple disks you should check the output
             of <code>dmesg | more</code> to determine the name of the desired
             disk.</listitem>
           <listitem>Determine the size and offset of the partition.<html:br/>
             Type <code>fdisk</code> and you will see the size and offset of
             the partitions which could be something like:
             <programlisting>
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 (&gt; 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
</programlisting>
           <para>
             The example is from a disk with 4 partitions:<html:br/>
             0. Windows NT 4.0 NTFS4 partition<html:br/>
             1. NetBSD ffs partition<html:br/>
             2. MS-DOS FAT partition<html:br/>
             3. Windows 2000 NTFS5 inside an "extended" partition
           </para>
         </listitem>
         <listitem>Type <code>disklabel &lt;DISKNAME&gt;</code><html:br/>
           If the disk contains only MS-DOS partitions NetBSD will
           automatically generate a 'fake' disklabel containing an entry
           for the first MS-DOS partition.<html:br/>
           The output could look something like this:
<programlisting>
# disklabel wd0
</programlisting>

           <emphasis>physical disk information</emphasis>

<programlisting>
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)
</programlisting>

           <para>
             If your needed fstypes already are defined (i.e. MSDOS) you can skip down to
             <ulink url="#ms_partition_mounting">partition mounting</ulink>.
           </para>
           <para>
             If you do this before the NetBSD installation is up and running, you
             may want to use the &man.mbrlabel.8; utility to synthesize a temporary in-core
             disklabel describing all the <emphasis>fdisk</emphasis> partitions on a disk. You can
             then use that information for creating a new disklabel consisting of the
             BSD and other-OS partitions.
           </para>
         </listitem>
         <listitem>Prepare to edit the disklabel<html:br/>
           If you prefer to use an editor other than <emphasis>vi</emphasis>,
           type <code>setenv EDITOR &lt;YOUR_EDITOR&gt;</code>, e.g.,
           <code>setenv EDITOR pico</code>.
         </listitem>
         <listitem>Edit the disklabel with <code>disklabel -e &lt;DISKNAME&gt;</code><html:br/>
           Go down to the bottom of the disklabel and you are ready to edit your
           labels.
           <para>
             You need two things:
           </para>
           <orderedlist>
             <listitem>The next unused partition letter (e.g., 'f').</listitem>
             <listitem>The 'start/size' value from fdisk (e.g., '63').</listitem>
           </orderedlist>
           <para>
             Add a new line at the bottom that for NTFS reads:
           </para>
<programlisting>
  &lt;PARTITION&gt;:   &lt;SIZE&gt;  &lt;OFFSET&gt;   NTFS
</programlisting>
           <para>
             A suitable entry for the above example would be (fsize, bsize and cpg are
             blank):
           </para>
<programlisting>
  f:  3190257       63       NTFS
</programlisting>
           <para>
             Add another line for MSDOS:
           </para>
<programlisting>
  &lt;PARTITION&gt;:   &lt;SIZE&gt;  &lt;OFFSET&gt;   MSDOS
</programlisting>
           <para>
             From the example the entry would be:
           </para>
<programlisting>
  g:  4596480  7302960      MSDOS
</programlisting>
           <para>
             Note on partitions: NetBSD/i386 currently only supports eight
             partitions per disk ('a' - 'h') and the 'number of partitions'
             line directly above the partition table should be greater or
             equal to the number of partitions defined.
           </para>
         </listitem>
         <listitem>Save and check the disklabel<html:br/>
            Exit the editor, type <code>disklabel &lt;DISKNAME&gt;</code>,
            and confirm your new partition is visible.
         </listitem>
       </orderedlist>
       <para>
         <emphasis role="bold"><anchor id="ms_partition_mounting"/>Mounting the filesystem</emphasis>
       </para>
       <para>
         Every disk partition has a device entry in <filename>/dev</filename>.
         The form of such an entry is <filename>/dev/</filename> followed by
         the disk name, followed by the partition letter.  In the above
         example, the device entry for the NTFS and MS-DOS partitions would
         be <filename>/dev/wd0f</filename> and <filename>/dev/wd0g</filename>
         respectively.
       </para>

       <orderedlist>
         <listitem>Create a mountpoint for each partition<html:br/>
           <code>mkdir &lt;MOUNTPOINT&gt;</code>, e.g., <code>mkdir /msdos</code> and
           <code>mkdir /nt4</code></listitem>
         <listitem>Mount the filesystems<html:br/>
           <code>mount -t &lt;TYPE&gt; &lt;DEVICE&gt; &lt;MOUNTPOINT&gt;</code>,
           e.g., <code>mount -t msdos /dev/wd0g /msdos</code> and <code>
           mount -t ntfs /dev/wd0f /nt4</code></listitem>
         <listitem>Check all is OK<html:br/>
           <code>ls &lt;MOUNTPOINT&gt;</code>, e.g., <code>ls /msdos</code> and
           <code>ls /nt4</code></listitem>
         <listitem>Set filesystems to be automatically mounted at boot<html:br/>
           If you want NetBSD to automatically mount the filesystems every
           time it boots, you should edit <filename>/etc/fstab</filename> and
           add lines of the form:
<programlisting>
    &lt;DEVICE&gt; &lt;MOUNTPOINT&gt;  msdos   rw
    &lt;DEVICE&gt; &lt;MOUNTPOINT&gt;  ntfs    ro
</programlisting>
           <para>
             Again, in the above example this would be:
           </para>
<programlisting>
    /dev/wd0g /msdos  msdos   rw
    /dev/wd0f /nt4    ntfs    ro
</programlisting>
         </listitem>
       </orderedlist>
     </sect3>

     <sect3 id="dual_boot">
       <title>Booting NetBSD or DOS/Windows/other via a menu</title>
       <para>
         This assumes you have already partitioned your disk, and installed both
         NetBSD and whichever other OS you intend to use.
       </para>
       <orderedlist>
         <listitem>run 'fdisk -i -c /usr/mdec/mbr_bootsel' to install the bootmenu</listitem>
         <listitem>run 'fdisk -B' afterwards to interactively configure it (this step 
           is not optional)</listitem>
       </orderedlist>
       <para>
         See also the &man.fdisk.8; manpage.
       </para>
     </sect3>

     <sect3 id="nt_boot">
       <title>Adding NetBSD to the Windows NT/2000/2003/XP boot menu</title>
       <para>
         <emphasis role="bold">Method 1) Use the NetBSD mbr code</emphasis>
       </para>
       <para>
         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.
       </para>
       <para>
         In this example, Windows Server 2003 is on disk 0 and a NetBSD 4.0
         installation is on disk 1.
       </para>
<programlisting>
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
</programlisting>
       <para>
         Copy nbmbr onto drive C: and add the following to the end of C:\boot.ini
       </para>
<programlisting>
c:\nbmbr="NetBSD disk 1"
</programlisting>
       <para>
         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.
       </para>
       <para>
         <emphasis role="bold">Method 2) Use bootpart to copy the existing
         code to bootblock</emphasis>
       </para>
       <para>
         Within Windows, get bootpart from
         <ulink url="http://www.winimage.com/bootpart.htm">http://www.winimage.com/bootpart.htm</ulink>
         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.
       </para>
       <para>
         First run bootpart and determine the partition number (which are
         counted consecutively spanning disk numbers). Remember that
         NetBSD uses partition type a9 (in hex):
       </para>
<programlisting>
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
</programlisting>
       <para>
         We want to boot partition 1, so:
       </para>
<programlisting>
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
</programlisting>
       <para>            
         This creates a bootblock called nbboot in the root in drive C:
         and adds an entry to boot.ini called "NetBSD disk 1"
       </para>  
       <para>
         <emphasis role="bold">Method 3) Use grub4dos</emphasis>
       </para>
       <para>
         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.
       </para>
       <para>
         Download the latest version of grub4dos from
         <ulink url="http://sourceforge.net/projects/grub4dos">http://sourceforge.net/projects/grub4dos</ulink>
         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:
       </para>
<programlisting>
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
</programlisting>       			
       <para>
         Non-MULTIBOOT kernels (such as the install kernels) need --type=netbsd.
         MULTIBOOT kernels must not have this option.
       </para>
       <para>
         Finally, in a similar way to that described in method 1), add a
         suitable line to C:\boot.ini, e.g.:
       </para>
<programlisting>
C:\grldr="NetBSD GRUB"
</programlisting>                                
    </sect3>

    <sect3 id="fips">
      <title>Installing NetBSD on a disk which currently is entirely used by DOS/Windows</title>
      <para>Note: this only applies to FAT filesystems.</para>
      <para>
        If you have an installation where DOS/Windows currently occupies the
        whole disk, if there is space left on the drive you can make the 
        DOS/Windows partition smaller and then create a second partition to use
        with NetBSD.
      </para>
      <para>
        The steps involved in this are
      </para>
      <itemizedlist>
        <listitem>Move all data of the DOS partition to the start of that
          partition using the tool <emphasis>defrag</emphasis></listitem>
        <listitem>Resize the DOS partition using a tool called <emphasis>FIPS</emphasis>.
          FIPS can be obtained from the <ulink
          url="http://bmrc.berkeley.edu/people/chaffee/fips/fips.html">FIPS
          web site</ulink>.
          Be sure to read all the documentation!</listitem>
        <listitem>Install a bootloader as described <ulink url="#dual_boot">above</ulink></listitem>
        <listitem>Install NetBSD</listitem>
      </itemizedlist>
    </sect3>

    <sect3 id="dosboot">
      <title>dosboot.com resets the machine after loading the kernel</title>
      <para>
        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"!
      </para>
    </sect3>

    <sect3 id="dosprompt">
      <title>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</title>
      <para>
        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 is 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 "<ulink
        url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.0/i386/installation/misc/dosboot.com">dosboot.com</ulink>" (available from <ulink url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.0/i386/installation/misc/dosboot.com"/>) and a kernel before.
      </para>
    </sect3>

  </sect2>

  <sect2 id="specific-hardware">
    <title>Specific hardware issues</title>

    <sect3 id="irq2or9">
      <title>IRQ 2 and IRQ 9</title>
      <para>
        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.
      </para>
    </sect3>

    <sect3 id="ne200-device-timeout">
      <title>Problems with '<code>ne1: device time out</code>'</title>
      <para>
        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.
      </para>
      <para>
        If you have this problem, you have three options:
        <itemizedlist>
          <listitem>Change the settings on a card to match one of the entries
	    in the kernel (<currentsrc>src/sys/arch/i386/conf/GENERIC</currentsrc>).
	    Some use jumpers, and others have a DOS program, usually
	    provided with the card.</listitem>
          <listitem>Compile a new kernel to match the card settings.</listitem>
          <listitem>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 &man.fxp.4; (Intel EtherExpress Pro),
	    or &man.tlp.4; (Tulip or clone) is recommended.</listitem>
          <listitem>Manually change the kernel settings with &man.ddb.4;.
            <orderedlist>
	      <listitem>Boot the kernel with '<code><emphasis role="bold">-d</emphasis></code>' (Hit the space
	        bar before boot countdown reaches 0), then type '<code><emphasis role="bold">boot
	        netbsd -d</emphasis></code>'.</listitem>
	      <listitem>Enter <code><emphasis role="bold">x/xla loc,100</emphasis></code>.
	        Record the offsets of fields with <code>0x280</code> in them.
	        There are three ISA network cards in the GENERIC kernel
	        with this address.</listitem>
	      <listitem>Change the locations to the correct address for your cards:
	        <code><emphasis role="bold">w/l loc+&lt;offset&gt; &lt;address&gt;</emphasis></code>.</listitem>
	      <listitem>Change the IRQs to match your cards:
	        <code><emphasis role="bold">w/l loc+&lt;offset&gt;+0x10 &lt;irq&gt;</emphasis></code>.</listitem>
	      <listitem>Continue booting.</listitem>
            </orderedlist>
          </listitem>
        </itemizedlist>
      </para>
    </sect3>

    <sect3 id="usb-interrupt">
      <title>USB problem '<code>uhci0: couldn't map interrupt</code>'</title>
      <para>
        This can be caused by the "Allocate interrupt for USB" option
        being disabled in the BIOS, possibly under the "PNP &amp; 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.
      </para>
    </sect3>

    <sect3 id="vid_mem_conflict">
      <title>My monitor goes into DPMS mode after "setting tty flags"</title>
      <para>
        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.
      </para>
    </sect3>

    <sect3 id="pcmcia_modem_flow_control">
      <title>PCMCIA modem does not appear to work</title>
      <para>
        If you have a PCMCIA modem that does not appear to work, make sure
        you are using the &man.com.4; device in hardware flow control mode.
        Many PCMCIA modems only work when using hardware flow control.
      </para>
    </sect3>

    <sect3 id="via_epia_bootloader">
      <title>Installing on VIA EPIA hardware</title>
      <para>
        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 <ulink
        url="http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=26007">PR/26007</ulink>.
      </para>
      <para>
        A workaround is to use the bootloader from 1.6.2 until PR/26007 is
        resolved.
      </para>
      <para>
        You can work around this in either of two ways:
      </para>
      <orderedlist>
        <listitem>
          <para> If you have a spare system:
            <itemizedlist>
              <listitem>
                <para>Move the hard drive to another motherboard</para>
              </listitem>
              <listitem><para>Install NetBSD 3.x</para></listitem>
              <listitem><para>Reboot</para></listitem>
              <listitem><para>Run the 1.6.2 version of installboot. For an
                ide drive
                <programlisting>installboot > /usr/mdec1.6/biosboot.sym /dev/rwd0a</programlisting>
                should work.</para></listitem>
	      <listitem><para>Move the hard drive to the Epia
                motherboard</para>
              </listitem>
            </itemizedlist>
          </para>
        </listitem>
        <listitem>
          <para>If you do not have a spare system you need to install 1.6.2
            first:
            <itemizedlist>
              <listitem><para>Install minimal 1.6.2 (Only Kernel + Base +
                etc)</para></listitem>
              <listitem><para>Log in as root and insert the 3.0.1 CD
                <programlisting># mkdir /cdrom
# mount /dev/cd0a /cdrom
# mv /netbsd /netbsd.1.6.2
# cp /cdrom/i386/binary/kernel/netbsd-INSTALL.gz /netbsd
# shutdown -r now</programlisting></para></listitem>
               <listitem><para>The 3.0.1 install kernel should now be
                 booting from the harddrive (make sure you're not booting
                 the CD again!)</para></listitem>
               <listitem><para>When the installer asks: <quote>Do you want
                 to update the bootcode in the Master Boot Record to the latest
                 version of the NetBSD bootcode?</quote> answer
                 <quote>NO</quote></para></listitem>
	       <listitem><para>When the installer asks:
                  <quote>Would you like to install the normal set of
                   bootblocks or serial bootblock?</quote> answer <quote>g:
                   Use existing bootblocks</quote></para></listitem>
            </itemizedlist>
          </para>
        </listitem>
      </orderedlist>
      <para>The vintage 1.6.2 can be found at <ulink
         url="ftp://ftp.NetBSD.org/pub/NetBSD-archive/NetBSD-1.6.2/i386/"/>.</para>
    </sect3>
  </sect2>

  <sect2 id="partitioning">
    <title>Disk issues with old machines</title>

    <sect3 id="540mb-bios-limit">
      <title>Using large drives on machines with a 540MB BIOS limit</title>
      <para>
        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.
      </para>
    </sect3>

    <sect3 id="determining_geometry">
      <title>How to determine a "correct" disk geometry</title>
      <para>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).
      </para>
      <para>The BIOS in PCs can only cope with a certain number of cylinders,
      heads, and sectors per disk (<ulink url="#bios_disk_limits">see
      table</ulink>). (This includes BIOSes on SCSI cards).
      </para>
      <para>Since modern 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).
      </para>
      <para>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.
      </para>
      <para>One method of determining the "correct" translated geometry is
      to use 'pfdisk':
      </para>
      <para>
        <orderedlist>
          <listitem>Download pfdisk from ftp.NetBSD.org (or a mirror), in <ulink
            url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.0/i386/installation/misc/pfdisk.exe">/pub/NetBSD/NetBSD-5.0/i386/installation/misc/pfdisk.exe</ulink>.</listitem>
           <listitem>Run '<code>pfdisk <emphasis>0</emphasis></code>' (0 is the first disk, 1 the second, etc).</listitem>
           <listitem>Type '<code>list</code>'.</listitem>
           <listitem>Record geometry, reboot, and use for NetBSD.</listitem>
         </orderedlist>
       </para>
       <para>
         <emphasis role="bold"><anchor id="bios_disk_limits"/>BIOS disk parameter limits</emphasis>
       </para>
       <para>
         <table border="2" id="bios_disk_limits_table">
           <tr><th>Parameter</th><th>Bits used</th><th>Max value</th></tr>
           <tr><td align="right">Cylinders</td>
	       <td align="right">10</td><td align="right">1023</td></tr>
           <tr><td align="right">Heads</td>
	       <td align="right">8</td><td align="right">255</td></tr>
           <tr><td align="right">Sectors per track</td>
	       <td align="right">6</td><td align="right">63</td></tr>
         </table>
       </para>
       <para>
         (This limits drives to 8GBytes, at least from the BIOS' perspective).
       </para>
     </sect3>

   </sect2>

</sect1>

<sect2 id="other">
  <title>Other sources of information</title>

  <itemizedlist>
<listitem><ulink url="../../docs/guide/en/chap-cons.html#chap-cons-wscons">
    The wscons documentation</ulink>. NetBSD's platform-independent
    workstation console driver.</listitem>
<listitem><ulink url="../../mailinglists/#port-i386">port-i386 mailing
    list</ulink></listitem>
<listitem><ulink url="../../docs/network/netboot/intro.i386.html">Netbooting
    NetBSD/i386</ulink> - booting from floppies or DOS partitions.</listitem>
<listitem><ulink url="../../docs/power-mgmt/">Power Management for
    Laptops</ulink></listitem>
<listitem><ulink url="../../docs/">General NetBSD Documentation</ulink>
    - for questions not specific to NetBSD/i386.</listitem>
<listitem>Reed Media's <ulink url="http://www.reedmedia.net/misc/netbsd/laptops-and-netbsd.html">Laptops and NetBSD</ulink> list</listitem>
</itemizedlist>

</sect2>
</webpage>
