xref: /netbsd/distrib/notes/common/sysinst (revision c4a72b64)
$NetBSD: sysinst,v 1.61 2002/08/07 02:50:22 fredb Exp $

Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the NetBSD
Foundation, Inc. and its contributors.
4. Neither the name of The NetBSD Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

. . . Bl -tag -width x[PCMCIA]x t [ Tn PCMCIA ] .. . El .. . . Define strings for partition references:
\*[part_raw] `raw' partition (usually `c' or `d')
\*[part_free] first "free" partition (usually part_raw+1)
\*[part_usr] default "/usr" partition (usually part_free)
\*[part_max] last partition (usually `h' or `p')
. \n[sbmips]:\n[sh3eb]:\n[sh3el]:\n[x86_64] \{\ . ds part_raw d . ds part_free e . ds part_usr e .\} . ds part_free e . ds part_usr e .\} \n[hpcmips]:\n[i386]:\n[macppc]:\n[ofppc]:\n[playstation2]:\n[sandpoint]:\ \n[sbmips]:\n[sgimips]:\n[walnut]:\n[x86_64] \{\ . ds part_max p .\} \n[shark]:\n[walnut] \{\ . ds part_usr e .\} . ds part_usr g .\} . . .Ss2 Running the sysinst installation program .(enum .To 2 Introduction .Em Introduction

p Using c sysinst , installing .Nx is a relatively easy process. You still should read this document and have it in hand when doing the installation process. This document tries to be a good guideline for the installation and as such covers many details for the sake of completeness. Do not let this discourage you; the install program is not hard to use. . t .To 2 "Possible PCMCIA issues" .Em Possible Tn PCMCIA Em issues

p Machines with .Tn PCMCIA slots may have problems during installation. With the improvements of the .Tn PCMCIA code in this release, this will not happen very frequently. If you do not have .Tn PCMCIA on your machine .Tn ( PCMCIA is only really used on laptop machines), you can skip this section, and ignore the .Dq Bq Tn PCMCIA notes. If you do have .Tn PCMCIA in your machine, you can safely ignore this section and the .Dq Bq Tn PCMCIA the first time, as you are likely to not have problems. Should troubles occur during floppy boot, they may be .Tn PCMCIA specific. You should then re-read this section and try again, following the instructions in the .Dq Bq Tn PCMCIA notes.

p This section explains how to work around the installation problem.

p The kernel keeps careful track of what interrupts and I/O ports are in use during autoconfiguration. It then allows the .Tn PCMCIA devices to pick unused interrupts and I/O ports. Unfortunately, the .Tn Li INSTALL kernel may not detect all devices in your system. This may be because the .Tn Li INSTALL kernel only supports the minimum set of devices to install .Nx on your system, or it may be that .Nx does not have support for the device causing the conflict.

p For example, suppose your laptop has a soundblaster device built in; the .Tn Li INSTALL kernel has no sound support. The .Tn PCMCIA code might allocate your soundblaster's .Tn IRQ and I/O ports to .Tn PCMCIA devices, causing them not to work, or to lock up the system. This is especially bad if one of the devices in question is your ethernet card.

p As of .Nx 1.5 , the kernel attempts to probe for available interrupts that are usable by the .Tn PCIC .Tn ( PCMCIA interrupt controller). Assuming that this functions correctly, it should alleviate interrupt conflicts; however, I/O port conflicts are still possible.

p This problem will impact some, but not all, users of .Tn PCMCIA . If this problem is affecting you, watch the .Dq Bq Tn PCMCIA notes that will appear in this document.

p It can be difficult to distinguish an interrupt conflict from an I/O space conflict. There are no hard-and-fast rules, but interrupt conflicts are more likely to lock up the machine, and I/O space conflicts are more likely to result in misbehavior (e.g. a network card that cannot send or receive packets).

p The kernel selects a free interrupt according to a mask of allowable interrupts, stored in the kernel global variable .Va pcic_isa_intr_alloc_mask . This mask is a logical-or of power-of-2s of allowable interrupts: .(disp IRQ Val IRQ Val IRQ Val IRQ Val 0 0x0001 4 0x0010 8 0x0100 12 0x1000 1 0x0002 5 0x0020 9 0x0200 13 0x2000 2 0x0004 6 0x0040 10 0x0400 14 0x4000 3 0x0008 7 0x0080 11 0x0800 15 0x8000 .disp)

p For example, 0x0a00 allows both IRQ 9 and IRQ 11. By default, the .Tn Li INSTALL kernel permits all IRQs other than IRQs 5 and 7, so the corresponding mask is 0xff5f. The .Tn Li GENERIC kernel, however, allows all IRQs. (The presumption here is that IRQ 10 may be assigned to a device that the .Tn Li GENERIC kernel supports, but that the .Tn Li INSTALL does not.) Because of support for interrupt probing, it is no longer necessary to exclude IRQs 3 and 5 explicitly; if they are in use, they should not be assigned to .Tn PCMCIA .

p The kernel selects IO space by assigning cards IO space within a predefined range. The range is specified as a base and size, specified by the kernel global variables .Va pcic_isa_alloc_iobase and .Va pcic_isa_alloc_iosize . For systems with 12-bit addressing (most systems), the kernel defaults to a base of 0x400 and a size of 0xbff (a range of 0x400-0xfff). For systems with 10-bit addressing, the kernel defaults to a base of 0x300 and a size of 0xff (range of 0x300-0x3ff).

p Unfortunately, these ranges may conflict with some devices. In the event of a conflict, try a base of 0x330 with a size of 0x0bf (range of 0x330-0x3ff).

p In order to work around this at installation time, you may boot the .Tn Li INSTALL kernel with c boot Fl d , in order to enter .Xr ddb 4 (the in-kernel debugger), and then use the c write command to alter the variable values:

p .Dl db\*> Ic "write pcic_isa_intr_alloc_mask 0x0a00" .Dl "pcic_isa_intr_alloc_mask 0xff5f = 0xa00" .Dl db\*> Ic "write pcic_isa_alloc_iobase 0x330" .Dl "pcic_isa_alloc_iobase 0x400 = 0x330" .Dl db\*> Ic "write pcic_isa_alloc_iosize 0x0bf" .Dl "pcic_isa_alloc_iosize 0xbff = 0xbf" .Dl db\*> Ic "continue"

p Note that, since some floppy images may not have symbol information in the kernel, you may have to consult the matching

a .symbols file in the

a binary/kernel directory in the installation tree. Find the pcic_ symbols used above, look at the hexadecimal value in the first column, and write, for example (if .Va pcic_isa_intr_alloc_mask is equal to c0513e3c):

p .Dl db\*> Ic "write 0xc0513e3c 0x0a00"

p After installation, this value can be permanently written to the kernel image directly with:

p .Dl # Ic "cp /netbsd /netbsd.bak" .Dl # Ic "gdb --write /netbsd" .Dl (gdb) Ic "set pcic_isa_intr_alloc_mask=0x0a00" .Dl (gdb) Ic "set pcic_isa_alloc_iobase=0x330" .Dl (gdb) Ic "set pcic_isa_alloc_iosize=0x0bf" .Dl (gdb) Ic "quit" .Dl #

p or you could specify these value when configuring your kernel, e.g.: .(disp options PCIC_ISA_INTR_ALLOC_MASK=0x0a00 options PCIC_ISA_ALLOC_IOBASE=0x330 options PCIC_ISA_ALLOC_IOSIZE=0x0bf .disp)

p If you can get your .Tn PCMCIA card to work using this hack, you may also ignore the q Tn PCMCIA notes later in this document.

p We hope to provide a more elegant solution to this problem in a future .Nx release. .\} \" \n[i386] .\} \" !\n[acorn26]:\n[atari]:\n[macppc]:\n[mvme68k]:\n[news68k]:\n[newsmips]:\n[pmax]:\n[sgimips]:\n[sparc]:\n[walnut]:\n[x68k] t .To 2 "Possible hardware-specific issues" .Em Possible hardware-specific issues .(bullet .Em SCSI driver problems

p The SCSI driver used in the kernel on many older Macintosh systems is, by default, the ncrscsi driver. It contains a recognized but as yet unfixed bug that affects some disk drive/controller combinations, usually Quantum disks. Under heavy load these systems may hang or corrupt the file system; or, you may experience frequent .Em Segmentation fault and .Em Illegal instruction errors that may or may not be consistently repeatable. This latter condition is particularly prevalent on systems with minimal RAM installed.

p If either of these problems occur on your system you are advised to use the SBC variants of the Kernel and Installation Kernel. However, be aware that this issue does not affect e.g. Centris or Quadra systems.

p t .Em The 68LC040 processor

p .Nx has known but unresolved problems running on the 68LC040 processor, the variant of the 68040 that does not contain the floating point unit (FPU). The kernel is thus forced to emulate the missing operations in software. Unfortunately the 68LC040 processor has a design problem that causes the emulation to fail intermittently. We hope to provide a solution for this issue in a future .Nx release.

p Software emulation of floating point operations is not a problem on the 68020 and 68030 processors. .bullet) .\} \" \n[mac68k] t .To 2 General .Em General

p The following is a walk-through of the steps you will take while getting .Nx installed on your hard disk. c sysinst is a menu driven installation system that allows for some freedom in doing the installation. Sometimes, questions will be asked and in many cases the default answer will be displayed in brackets

q Dq [ ] after the question. If you wish to stop the installation, you may press .Key CONTROL-C at any time, but if you do, you'll have to begin the installation process again from scratch by running the

a /sysinst program from the command prompt. It is not necessary to reboot. t .To 2 "Quick install" .Em Quick install

p First, let's describe a quick install. The other sections of this document go into the installation procedure in more detail, but you may find that you do not need this. If you want detailed instructions, skip to the next section. This section describes a basic installation, using a CD-ROM install as an example.

p .(bullet What you need. .(bullet The distribution sets (in this example, they are on CD). t Some form of bootable media, described above. .\} A floppy disk containing a suitable boot.fs and a floppy with the sysinst.fs image. See the "prepare" section about obtaining those. .\} .\}\}\}\} .\} \" !\n[pmax]:\n[sgimips] t A PC with a 386 or newer processor. .\} \" \n[i386] t A Macintosh with a 68020 and MMU, 68030 or 68RC040 processor. An FPU is not required but will be used if present (but see the note above regarding the 68LC040). .\} t A CD-ROM drive a harddisk and a minimum of of memory installed. t The harddisk should have at least + .Em n megabytes of space free, where .Em n is the number of megabytes of main memory in your system. If you wish to install the X Window System as well, you will need at least 60 MB more. .bullet) t Creating the boot floppies. You can create the floppies needed for installation under .Tn MS-DOS or .Tn Windows . Supposing your 1.44 MB floppy drive is drive A:, and your CD is drive E: do the following from an .Tn MS-DOS command prompt:

p .Dl Ic "e:" .Dl Ic "cd \eNetBSD-\*V\ei386\einstallation\emisc" .Dl Ic "rawrite"

p When asked for a source filename, answer .Dl Pa ..\efloppy\eboot1.fs for the first diskette and .Dl Pa ..\efloppy\eboot2.fs for the second diskette. .\}

p When asked for a destination drive answer .Sq Ic a . t To create a bootfloppy under .Nx or other l system, you would type something like:

p .Dl # Ic "dd if=.../boot1.fs bs=18k of=/dev/rfd0a"

p .\} \" \n[alpha]:\n[i386]:\n[news68k]:\n[newsmips] t The NetBSD Boot Tools folder. .(bullet Create a Folder on your Mac OS disk for the .Nx*M components. t Copy the Booter application into the newly created Folder. Expand the file if necessary to create the Mac OS executable. t Copy the Installation Kernels into the newly created Folder. It is not necessary to c gunzip compressed kernel files. t Single-click on the Booter application icon then select the "Get Info" from the File Menu list. Increase the memory allocation for the Booter to as much as possible for your system. Having a large number of fonts, extensions or sounds installed on your system can cause memory exhaustion problems for the Booter if you don't do this. Also, the extra memory is needed by the Booter to expand compressed kernels while booting. .bullet) .\} t The Quick Installation .(bullet Boot the system as described above. You should be at the c sysinst main menu. .\} Double-click on the Booter application icon to start executing it. From the c Options pull-down menu, select c Monitors , then select c Change Monitor Depth and make sure B\*&W is highlighted. Close the window using the c Close button. t From the c Options pull-down menu select c Boot Options . This will bring up an option panel. Set the c Auto-set GMT Bias checkbox in the lower left and then select the c Boot from Mac OS option at the top of the window. The c Set button on the right will become active. Use it to locate and select the Installation Kernel file appropiate for your hardware. This will be either

a netbsd-INSTALL.gz or

a netbsd-INSTALLSBC.gz . Close the window using the c Close button. t From the c Options pull-down menu select the c Boot Now , or use the Apple-B (Command-B) key combination to start the .Nx boot process. Do not move the mouse while the boot operation is in progress as this may leave the keyboard locked to .Nx .

p The main menu will be displayed. .\} Insert the first boot floppy you just created. the computer. Type

p .Dl \*>\*>\*> Ic "B DVA0"

p .\} Type

p .Dl NEWS\*> Ic "bo fh"

p .\} Type

p .Dl \*> Ic "bo fd" (in case of NWS-5000)

p or

p .Dl \*> Ic "bo fh" (in case of NWS-3xxx)

p .\} The main menu will be displayed. .\}\} .(disp . cs \n(.f 22 ) - appease vi showmatch
.***********************************************. * NetBSD-1.6 Install System * * * *\*>a: Install NetBSD to hard disk * * b: Upgrade NetBSD on a hard disk * * c: Re-install sets or install additional sets * * d: Reboot the computer * * e: Utility menu * * x: Exit Install System * .***********************************************. . cs \n(.f ) - appease vi showmatch
.disp) t If you wish, you can configure some network settings immediately by choosing the .Me Utility menu and then .Me Configure network . It isn't actually required at this point, but it may be more convenient. Go back to the main menu. t Choose .Me install . t You will be guided through some steps regarding the setup of your disk, and the selection of distributed components to install. When in doubt, refer to the rest of this document for details. WARNING: If you want your disk to retain an AHDI compatible partitioning, make sure to use the 'existing' disk layout. .\} t After your disk has been prepared, choose .Me Unmounted file system as the medium. The CD-ROM device is usually cd0 and the partition .Sq a

q i.e. cd0a . .\} .Me CD-ROM as the medium. The default values for the path and device should be ok. .\} t After all the files have been unpacked, go back to the main menu and select .Me reboot. .\} .Me reboot , after you have removed the bootfloppy from the drive. .\} t Once the system reaches the Open Firmware prompt, you will need to type the correct command to boot from your hard drive. .\} Once the system reaches the PROM prompt, you will need to type the correct command to boot from your hard drive. .\} Once the system reaches the PROM prompt, you will need to modify your PROM environment settings for SystemPartition, OSLoadPartition, OSLoader, OSLoadFilename and OSLoadOptions and then boot the hard drive. .\} .Nx will now boot. If you haven't already done so in c sysinst , you should log in as .Li root , and set a password for that account. You are also advised to edit the file

a /etc/rc.conf to match your system needs. t Your installation is now complete. t For configuring the X window system, if installed, see the files in

a /usr/X11R6/lib/X11/doc . Further information can be found on .Lk http://www.xfree86.org/ . .\} Further information can be found on .Lk http://www.netbsd.org/Ports/macppc/x11.html .\} .bullet) .bullet) t .To 2 "Booting NetBSD" .Em Booting NetBSD . .(pcmcia Unplug your .Tn PCMCIA devices, so that they won't be found by .Nx . .pcmcia) .\} \" !\n[acorn26]:\n[atari]:\n[cats]:\n[macppc]:\n[mvme68k]:\n[news68k]:\n[pmax]:\n[sgimips]:\n[sparc]:\n[walnut]:\n[x68k]

p Prior to attempting to boot .Nx*M verify that all the following are done: .(bullet Enable 32-bit addressing in the Memory Control Panel [1]. t Disable all forms of virtual memory (the Memory Control Panel, RAM Doubler, or other software-based memory enhancement products). t Place the system in B\*&W Mode (1-bit color or grayscale) as shown in the Monitors Control Panel or in the Monitors options dialog of the Booter. You may choose to have the Booter do this for you automatically by selecting the appropiate check box and radio button in the c Monitors dialog on the c Options menu. .bullet)

p It is probably best to boot your machine with all extensions turned off [1]. You can do this by booting into Mac OS with the .Key SHIFT key held down. You may have to restart your Macintosh for changes to take effect before proceeding. .(tag [1] t [1] If your version of the Memory control panel does not have a 32-bit addressing mode radio button, this means that your system is already 32-bit clean and is running in 32-bit addressing mode by default. If the Booter complains that your are not in 32-bit mode, it may be necessary for you to press the "Use Defaults" button in the Memory control panel to restore 32-bit addressing. You should probably reboot after doing so. If you have an older II-class system (including the II, IIx, IIcx, and SE/30), it is necessary to install Connectix's MODE32 to work around ROM issues which prevent you from enabling 32-bit addressing. Please see the .Nx*M FAQ at .Lk http://www.netbsd.org/Ports/mac68k/faq/ for more information.

p Double-click on the .Nx*M Booter icon to start the application. Select c Booting from the c Options menu. Select the Kernel Location to be from Mac OS with the filename corresponding to the name of the Installation Kernel you are using. Typically this will be netbsd-INSTALL.gz.

p If you haven't already put your Macintosh into B\*&W mode, select the c Monitor Options from the c Options menu and check the box for B\*&W mode.

p Try booting .Nx by selecting c Boot Now from the c Options menu.

p If the system does not come up, send mail to .Mt port-mac68k@netbsd.org describing your software, your hardware, and as complete a description of the problem as you can. As an alternative, try using the Traditional method of installation described in the next section. .\}

p You may want to read the boot messages, to notice your disk's name and capacity. Its name will be something like .Li sd0 or .Li wd0 .\} and the geometry will be printed on a line that begins with its name. As mentioned above, you may need your disk's geometry when creating .Nx 's partitions. You will also need to know the name, to tell c sysinst on which disk to install. The most important thing to know is that .Li wd0 is .Nx 's name for your first IDE disk, .Li wd1 the second, etc. .\} .Li sd0 is your first SCSI disk, .Li sd1 the second, etc. .\} . .

p Boot the system as described in the "Booting the installer" section above. .\} Boot your machine. The boot loader will start, and will print a countdown and begin booting.

p If the boot loader messages do not appear in a reasonable amount of time, you either have a bad boot floppy or a hardware problem. Try writing the install floppy image to a different disk, and using that. .\}

p If that doesn't work, try booting after disabling your CPU's internal and external caches (if any). If it still doesn't work, .Nx probably can't be run on your hardware. This can probably be considered a bug, so you might want to report it. If you do, please include as many details about your system configuration as you can. .\}

p It will take a while to load the kernel from the floppy, .\} probably around a minute or so, then, the kernel boot messages will be displayed. This may take a little while also, as .Nx will be probing your system to discover which hardware devices are installed. You may want to read the boot messages, to notice your disk's name and geometry. Its name will be something like .Li sd0 or .Li wd0 and the geometry will be printed on a line that begins with its name. As mentioned above, you may need your disk's geometry when creating .Nx 's partitions. You will also need to know the name, to tell c sysinst on which disk to install. .\} The most important thing to know is that .Li wd0 is .Nx 's name for your first IDE disk, .Li wd1 the second, etc. .Li sd0 is your first SCSI disk, .Li sd1 the second, etc.

p Note that once the system has finished booting, you need not leave the floppy in the disk drive. .\} Earlier version of the .Nx install floppies mounted the floppy as the system's root partition

q Pa / , but the new installation floppies use a ramdisk file system and are no longer dependent on the floppy once it has booted. .\} .\}\}

p Once .Nx has booted and printed all the boot messages, you will be presented with a welcome message and a main menu. It will also include instructions for using the menus. t .To 2 "Network configuration" .Em Network configuration .(pcmcia You can skip this section, as you will only get data from floppy in the first part of the install. .pcmcia) .\} \" !\n[acorn26]:\n[atari]:\n[cats]:\n[mac68k]:\n[macppc]:\n[mvme68k]:\n[news68k]:\n[newsmips]:\n[pmax]:\n[sgimips]:\n[sparc]:\n[walnut]:\n[x68k]

p If you will not use network operation during the installation, but you do want your machine to be configured for networking once it is installed, you should first go to the .Me Utility menu , and select the .Me Configure network option. If you only want to temporarily use networking during the installation, you can specify these parameters later. If you are not using the Domain Name System (DNS), you can give an empty response in reply to answers relating to this. t .To 2 "Preparing a disk for Mac OS and NetBSD" .Em "Preparing a disk for" .Tn Mac OS .Em and NetBSD

p c sysinst can manipulate the Apple Disk Partition Map allowing you to partition your disk for use with .Nx . It does not support resizing existing .Tn Mac OS HFS disk partitions. If there is insufficient Free space on the disk to support an installation of .Nx you will need to backup, repartition and restore your existing .Tn Mac OS partitions before proceeding. You may choose to use a Traditional method of creating disk partitions for .Nx if you wish. They can still be used by c sysinst for a .Nx installation. .\} t .To 2 "Preparing a disk which will be used for Mac OS and NetBSD" .Em "Preparing a disk which will be used for" .Tn Mac OS .Em and NetBSD

p Skip this step if you are installing .Nx onto a dedicated drive.

p Go to the .Me "Utility Menu" , and select the .Me "Run /bin/sh" option which will give you a shell prompt. From this shell prompt, you will do some of the steps that the normal install procedure runs automatically. Unfortunately, at the moment, our install tools aren't smart enough to deal with drives shared with .Tn Mac OS and will overwrite important information describing your partitions.

p You may need to type one of the following commands to get your delete key to work properly, depending on your keyboard: .Dl # Ic "stty erase '^h'" .Dl # Ic "stty erase '^?'"

p Type the following command (replacing

a wd0 with the name of your destination hard drive): .Dl # Ic "disklabel wd0"

p This will print out the partition info that was generated by Drive Setup. Note that, as discussed above in the .Sx Partitioning your hard drive for NetBSD section, your .Em "A/UX Root" typically is the first partition

q Em a and your .Em "A/UX Swap" typically is the second partition

q Em b . You may also find that your .Em "A/UX User" partition is the seventh partition

q Em g . For example: .(disp .Dl # Ic "disklabel wd0" [...] # size offset fstype [fsize bsize cpg/sgs] a: 426613 837432 4.2BSD 0 0 0 # (Cyl. 1622*- 2449*) b: 204800 632632 swap # (Cyl. 1226*- 1622*) c: 2134305 0 unused 0 0 # (Cyl. 0 - 4136*) d: 426616 1216 HFS # (Cyl. 2*- 829*) e: 204800 427832 HFS # (Cyl. 829*- 1226*) f: 21 2134284 unknown # (Cyl. 4136*- 4136*) g: 870239 1264045 4.2BSD 0 0 0 # (Cyl. 2449*- 4136*) disklabel: boot block size 0 disklabel: super block size 0 .disp)

p Now, you need to create file systems on the partitions that .Nx will be using.

p .Em "Do not modify any partitions labeled"

a HFS .Em or

a unknown . The partitions you will be using have their

a fstype listed as

a 4.2BSD .

p Run the c newfs command on the

a 4.2BSD partitions: .(disp .Dl # Ic "newfs /dev/wd0a" newfs: /dev/sd1a: not a character-special device Warning: 120 sector(s) in last cylinder unallocated /dev/sd1a: 426612 sectors in 827 cylinders of 4 tracks, 129 sectors 208.3MB in 52 cyl groups (16 c/g, 4.03MB/g, 1024 i/g) super-block backups (for fsck -b #) at: 32, 8432, 16832, 25232, 33056, 41456, 49856, 58256, 66080, 74480, 82880, 91280, 99104, 107504, 115904, 124304, 132128, 140528, 148928, 157328, 165152, 173552, 181952, 190352, 198176, 206576, 214976, 223376, 231200, 239600, 248000, 256400, 264224, 272624, 281024, 289424, 297248, 305648, 314048, 322448, 330272, 338672, 347072, 355472, 363296, 371696, 380096, 388496, 396320, 404720, 413120, 421520, newfs: ioctl (WDINFO): Invalid argument newfs: /dev/sd1a: can't rewrite disk label .disp) You can ignore the

a Sq "not a character-special device" ,

a Sq "sector(s) in last cylinder unallocated" ,

a Sq "ioctl (WDINFO): Invalid argument" , and

a Sq "can't rewrite disk label" warnings.

p Now you need to mount your destination root partition: .Dl # Ic "mount /dev/wd0a /mnt"

p Make an

a fstab file for your new system (right now, you only really need to include

a / ,

a /usr , and

a swap ) , for example: .Dl # Ic "mkdir /mnt/etc" .Dl # Ic "cat \*> /mnt/etc/fstab" .Dl "/dev/wd0a / ffs rw 1 1" .Dl "/dev/wd0b none swap sw 0 0" .Dl "/dev/wd0g /usr ffs rw 1 2"

p If you mess up while typing, you can press .Key CONTROL-U to erase everything on the current line, or .Key CONTROL-C to cancel the file creation, so you can start over.

p Great, now create the mountpoints for the file systems you listed in the

a fstab : .Dl # Ic "mkdir /mnt/usr"

p Clean up and return to c sysinst : .Dl # Ic "cd /;umount /mnt" .Dl # Ic exit .\} t .To 2 "Installation drive selection and parameters" .Em Installation drive selection and parameters

p To start the installation onto a dedicated .Nx drive, .\} select .Me Install NetBSD to hard disk from the main menu. To start the installation, select the menu option in install .Nx from the main menu. .\} To start the installation onto a drive which will also be used with .Tn Mac OS , select .Me Re-install sets or install additional sets from the main menu. .\}

p The first thing is to identify the disk on which you want to install .Nx . c sysinst will report a list of disks it finds and ask you for your selection. Depending on how many disks are found, you may get a different message. You should see disk names like .Li rz0 or .Li rz1 .\} .Li wd0 , .Li wd1 , .\} .Li sd0 or .Li sd1 .

p c sysinst next tries to figure out the real and BIOS geometry of your disk. It will present you with the values it found, if any, and will give you a chance to change them. .\}

p c sysinst next tries to figure out how the selected volume has been partitioned. It does this by reading the Apple Disk Partition Map from the disk. If the disk does not have a Partition Map, c sysinst will give you the option of writing one, but doing so will not make the disk a Mac OS bootable volume. You will have the option of creating HFS partitions that may be subsequentially initialized and used under Mac OS though. .\}

p Next, depending on whether you are using a .Li wd Ns Ar X or .Li sd Ns Ar X disk, you will either be asked for the type of disk

q Li wd Ns Ar X you are using or you will be asked if you want to specify a fake geometry for your SCSI disk

q Li sd Ns Ar X . The types of disk are be .Tn IDE, ST-506 or .Tn ESDI . If you're installing on an .Tn ST-506 or .Tn ESDI drive, you'll be asked if your disk supports automatic sector forwarding. If you are .Em sure that it does, reply affirmatively. Otherwise, the install program will automatically reserve space for bad144 tables. .\} If c sysinst reports .Dl "I can not find any hard disk for use by NetBSD" or the drive you wish to install onto is missing, then you should look at the FAQ entry .Lk http://www.netbsd.org/Ports/macppc/faq.html#nodisk .\} .\} t .To 2 "Partitioning the disk" .Em Partitioning the disk .(bullet Preparing a disk which will be used for .Tn GEM and .Nx .

p You will be prompted if you want an AHDI compatible partitioning on your disk. If you are installing .Nx on a dedicated drive, just answer 'no' and skip to the next section.

p If you answer 'yes', the c ahdilabel program is started. You can now change the AHDI partition ID's on your root disk. Because NetBSD imposes a special ordering in disk partitions it uses for / (root) and swap. Also, because it wants to guard you against an unwanted demolition of partitions used by other systems, you have to tell it what partitions it is allowed to use. You have to mark the partition you want to use as swap SWP or (depricated!) NBS and the other partitions as NBD. Note that all the changes you make to the ID's are reversable as long as you remember the original value. As of NetBSD 1.5, ahdilabel is capable of creating or changing an AHDI compatible partioning on the disk! In the partition-ID editor, the partitions are shown in the order that AHDI created them. When you leave this editor and continue with c sysinst, your changes to the ID's do have consequences to the partition order! They will show up as follows: .(tag 13n -offset indent t Li a the first NBD partition t Li b the first SWP (or NBS) partition t Li d (and up) the rest of the partitions in AHDI order .bullet) .\} \" \n[atari]

p You can skip a few steps, down to .Em Sq "Getting the distribution sets" , if you are installing onto a drive that will be used with .Tn Mac OS (i.e. you selected .Me "Re-install sets or install additional sets" from the main menu). .\} \" \n[macppc] .(bullet It is imprtant to note the disk on which .Nx is being installed on must already have an SGI volume header. Disks not already formatted for .Tn IRIX can be prepared with the .Tn IRIX .Xr fx 1 disk formatting tool. t Please also note that shared installs of .Tn IRIX and .Nx on the same drive have not been tested, and as such may cause problems or may not work. It is .Em strongly recommended that all data is backed before attempting such installs. .bullet) .\} \" \n[sgimips] .(bullet Which portion of the disk to use.

p You will be asked if you want to use the entire disk or only part of the disk. If you decide to use the entire disk for .Nx , it will be checked if there are already other systems present on the disk, and you will be asked to confirm whether you want to overwrite these. t Definition of the NetBSD disklabel.

p The Apple Disk Partition Map is used to create an in-core map of the disk called the disklabel. A minimum of two NetBSD partitions will be required, one for root and one for swap. Up to eight partitions may be used by NetBSD. Up to 32 partitions may exist on the disk which can be any combination of Mac OS HFS, Free, Scratch and .Nx partitions, although only the first eight which meet the needs of .Nx will be seen and mapped to the .Nx disklabel.

p Some partitions in the disklabel have a fixed purpose. Partition 'a' is always the root partition, 'b' is the swap partition and 'c' is the entire disk. Partitions 'd' through 'h' are available for other use. Traditionally, 'g' is the partition mounted on the /usr directory, but this is historical practice, not a fixed value. t Editing the .Nx Disklabel (and the underlying Apple Disk Partition Map).

p You will be presented with the current layout of the disk as seen by .Nx , and given a change to change it. (Even though .Nx can only use the first eight qualified partitions, all partitions found on the disk will be displayed.) The partitions found on the disk will be shown in the top section of the display. Each will be identified with the name assigned by .Nx , the current size, offset, type, use and mount point. The partition currently being modified will be highlighted in inverse video. The bottom part of the display will list the operations which may be performed on the selected (highlighted) partition. The options are: .(bullet Select next partition

p This highlights the next partition in the upper display list and makes it the current one selected for manipulation. t Change selected partition

p This changes the type assigned to the partition. A partition may be assigned for use as a .Nx Root, SWAP, Usr, or Root&Usr; it may be assigned for use as a Mac OS HFS partition; a Scratch (for later reassignment); or a Free partition. Free partitions which are physically adjacent to each other will be collapsed into a single Free partition. t Set mount point for partition

p This designates the .Nx file system mount point for the partition, and gets transferred into the /etc/fstab definition so .Nx knows where to mount the file system on subsequent boots. The option only applies to .Nx Root, Usr, Root&Usr or Mac OS HFS partitions, although currently HFS access is not supported without optional software components. A common set of predefined mount points (/usr, /home, /var, /tmp or None) will be presented to you to assist you in defining the most commonly used, but you may enter you own names if you choose. Selecting "None" will clear the mount point name and keep the partition from being defined in the resulting

a /etc/fstab file. t Split selected partition

p This option divides the selected partition into two separate partitions if there is space available in the Disk Partition Map. You will be prompted for the size of the first segment and the remaining portion will be allocated to the second segment. The first segment will be designated as a Scratch type, and the second will be designated as a Free type. To clear a split, or remerge two adjacent partitions into a single one, change both to be Free types. c sysinst will merge them and update the display.

p This is the primary option used to partition the disk since it allows you to sub-divide the selected partition into two partitions. Changing the types associated with the resulting two parts, or splitting the second part further sub-divides the original partition. t Page Up, Page Down

p These entries allow you to scroll the upper display if more than eight partitions currently exist on the disk. t Fix selected partition

p This option reviews the partition's size and starting address and fixes the values if they overlap any adjacent partition. This is primarily a debugging option and shouldn't be necesary during a normal installation. However, some 3rd party disk formatters have been known to create bogus entries in the Apple Disk Partition Map, and this option can aid is repairing these entries. t Exit

p This option completes the disk partitioning and returns you to the previous installation menu. At that point you will be given one last opportunity to bail out before committing the changes to the Disk Partition Map recorded on the disk. .bullet)

p t Recommended approach to partitioning

p The simplest method of approaching disk partitioning with c sysinst is to convert everything that can be used for .Nx into a Free type partition. This will allow c sysinst to collapse and merge all the available space. Then cycle through the Select, Split, Select, Change, and Set Mount Point options for each of the .Nx partitions that are desired. Since .Nx*M has a very specific mount order for partitions during system boot, it is best to create your .Nx partitions in the following order: Root, SWAP, Usr where the partitions will be mounted in order on 'a', 'b', 'g', 'd', 'e', 'f', and 'h'.

p At least one Root or Root&Usr is required, and a SWAP partition is highly desirable. As a general rule you will need twice as much swap space as you have RAM, more if you plan on running X, Web applications or doing heavy development in a multi-user environment. The Root partition, if it is separate from your Usr, usually requires about 24 MB.

p If multiple Root partitions are defined, the second is usually mounted on /altusr by default. .Nx*M automatically mounts all Root partitions after the first as Usr type partitions. However, it is best to be very specific about mount points and partition type and use. .\} .bullet)

p If you want to use the entire disk for .Nx , you can skip the following section and go to .Em "Editing the NetBSD disklabel" . t .Em "Editing the Master Boot Record"

p First, you will be prompted to specify the units of size that you want to express the sizes of the partitions in. You can either pick megabytes, cylinders or sectors.

p After this, you will be presented with the current values stored in the MBR, and will be given the opportunity to change, create or delete partitions. For each partition you can set the type, the start and the size. Setting the type to c unused will delete a partition. You can also mark a partition as active, meaning that this is the one that the BIOS will start from at boot time.

p Be sure to mark the partition you want to boot from as active!

p After you are done editing the MBR, a sanity check will be done, checking for partitions that overlap. Depending on the BIOS capabilities of your machine and the parameters of the .Nx partition you have specified, you may also be asked if you want to install newer bootcode in your MBR. If you have multiple operating systems on the disk that you are installing on, you will also be given the option to install a bootselector, that will allow you to pick the operating system to start up when your computer is (re-)started.

p If everything is ok, you can go on to the next step, editing the .Nx disklabel.

p .\} .\} \" !\n[atari]:\n[macppc]:\n[sgimips] . t .Em Editing the NetBSD disklabel

p The partition table of the .Nx part of a disk is called a .Em disklabel . In actuality, .Nx*M uses an Apple Partition Map. The installer creates something like a real Apple Partition Map, but it is not compatible with .Tn Mac OS , which is one of the reasons why you cannot use this installer to partition a disk that can be used with .Tn Mac OS .

p .\} .Nx disklabels on \*M are compatible with the boot ROMs, and with .Tn SunOS and .Tn Solaris . .\} There are 4 layouts for the .Nx part of the disk that you can pick from: c Standard, Standard with X, Custom and c Use Existing . The first two use a set of default values (that you can change) suitable for a normal installation, possibly including X. With the c Custom option you can specify everything yourself. The last option uses the partition info already present on the disk.

p If you want to use .Nx on an AHDI partitioned disk, you will have to use: c Use Existing .

p .\} You will be presented with the current layout of the .Nx disklabel, and given a chance to change it. For each partition, you can set the type, offset and size, block and fragment size, and the mount point. The type that .Nx uses for normal file storage is called .Sy 4.2BSD . A swap partition has a special type called .Sy swap . . You can also specify a partition as type .Sy MSDOS . This is useful if you share the disk with .Tn MS-DOS or .Tn Windows ; .Nx is able to access the files on these partitions. You can use the values from the MBR for the .Tn MS-DOS part of the disk to specify the partition of type .Sy MSDOS (you don't have to do this now, you can always re-edit the disklabel to add this once you have installed .Nx ).

p .\} . Some partitions in the disklabel have a fixed purpose. .(tag 6n -offset indent t Li a Root partition

q Pa / t Li b Swap partition. t Li c The .Nx portion of the disk. t Li \*[part_raw] The entire disk. .\} t Li d The SGI volume header (boot partition) .\} t Li \*[part_free]-\*[part_max] Available for other use. Traditionally, .Li \*[part_usr] is the partition mounted on

a /usr , but this is historical practice and not a fixed value. .\} \" !\n[mac68k] .

p You will then be asked to name your disk's disklabel. The default response is .Dq Sy mydisk . For most purposes this will be OK. If you choose to name it something different, make sure the name is a single word and contains no special characters. You don't need to remember this name. .\}

p t .To 2 "Preparing your hard disk" .Em Preparing your hard disk

p .Em "You are now at the point of no return". Apart from the changes you made with c ahdilabel nothing has been modified on your disk yet. If you confirm that you want to install .Nx , the partitions now assigned to .Nx will be actually written to. .\} Nothing has been written to your disk yet, but if you confirm that you want to install .Nx , your hard drive will be modified. .\} If you are sure you want to proceed, enter .Li yes at the prompt.

p The install program will now label your disk and make the file systems you specified. The file systems will be initialized to contain .Nx bootstrapping binaries and configuration files. You will see messages on your screen from the various .Nx disk preparation tools that are running. There should be no errors in this section of the installation. If there are, restart from the beginning of the installation process. Otherwise, you can continue the installation program after pressing the return key.

p .(Note In previous versions of .Nx , the kernel from the install floppy was copied onto the hard drive in a special step. In the current install system, the kernel on the floppy is unsuited to being copied onto the hard drive. Instead, a new set, .Sy kern , has been added which contains a generic kernel to be unloaded onto the drive. So, you can not boot from your hard drive yet at this point. .Note) .\}

p .(Note The bootstrapping code installed in this step will .Em not boot a machine with Open Firmware 3. You will still need to have

a ofwboot.xcf on an HFS or HFS+ partition. .Note) .\} t .To 2 "Getting the distribution sets" .Em Getting the distribution sets .(pcmcia . Load a kernel tar file (i.e. the

a kern-GENERIC.tgz set file) on to your hard disk, for example by mounting the hard disk first, copying the

a kern-GENERIC.tgz file from floppy and unpacking it. Example:

p .Dl # Ic "mount /dev/wd0a /mnt" .Dl # Ic "cd /mnt"

p .D1 Em "repeat the following 3 steps until all kern.* files are there" .Dl # Ic "mount -t msdos /dev/fd0a /mnt2" .Dl # Ic "cp /mnt2/kern.* ." .Dl # Ic "umount /mnt2" .Dl # Ic "cat kern.* | tar zxpvf -"

p Then halt the machine using the c halt command. Power the machine down, and re-insert all the .Tn PCMCIA devices. Remove any floppy from the floppy drive. Start the machine up. After booting .Nx , you will be presented with the main c sysinst menu. Choose the option to re-install sets. Wait for the file system checks that it will do to finish, and then proceed as described below. .pcmcia) .\}

p The .Nx distribution consists of a number of .Em sets , that come in the form of gzipped tarfiles. A few sets must be installed for a working system, others are optional. At this point of the installation, you will be presented with a menu which enables you to choose from one of the following methods of installing the sets. Some of these methods will first load the sets on your hard disk, others will extract the sets directly.

p For all these methods, the first step is making the sets available for extraction, and then do the actual installation. The sets can be made available in a few different ways. The following sections describe each of those methods. After reading the one about the method you will be using, you can continue to section labeled .Sq Extracting the distribution sets . t .To 2 "Installation using ftp" .Em Installation using ftp

p To be able to install using ftp, you first need to configure your network setup, if you haven't already at the start of the install procedure. c sysinst will do this for you, asking you to provide some data, like IP address, hostname, etc. If you do not have name service set up for the machine that you are installing on, you can just press .Key RETURN in answer to these questions, and DNS will not be used.

p You will also be asked to specify the host that you want to transfer the sets from, the directory on that host, the account name and password used to log into that host using ftp, and optionally a proxy server to use. If you did not set up DNS when answering the questions to configure networking, you will need to specify an IP address instead of a hostname for the ftp server.

p c sysinst will proceed to transfer all the default set files from the remote site to your hard disk. t .To 2 "Installation using NFS" .Em Installation using NFS

p To be able to install using NFS, you first need to configure your network setup, if you haven't already at the start of the install procedure. c sysinst will do this for you, asking you to provide some data, like IP address, hostname, etc. If you do not have name service set up for the machine that you are installing on, you can just press .Key RETURN in answer to these questions, and DNS will not be used.

p You will also be asked to specify the host that you want to transfer the sets from, and the directory on that host that the files are in. This directory should be mountable by the machine you are installing on, i.e. correctly exported to your machine.

p If you did not set up DNS when answering the questions to configure networking, you will need to specify an IP address instead of a hostname for the NFS server. t .To 2 "Installation from CD-ROM" .Em Installation from CD-ROM

p The bootable CD-ROM distribution for .Nx*M is not ISO-9660 formatted. This function cannot be used for installation. Use the "Installation from an unmounted file system" selection. .\} When installing from a CD-ROM, you will be asked to specify the device name for your CD-ROM player

q usually Li cd0 , and the directory name on the CD-ROM where the distribution files are.

p c sysinst will then check if the files are indeed available in the specified location, and proceed to the actual extraction of the sets. .\} t .To 2 "Installation from a floppy set" .Em Installation from a floppy set

p Because the installation sets are too big to fit on one floppy, the floppies are expected to be filled with the split set files. The floppies are expected to be in .Tn MS-DOS format. You will be asked for a directory where the sets should be reassembled. Then you will be prompted to insert the floppies containing the split sets. This process will continue until all the sets have been loaded from floppy. .\} t .To 2 "Installation from Mac OS file systems" .Em Installation from Mac OS file systems

p .Nx*M does not currently have in-kernel support for .Tn Mac OS HFS/HFS+ or AppleShare filesystems. c sysinst therefore can not access the file sets if they are on these filesystems. .\} t .To 2 "Installation from an unmounted file system" .Em Installation from an unmounted file system

p In order to install from a local file system, you will need to specify the device that the file system resides on the type of the file system, and the directory on the specified file system where the sets are located. c sysinst will then check if it can indeed access the sets at that location.

p If this is a CD-ROM installation, the device used will be the name for your CD-ROM player with partition letter 'a'

q usually cd0a . .\} Remember, .Nx*M doesn't grok HFS or HFS+ partitions .\} t .To 2 "Installation from a local directory" .Em Installation from a local directory

p This option assumes that you have already done some preparation yourself. The sets should be located in a directory on a file system that is already accessible. c sysinst will ask you for the name of this directory. t .To 2 "Extracting the distribution sets" .Em Extracting the distribution sets

p After the install sets containing the .Nx distribution have been made available, you can either extract all the sets (a full installation), or only extract sets that you have selected. In the latter case, you will be shown the currently selected sets, and given the opportunity to select the sets you want. Some sets always need to be installed

q Sy kern, base and .Sy etc they will not be shown in this selection menu.

p Before extraction begins, you can elect to watch the files being extracted; the name of each file that is extracted will be shown. This can slow down the installation process considerably, especially on machines with slow graphics consoles or serial consoles.

p If you are installing using the .Me "Re-install sets or install additional sets" option, then you will need to create the device nodes in

a /dev , otherwise, .\} all the necessary device node files will be created. If you have already configured networking, you will be asked if you want to use this configuration for normal operation. If so, these values will be installed in the network configuration files. The next menu will allow you to select the time zone that you're in, to make sure your clock has the right offset from UTC. Finally you will be asked to select a password encryption algorithm and can than set a password for the "root" account, to prevent the machine coming up without access restrictions. t .To 2 "Making the device nodes" .Em Making the device nodes

p If you are installing using the .Me "Re-install sets or install additional sets" option, then you will need to create the device nodes in

a /dev now. Otherwise, skip this step.

p Go to the main installation menu, and select .Me "Utility menu" and then select the .Me "Run /bin/sh" option, which will give you a shell prompt. You may need to type one of the following commands to get your delete key to work properly, depending on your keyboard: .Dl # Ic "stty erase '^h'" .Dl # Ic "stty erase '^?'"

p Type the following command (replacing

a wd0a with the partition name of your destination root partition): Now you need to mount your destination root partition: .Dl # Ic "mount /dev/wd0a /mnt" .Dl # Ic "cd /mnt/dev" .Dl # Ic "sh MAKEDEV all" .Dl # Ic "cd /;umount /mnt" .Dl # Ic "exit" .\} t .To 2 "Finalizing your installation" .Em Finalizing your installation

p Congratulations, you have successfully installed .Nx \*V .

p To finalize the installation of .Nx*M certain parameters on the Cyclone firmware need to changed. The reason is that the Cyclone firmware is unable to boot anything other than an a.out format kernels.

p Kernels created on a .Nx*M \*V system are natively ELF and converted to a.out. This conversion process loses the symbol information used for, amongst other things, kernel memory grovelers such as vmstat. The workaround to the problem is to provide both the native ELF kernel (with all the symbol information) and the a.out kernel. These are available as /netbsd and /netbsd.aout respectively. As the a.out format kernel is not named in such a way that the Cyclone firmware will automatically find it the following command should be issued as the firmware prompt.

p .Dl boot> Ic "set boot wd0:/netbsd.aout"

p .\} You can now reboot the machine, and boot .Nx from harddisk. .\} \" !\n[macppc] .enum)