1 .\" $NetBSD: install,v 1.20 2008/09/06 22:19:03 tsutsui Exp $
3 .\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
29 is a relatively complex process, but if you have
30 this document in hand it should not be too difficult.
32 There are several ways to install
37 machine has a tape drive the easiest way is
38 .Sx "Installing from tape"
40 All other machines can be installed easily over the network from a
43 .Sx "Installing from NFS"
45 Otherwise, if you have another \*M machine running
48 initialize the disk on that machine and then move the disk.
50 .Ss2 Installing from tape
54 \*V boot tape as described in the section
56 .Sx "Preparing a boot tape" .
57 Then, with the tape in the drive, type the following at the Bug prompt:
59 .Dl 147-Bug\*[Gt] Ic "bo 5"
61 .Dl 16x-Bug\*[Gt] Ic "bo 0,50"
63 As mentioned earlier, this assumes your tape is jumpered for SCSI-ID 5.
65 As the tape loads (which may take 20 to 30 seconds), you will see a
66 series of status messages.
67 It may be useful if you can capture these
68 messages to a file, or a scrollable xterm window.
69 In particular, you should make a note of the lines which describe the
70 geometry of the SCSI disks detected by
74 sd0 at scsibus0 targ 0 lun 0: \*[Lt]Maker, Disk, Foo\*[Gt] SCSI1 0/direct fixed
75 sd0: 800 MB, 800 cyl, 16 head, 128 sec, 512 bytes/sect x 1638400 sectors
78 The information of most interest is the number of sectors; for the fictitious
79 disk above, it's 1638400.
80 You will need this number when you come to create a disklabel for that drive.
82 Here is an example of an MVME147 system booting from tape:
84 RAM address from VMEbus = $00000000
86 Booting from: VME147, Controller 5, Device 0
87 Loading: Operating System
91 IPL loaded at: $003F0000
92 \*[Gt]\*[Gt] BSD MVME147 tapeboot [$Revision: 1.21 $]
93 578616+422344+55540+[46032+51284]=0x11a6e4
95 Copyright (c) 1996, 1997, 1998, 1999, 2000
96 The NetBSD Foundation, Inc. All rights reserved.
97 Copyright (c) 1982, 1986, 1989, 1991, 1993
98 The Regents of the University of California. All rights reserved.
100 NetBSD 1.5 (RAMDISK) #1: Sun Oct 29 16:19:04 GMT 2000
101 steve@fatbob:/usr/src/sys/arch/mvme68k/compile/RAMDISK
102 Motorola MVME-147S: 25MHz MC68030 CPU+MMU, MC68882 FPU
105 using 88 buffers containing 360448 bytes of memory
107 pcc0 at mainbus0: Peripheral Channel Controller, rev 0, vecbase 0x40
108 clock0 at pcc0 offset 0x0 ipl 5: Mostek MK48T02, 2048 bytes of NVRAM
115 The exact text of the messages will vary depending on which
117 variant you're using.
120 Finally, you will see the following "welcome" message:
122 Welcome to the NetBSD/\*M RAMDISK root!
124 This environment is designed to do only four things:
125 1: Partition your disk (use the command: edlabel /dev/rsd0c)
126 2: Copy a miniroot image into the swap partition (/dev/rsd0b)
127 3: Make that partition bootable (using 'installboot')
128 4: Reboot (using the swap partition, i.e. /dev/sd0b).
130 Copying the miniroot can be done several ways, allowing the source
131 of the miniroot image to be on any of these:
132 boot tape, NFS server, TFTP server, rsh server
134 The easiest is loading from tape, which is done as follows:
135 mt -f /dev/nrst0 rewind
136 mt -f /dev/nrst0 fsf 3
137 dd if=/dev/nrst0 of=/dev/rsd0b bs=8k conv=sync
138 (For help with other methods, please see the install notes.)
140 To reboot using the swap partition after running installboot, first
143 then at the Bug monitor prompt use a command like:
144 1x7Bug\*[Gt] bo 0,,b:
146 To view this message again, type: cat /.welcome
150 You must now create a disklabel on the disk you wish to use for the
155 The disklabel is used by
156 NetBSD to identify the starting block and size of each partition on
168 makes some assumptions about the first three partitions on a boot disk:
183 .Em raw partition No is special;
185 is able to use it even if the
187 You should never create a file system on the Raw Partition,
188 even on a non-boot disk.
190 It is good practice to put
192 on a different partition than
196 So, the first available partition for
200 Refer to the section entitled
201 .Sx NetBSD System Requirements and Supported Devices
202 for information on the recommended sizes of the
208 You are not required to define any partitions beyond
211 have a large disk drive, you might want to create several other partitions
212 for file systems such as
216 Note that at this time you
217 are only required to partition the root/boot disk; you will get the
218 opportunity to partition any other disks in your system from the main
220 installation program.
222 To create the disklabel and partitions, use the
224 program, passing it the name of the Raw Partition of your root/boot disk.
226 .Dl # Ic "edlabel /dev/rsd0c"
228 .Dl print - display the current disk label
229 .Dl modify - prompt for changes to the label
230 .Dl write - write the new label to disk
231 .Dl quit - terminate program
234 The program shows what commands it recognizes;
240 It will accept the first letter of a command if
241 you don't feel like typing each one in full.
243 To start creating the basic partitions, you should enter
245 at the edlabel prompt, then enter the letter corresponding to the first
246 .No partition, Sy a .
248 .Dl edlabel\*[Gt] Ic m
250 .Dl modify subcommands:
251 .Dl @ : modify disk parameters
252 .Dl a-h : modify partition
253 .Dl s : standardize geometry
254 .Dl q : quit this subcommand
255 .Dl edlabel/modify\*[Gt] Ic a
256 .Dl a (root) 0 (0/00/00) 0 (0/00/00) unused
257 .Dl start as \*[Lt]blkno\*[Gt] or \*[Lt]cyls/trks/sects\*[Gt] : Ic 0
258 .Dl length as \*[Lt]nblks\*[Gt] or \*[Lt]cyls/trks/sects\*[Gt] : Ic 65536
260 .Dl edlabel/modify\*[Gt]
262 When you enter the start and length of a partition, you can use either
263 blocks or cylinder/track/sector notation.
264 If this is the first time you've partitioned a disk for
266 it's probably easiest to use block
268 The above example creates partition
270 starting at block zero
271 and with a size of 65536 blocks.
272 Note that the usual size of a block is
273 512 bytes, so this creates a 32 MB partition.
277 of the partition should be
279 otherwise you won't be able to create a file system on it.
281 Next, create a swap partition (b).
282 Note that the minimum size of this swap partition should be 8 MB,
283 otherwise you won't be able to use a miniroot to complete the
287 .Dl edlabel/modify\*[Gt] Ic b
288 .Dl b (swap) 0 (0/00/00) 0 (0/00/00) unused
289 .Dl start as \*[Lt]blkno\*[Gt] or \*[Lt]cyls/trks/sects\*[Gt] : Ic 65536
290 .Dl length as \*[Lt]nblks\*[Gt] or \*[Lt]cyls/trks/sects\*[Gt] : Ic 32768
292 .Dl edlabel/modify\*[Gt]
294 Here, we specify a value for
296 such that the swap partition follows immediately after partition
299 The length of the swap partition should be a multiple of the
300 amount of RAM you have in your system.
301 Here, we've chosen 32768, or 16 MB.
302 The next available block on the drive is thus 65536 + 32768.
303 We will use this to create partition
308 (Note that for a busy system, or a system with more
309 than 8 MB of RAM, you'll be better off with a 32 or 64 MB swap partition.)
311 .Dl edlabel/modify\*[Gt] Ic d
312 .Dl d (user) 0 (0/00/00) 0 (0/00/00) unused
313 .Dl start as \*[Lt]blkno\*[Gt] or \*[Lt]cyls/trks/sects\*[Gt] : Ic 98304
314 .Dl length as \*[Lt]nblks\*[Gt] or \*[Lt]cyls/trks/sects\*[Gt] : Ic 1540096
316 .Dl edlabel/modify\*[Gt] Ic q
319 As you can see, we've chosen to assign the remainder of the disk to
321 Since there are 1638400 sectors on the example disk (did you remember to
322 note down the number of sectors on your disk during boot?), and partition
324 starts at sector 98304, a simple bit of arithmetic (1638400 - 98304)
326 .Sy d No a size of 1540096.
328 Note that the above partition sizes are just guidelines.
329 If your disk is large enough, you should resize the partitions
330 appropriately and perhaps also create a /var partition as well.
332 You now need to write this new disklabel, together with the partition
333 details you've just entered, to disk.
334 You might also try the
337 to view the partitions.
338 Once written, you can quit back to the shell using
341 .Dl edlabel\*[Gt] Ic p
346 pack_name: fictitious
351 sectors/cylinder: 2048
352 partition start (c/t/s) nblks (c/t/s) type
354 a (root) 0 (0/00/00) 65536 (32/00/00) 4.2BSD
355 b (swap) 65536 (32/00/00) 32768 (48/00/00) swap
356 c (disk) 0 (0/00/00) 1638400 (800/00/00) unused
357 d (user) 98304 (48/00/00) 1540096 (752/00/00) 4.2BSD
360 .Dl edlabel\*[Gt] Ic w
361 .Dl edlabel\*[Gt] Ic q
364 Now that your disk's partitioned, you need to get the proper installation
365 miniroot image onto it.
366 The miniroot image is designed to be copied into
367 the swap partition of your disk.
368 This is a safe place which won't be overwritten by the installation procedure.
369 From the shell prompt, use the
370 following commands to copy the miniroot image from tape to swap (b).
372 .Dl # Ic "mt -f /dev/nrst0 rewind"
373 .Dl # Ic "mt -f /dev/nrst0 fsf 3"
374 .Dl # Ic "dd if=/dev/nrst0 of=/dev/rsd0b bs=8k conv=osync"
376 The disk and the miniroot must now be made bootable using the
379 To do this, issue the following commands:
381 .Dl # Ic "mount /dev/sd0b /mnt"
382 .Dl # Ic "installboot /mnt/usr/mdec/bootsd /bootxx /dev/rsd0b"
383 .Dl # Ic "umount /dev/sd0b"
385 You can now shutdown the system.
389 .Dl syncing disks... done
390 .Dl unmounting / (root_device)...
393 .Dl 147-Bug\*[Gt] Ic reset
394 .Dl Reset Local SCSI Bus [Y,N] N? Ic y
395 .Dl Automatic reset of known SCSI Buses on RESET [Y,N] Y?
396 .Dl Cold/Warm Reset flag [C,W] = C?
397 .Dl Execute Soft Reset [Y,N] N? Ic y
399 Resetting the other types of MVME boards are very similar.
400 You should now reboot from that just installed miniroot.
401 See the section entitled
402 .Sx "Booting the miniroot"
405 .Ss2 Installing from NFS
407 Before you can install from NFS, you must have already configured
408 your NFS server to support your machine as a bootable client.
409 Instructions for configuring the server are found in the section
411 .Sx Getting the NetBSD System onto Useful Media
414 To get started on the MVME147, you need to download
416 into RAM (you will find
420 directory of the \*M distribution).
421 You can either do that through the console line or through a 2nd serial
423 For example, an MVME147 connected to a sun4/110 and accessed via
425 can be loaded as follows:
433 Which will look like this:
435 .Dl 147-Bug\*[Gt] Ic "lo 0"
436 .Dl ~CLocal command? Ic "cat sboot"
438 .Em away for 11 seconds
442 .Dl 147-Bug\*[Gt] Ic "g 4000"
443 .Dl Effective address: 00004000
445 .Dl sboot: serial line bootstrap program (end = 6018)
447 .Dl \*[Gt]\*[Gt]\*[Gt]
449 Now, if you want to do it through serial line 1, then connect serial
450 line one to a machine.
452 .Li 147-Bug\*[Gt] No prompt type Ic \&tm 1
453 You should then login to the machine it is connected to.
458 .Ic lo 1;x=cat sboot Em ...
459 then when that is done you can reconnect
460 .Ic tm 1 No and logout.
461 .No Then do Ic go 4000
463 .Li "\*[Gt]\*[Gt]\*[Gt] "
468 .Li "\*[Gt]\*[Gt\*[Gt] "
469 prompt, you can boot the
471 kernel from the server:
473 .Dl \*[Gt]\*[Gt]\*[Gt] Ic b
476 le0: ethernet address: 8:0:3e:20:cb:87
477 My ip address is: 192.168.1.4
478 Server ip address is: 192.168.1.1
480 Download was a success!
483 See below for the next step in booting MVME147.
485 The MVME162, MVME167, MVME172 and MVME177 boards are able to download netboot
487 To enable this, you must first configure the networking parameters
488 on the board as described in the section entitled "Preparing your System
492 On a properly configured MVME162/172 or MVME167/177, all you need to type is:
494 .Dl 1xx-Bug\*[Gt] Ic nbo
496 For all board types, the boot messages are very similar:
500 \*[Gt]\*[Gt] BSD MVME147 netboot (via sboot) [$Revision: 1.21 $]
501 device: le0 attached to 08:00:3e:20:cb:87
502 boot: client IP address: 192.168.1.4
503 boot: client name: soapy
504 root addr=192.168.1.1 path=/export/soapy
505 578616+422344+55540+[46032+51284]=0x11a6e4
507 Copyright (c) 1996, 1997, 1998, 1999, 2000
508 The NetBSD Foundation, Inc. All rights reserved.
509 Copyright (c) 1982, 1986, 1989, 1991, 1993
510 The Regents of the University of California. All rights reserved.
512 NetBSD 1.5 (RAMDISK) #1: Sun Oct 29 16:19:04 GMT 2000
513 steve@fatbob:/usr/src/sys/arch/mvme68k/compile/RAMDISK
514 Motorola MVME-147S: 25MHz MC68030 CPU+MMU, MC68882 FPU
517 using 88 buffers containing 360448 bytes of memory
519 pcc0 at mainbus0: Peripheral Channel Controller, rev 0, vecbase 0x40
520 clock0 at pcc0 offset 0x0 ipl 5: Mostek MK48T02, 2048 bytes of NVRAM
525 After the boot program loads the
527 kernel, you should see the
528 welcome screen as shown in the "tape boot" section above.
530 You now need to create a disklabel with partition information on the
531 SCSI disk on which you intend to create your root file system
533 Follow the instructions in the previous section entitled
534 .Sx "Installing from tape"
536 (But stop short of the part which describes how to
537 copy the miniroot from tape.)
539 You must now configure the network interface before you can access the
540 NFS server containing the miniroot image.
541 For example the command:
543 .Dl # Ic "ifconfig le0 inet 192.168.1.4 up"
545 will bring up the MVME147 network interface
550 .Dl # Ic "ifconfig ie0 inet 192.168.1.4 up"
552 will bring up the MVME162/172 or MVME167/177 network interface
556 step is to copy the miniroot from your server.
557 This can be done using either NFS or remote shell.
558 (In the examples that follow, the server has
559 IP address 192.168.1.1) You may then need to add a default route if the
560 server is on a different subnet:
562 .Dl # Ic "route add default 192.168.1.2 1"
564 You can look at the route table using:
566 .Dl # Ic "route show"
568 Now mount the NFS file system containing the miniroot image:
570 .Dl # Ic "mount -r 192.168.1.1:/export/soapy /mnt"
572 The procedure is simpler if you have space for an expanded (not
573 compressed) copy of the miniroot image.
576 .Dl # Ic "dd if=/mnt/miniroot of=/dev/rsd0b bs=8k"
578 Otherwise, you will need to use
580 to expand the miniroot image while copying.
582 .Dl # Ic gzcat miniroot.fs.gz | dd of=/dev/rsd0b obs=8k conv=osync
584 You must now make the disk bootable.
585 Refer to the previous section on
586 installing from tape, where it describes how to run
588 This is immediately following the part which explains how to copy the
591 .Ss2 Booting the miniroot
593 Assuming the miniroot is installed on partition
596 SCSI-ID 0, then the boot command is:
598 .Dl 1xx-Bug\*[Gt] Ic "bo 0,,b:"
600 The command line parameters above are:
604 controller (usually zero)
606 bug argument separators
608 tell the bootstrap code to boot from partition
612 You should see a bunch of boot messages, followed by messages from
613 the miniroot kernel just as you did when the
617 You will then be prompted to enter the root device.
618 Since the miniroot was booted from the swap partition, you should enter
621 then be asked for the swap device and file system type.
624 twice to accept the defaults.
625 When asked to enter a terminal type, either accept the default,
626 or use whatever the TERM environment
627 variable is set to in the shell of your host system:
630 .Dl root device (default sd0a): Ic sd0b
631 .Dl dump device (default sd0b): Em (return)
632 .Dl file system (default generic): Em (return)
633 .Dl root on sd0b dumps on sd0b
634 .Dl mountroot: trying ffs...
635 .Dl root file system type: ffs
636 .Dl init: copying out path `/sbin/init' 11
637 .Dl erase ^H, werase ^W, kill ^U, intr ^C
638 .Dl Terminal type? [vt100] Em return
641 The system should now be running the miniroot installation program.
643 .Ss2 Miniroot install program:
645 The miniroot's install program is very simple to use.
646 It will guide you through the entire process, and is well automated.
648 All recent releases of NetBSD provide the option of using
650 instead of the old installation and upgrade shell scripts.
653 is not capable of installing distribution sets from tape.
654 In such a case, you should fallback to the shell script installation
655 or upgrade procedure.
661 can deal with tapes, the shell script tools will be removed.
663 The miniroot's install program (both
665 and the shell script version) will:
667 Allow you to place disklabels on additional disks.
668 The disk we are installing on should already have
669 been partitioned using the
673 Note that partition sizes and offsets are expressed
675 When you fill out the disklabel, you will need to specify partition
676 types and file system parameters.
677 If you're unsure what these values should be, use the
686 If the partition will be a swap partition, use the following:
696 is special; it covers then entire
697 disk and should not be assigned to a file system.
699 The number of partitions is currently fixed at 8.
701 Create file systems on target partitions.
703 Allow you to set up your system's network configuration.
704 Remember to specify host names without the domain name
710 If, during the process of configuring
711 the network interfaces, you make a mistake, you will
712 be able to re-configure that interface by simply selecting
713 it for configuration again.
715 Mount target file systems.
716 You will be given the opportunity to manually edit the resulting
719 Extract binary sets from the media of your choice.
721 Copy configuration information gathered during the
722 installation process to your root file system
725 Make device nodes in your root file system under
728 Copy a new kernel onto your root partition
731 Install a new boot block.
733 Check your file systems for integrity.
736 First-time installation on a system through a method other than the
737 installation program is possible, but strongly discouraged.
739 .so ../common/sysinst