[9] | 1 | .TH SETUP 8
|
---|
| 2 | .SH NAME
|
---|
| 3 | setup \- Install MINIX 3 on a hard disk
|
---|
| 4 | .SH SYNOPSIS
|
---|
| 5 | setup
|
---|
| 6 | .SH DESCRIPTION
|
---|
| 7 | .tr ~
|
---|
| 8 | .nr a 0 +1
|
---|
| 9 | .de CB
|
---|
| 10 | .sp 0.5v
|
---|
| 11 | \s-1\\f5\\c
|
---|
| 12 | ..
|
---|
| 13 | .de CE
|
---|
| 14 | \\fR\\s0\\c
|
---|
| 15 | .sp 0.5v
|
---|
| 16 | ..
|
---|
| 17 | .de IT
|
---|
| 18 | .ti -0.25i
|
---|
| 19 | .PP
|
---|
| 20 | ..
|
---|
| 21 | .PP
|
---|
| 22 | This appendix explains how to install MINIX 3.
|
---|
| 23 | Standard MINIX 3 requires a Pentium (or compatible) with at least
|
---|
| 24 | 16-MB of RAM, at least 200-MB of free disk space, an IDE CD-ROM and an
|
---|
| 25 | IDE hard disk. Serial ATA, USB, and SCSI disks are not supported at present.
|
---|
| 26 | For USB CD-ROMS, see the Website: \fIwww.minix3.org\fR.
|
---|
| 27 |
|
---|
| 28 | \fBPREPARATION\fR
|
---|
| 29 | .PP
|
---|
| 30 | If you already have the CD-ROM (e.g., from the book), you can skip steps 1 and
|
---|
| 31 | 2, but it is wise to check \fIwww.minix3.org\fR to see if a newer version
|
---|
| 32 | is available.
|
---|
| 33 | If you want to run MINIX 3 on a simulator instead of native, see Part V first.
|
---|
| 34 | If you do not have an IDE CD-ROM,
|
---|
| 35 | either get the special USB CD-ROM boot image or use a simulator.
|
---|
| 36 |
|
---|
| 37 | .IT "Download the MINIX 3 CD-ROM image"
|
---|
| 38 | Download the MINIX 3 CD-ROM image from the MINIX 3 Website
|
---|
| 39 | at \fIwww.minix3.org\fR.
|
---|
| 40 |
|
---|
| 41 | .IT "Create a bootable MINIX 3 CD-ROM"
|
---|
| 42 | Decompress the downloaded file.
|
---|
| 43 | You will get a CD-ROM image file with extension \fI.iso\fR and this manual.
|
---|
| 44 | The \fI.iso\fR file is a bit-for-bit CD-ROM image.
|
---|
| 45 | Burn it to a CD-ROM to make a bootable CD-ROM.
|
---|
| 46 | .PP
|
---|
| 47 | If you are using \fIEasy CD Creator 5\fR, select \*(OQRecord CD from CD image\*(CQ from the File
|
---|
| 48 | menu and change the file type from \fI.cif\fR to \fI.iso\fR in the dialog box that
|
---|
| 49 | appears. Select the image file and click \*(OQOpen.\*(CQ Then click \*(OQStart Recording.\*(CQ
|
---|
| 50 | .PP
|
---|
| 51 | If you are using \fINero Express 5\fR, choose \*(OQDisc Image or Saved Project\*(CQ and
|
---|
| 52 | change the type to \*(OQImage Files,\*(CQ select the image file and click \*(OQOpen.\*(CQ
|
---|
| 53 | Select your CD recorder and click on \*(OQNext.\*(CQ
|
---|
| 54 | .PP
|
---|
| 55 | If you are running Windows and do not have a CD-ROM burning program, take a look at
|
---|
| 56 | .br
|
---|
| 57 | \fIalexfeinman.brinkster.net/isorecorder.htm\fR
|
---|
| 58 | .br
|
---|
| 59 | for a free one and use it to create
|
---|
| 60 | a CD image.
|
---|
| 61 |
|
---|
| 62 | .IT "Determine which Ethernet Chip you have"
|
---|
| 63 | .PP
|
---|
| 64 | MINIX 3 supports several Ethernet chips for networking over LAN, ADSL, and
|
---|
| 65 | cable. These include Intel Pro/100, RealTek 8029 and 8139, AMD LANCE,
|
---|
| 66 | and several 3Com chips.
|
---|
| 67 | During setup
|
---|
| 68 | you will be asked which Ethernet chip you have, if any. Determine that now by
|
---|
| 69 | looking at your documentation. Alternatively, if you are using Windows, go to
|
---|
| 70 | the device manager as follows:
|
---|
| 71 | .sp 1
|
---|
| 72 | .ta 0.9i
|
---|
| 73 | Windows 2000:
|
---|
| 74 | .br
|
---|
| 75 | Start> Settings> Control Panel> System> Hardware> Device Mgr
|
---|
| 76 | .sp 1
|
---|
| 77 | Windows XP:
|
---|
| 78 | .br
|
---|
| 79 | Start> Control Panel> System> Hardware> Device Mgr\s0
|
---|
| 80 | .ll -1i
|
---|
| 81 | .sp 1
|
---|
| 82 | System requires double clicking; the rest are single. Expand the + next to
|
---|
| 83 | \*(OQNetwork adapters\*(CQ to see what you have. Write it down. If you do not have
|
---|
| 84 | a supported chip, you can still run MINIX 3, but without Ethernet.
|
---|
| 85 |
|
---|
| 86 | .IT "Partition your hard disk"
|
---|
| 87 | .PP
|
---|
| 88 | You can boot the computer from your CD-ROM if
|
---|
| 89 | you like and MINIX 3 will start, but to do anything useful, you have to create a
|
---|
| 90 | partition for it on your hard disk.
|
---|
| 91 | But before partitioning, be sure to \fBback up your data to an external med\%ium
|
---|
| 92 | like CD-ROM or DVD\fR as a safety precaution, just in case something goes wrong.
|
---|
| 93 | Your files are valuable; protect them.
|
---|
| 94 | .PP
|
---|
| 95 | Unless you are sure you are an expert on disk partitioning with much experience, it is strongly suggested that you
|
---|
| 96 | read the online tutorial on disk partitioning
|
---|
| 97 | at \fIwww.minix3.org/doc/partitions.html.\fR
|
---|
| 98 | If you already know how to manage partitions, create a contiguous chunk of free
|
---|
| 99 | disk space of at least 200 MB (even better: 400 MB or more).
|
---|
| 100 | If you do not know how to manage partitions but have a partitioning program
|
---|
| 101 | like \fIPartition Magic\fR, use it to create a region of free disk space of at
|
---|
| 102 | least 200 MB. Also make sure there is at least one primary partition (i.e.,
|
---|
| 103 | Master Boot Record slot) free.
|
---|
| 104 | The MINIX 3 setup script will guide you through creating a MINIX partition in the
|
---|
| 105 | free space, which can be on either the first or second IDE disk.
|
---|
| 106 | .PP
|
---|
| 107 | If you are running Windows 95, 98, ME, or 2000 \fIand\fR your disk consists of a single
|
---|
| 108 | FAT partition, you can use the \fIpresz134.exe\fR program on the CD-ROM
|
---|
| 109 | (also available at \fIzeleps.com\fR) to reduce its size to leave room for MINIX.
|
---|
| 110 | In all other cases, please read the online tutorial cited above.
|
---|
| 111 | .PP
|
---|
| 112 | \fBWARNING: If you make a mistake during disk partitioning, you can lose all the data
|
---|
| 113 | on the disk, so be sure to back it up to CD-ROM or DVD before starting.
|
---|
| 114 | Disk partitioning requires great care, so proceed with caution.\fR
|
---|
| 115 |
|
---|
| 116 | \fBBOOTING\fR
|
---|
| 117 | .nr a 0
|
---|
| 118 | .PP
|
---|
| 119 | By now you should have allocated at least 200 MB of free space on your disk.
|
---|
| 120 | If you have not done so yet, please do it now unless there is an existing
|
---|
| 121 | 200-MB (or larger) partition you are willing to convert to MINIX 3.
|
---|
| 122 |
|
---|
| 123 | .IT "Boot from the CD-ROM"
|
---|
| 124 | Insert the CD-ROM into your CD-ROM drive and boot the computer from it.
|
---|
| 125 | If you have 16 MB of RAM or more, choose \*(OQRegular;\*(CQ
|
---|
| 126 | if you have only 8 MB choose \*(OQsmall.\*(CQ
|
---|
| 127 | If the computer boots from the hard disk instead of the CD-ROM, boot again and enter the
|
---|
| 128 | BIOS setup program to change the order of boot devices, putting the CD-ROM before
|
---|
| 129 | the hard disk.
|
---|
| 130 |
|
---|
| 131 | .IT "Login as root"
|
---|
| 132 | When the \fIlogin\fR prompt appears, login as \fIroot.\fR
|
---|
| 133 | After a successful login as root, you will see the shell prompt (#).
|
---|
| 134 | At this point you are running fully-operational MINIX 3. If you type:
|
---|
| 135 | .PP
|
---|
| 136 | ls /usr/bin | more
|
---|
| 137 | .PP
|
---|
| 138 | you can see what software is available.
|
---|
| 139 | Hit space to scroll the list.
|
---|
| 140 | To see what program \fIfoo\fR does, type:
|
---|
| 141 | .PP
|
---|
| 142 | man foo
|
---|
| 143 | .PP
|
---|
| 144 | The manual pages are also available at
|
---|
| 145 | .br
|
---|
| 146 | \fIwww.minix3.org/manpages\fR.
|
---|
| 147 |
|
---|
| 148 | .IT "Start the setup script"
|
---|
| 149 | To start the installation of MINIX 3 on the hard disk, type
|
---|
| 150 | .PP
|
---|
| 151 | setup
|
---|
| 152 | .PP
|
---|
| 153 | After this and all other commands, be sure to type ENTER (RETURN).
|
---|
| 154 | When the installation script ends a screen with a colon, hit ENTER to
|
---|
| 155 | continue. If the screen suddenly goes blank, press CTRL-F3 to select
|
---|
| 156 | software scrolling (should only be needed on very old computers).
|
---|
| 157 | Note that CTRL-key means depress the CTRL key and while holding it down,
|
---|
| 158 | press \*(OQkey.\*(CQ
|
---|
| 159 |
|
---|
| 160 | \fBINSTALLING TO THE HARD DISK\fR
|
---|
| 161 | .nr a 0
|
---|
| 162 | .PP
|
---|
| 163 | These steps correspond to the steps on the screen.
|
---|
| 164 |
|
---|
| 165 | .IT "Select keyboard type"
|
---|
| 166 | When you are asked to select your national keyboard, do so.
|
---|
| 167 | This and other steps have a default choice, in square brackets.
|
---|
| 168 | If you agree with it, just hit ENTER. In most steps, the default is generally
|
---|
| 169 | a good choice for beginners.
|
---|
| 170 | The us-swap keyboard interchanges the CAPS LOCK and CTRL keys, as is conventional
|
---|
| 171 | on UNIX systems.
|
---|
| 172 |
|
---|
| 173 | .IT "Select your Ethernet chip"
|
---|
| 174 | You will now be asked which of the available Ethernet driver you want
|
---|
| 175 | in\%stalled (or none). Please choose one of the options.
|
---|
| 176 |
|
---|
| 177 | .IT "Basic minimal or full install?"
|
---|
| 178 | If you are tight on disk space, select M for a minimal installation
|
---|
| 179 | which includes all the binaries but only the system sources installed.
|
---|
| 180 | 200 MB is enough for a bare-bones system. If you have 400 MB or more,
|
---|
| 181 | choose F for a full installation.
|
---|
| 182 |
|
---|
| 183 | .IT "Create or select a partition for MINIX 3"
|
---|
| 184 | You will first be asked if you are an expert in MINIX 3 disk partitioning.
|
---|
| 185 | If so, you will be placed in the \fIpart\fR program to give you full power to
|
---|
| 186 | edit the Master Boot Record (and enough rope to hang yourself).
|
---|
| 187 | If you are not an expert, press ENTER for the default action, which is an
|
---|
| 188 | automated step-by-step guide to formatting a disk partition for MINIX 3.
|
---|
| 189 |
|
---|
| 190 | \fBSubstep 4.1: Select a disk to install MINIX 3\fR
|
---|
| 191 | .PP
|
---|
| 192 | An IDE controller may have up to four disks. The \fIsetup\fR script will now
|
---|
| 193 | look for each one. Just ignore an error messages.
|
---|
| 194 | When the drives are listed, select one. and confirm your choice.
|
---|
| 195 | If you have two hard disks and you decide to install MINIX 3 to the second one and have
|
---|
| 196 | trouble booting from it, please see \fIwww.minix3.org/doc/using2disks.html\fR
|
---|
| 197 | for the solution.
|
---|
| 198 |
|
---|
| 199 | \fBSubstep 4.2: Select a disk region\fR
|
---|
| 200 | .PP
|
---|
| 201 | Now choose a region to install MINIX 3 into. You have three choices:
|
---|
| 202 | .sp 0.5v
|
---|
| 203 | (1) Select a free region
|
---|
| 204 | (2) Select a partition to overwrite
|
---|
| 205 | (3) Delete an existing partition to free up space and merge with adjacent free
|
---|
| 206 | space
|
---|
| 207 | .sp 0.5v
|
---|
| 208 | For choices (1) and (2), type the region number. For (3) type
|
---|
| 209 | .sp -0.25v
|
---|
| 210 | .PP
|
---|
| 211 | delete
|
---|
| 212 | .PP
|
---|
| 213 | .sp -0.25v
|
---|
| 214 | then give the region number when asked.
|
---|
| 215 | This region will be overwritten and its previous contents lost forever.
|
---|
| 216 |
|
---|
| 217 | \fBSubstep 4.3: Confirm your choices\fR
|
---|
| 218 | .PP
|
---|
| 219 | You have now reached the point of no return. You will be asked if you want to
|
---|
| 220 | continue. \fBIf you do, the data in the selected region will be lost forever.\fR
|
---|
| 221 | If you are sure, type:
|
---|
| 222 | .PP
|
---|
| 223 | yes
|
---|
| 224 | .PP
|
---|
| 225 | and then ENTER. To exit the setup script without changing the
|
---|
| 226 | partition table, hit CTRL-C.
|
---|
| 227 |
|
---|
| 228 | .IT "Reinstallation choice"
|
---|
| 229 | If you chose an existing MINIX 3 partition, in this step you will be
|
---|
| 230 | offered a choice between a Full install, which erases everything in the
|
---|
| 231 | partition, and a Reinstall, which does not affect your existing \fI/home\fR
|
---|
| 232 | partition. This design means that you can put your personal files on
|
---|
| 233 | \fI/home\fR and reinstall a newer version of MINIX 3 when it is available
|
---|
| 234 | without losing your personal files.
|
---|
| 235 |
|
---|
| 236 | .IT "Select the size of /home"
|
---|
| 237 | The selected partition will be divided into three subpartitions: root, \fI/usr\fR,
|
---|
| 238 | and \fI/home\fR. The latter is for your own personal files. Specify how much of the
|
---|
| 239 | partition should be set aside for your files.
|
---|
| 240 | You will be asked to confirm your choice.
|
---|
| 241 |
|
---|
| 242 | .IT "Select a block size"
|
---|
| 243 | Disk block sizes of 1-KB, 2-KB, 4-KB, and 8-KB are supported, but
|
---|
| 244 | to use a size larger than 4-KB you have to change a constant and recompile
|
---|
| 245 | the system. If your memory is 16 MB or more, use the default (4 KB);
|
---|
| 246 | otherwise, use 1 KB.
|
---|
| 247 |
|
---|
| 248 | .IT "Wait for bad block detection"
|
---|
| 249 | The setup script will now scan each partition for bad disk blocks. This will take
|
---|
| 250 | several minutes, possibly 10 minutes or more on a large partition.
|
---|
| 251 | Please be patient.
|
---|
| 252 | If you are absolutely certain there are no bad blocks, you can kill each scan
|
---|
| 253 | by hitting CTRL-C.
|
---|
| 254 |
|
---|
| 255 | .IT "Wait for files to be copied"
|
---|
| 256 | When the scan finishes, files will be automatically copied from the CD-ROM to
|
---|
| 257 | the hard disk. Every file will be announced as it is copied.
|
---|
| 258 | When the copying is complete, MINIX 3 is installed.
|
---|
| 259 | Shut the system down by typing
|
---|
| 260 | .PP
|
---|
| 261 | shutdown
|
---|
| 262 | .PP
|
---|
| 263 | Always stop MINIX 3 this way to avoid data loss as MINIX 3 keeps some files on
|
---|
| 264 | the RAM disk and only copies them back to the hard disk at shutdown time.
|
---|
| 265 |
|
---|
| 266 |
|
---|
| 267 | \fBTESTING\fR
|
---|
| 268 | .nr a 0
|
---|
| 269 | .PP
|
---|
| 270 | This section tells you how to test your installation, rebuild the system after
|
---|
| 271 | modifying it, and boot it later. To start, boot your new MINIX 3 system.
|
---|
| 272 | For example, if you used controller 0, disk 0, partition 3, type
|
---|
| 273 | .PP
|
---|
| 274 | boot c0d0p3
|
---|
| 275 | .PP
|
---|
| 276 | and log in as root. Under very rare conditions the drive number seen by the
|
---|
| 277 | BIOS (and used by the boot monitor) may not agree with the one used by
|
---|
| 278 | MINIX 3, in which case try other drive numbers.
|
---|
| 279 | This is a good time to create a root password. See \fIman passwd\fR for help.
|
---|
| 280 |
|
---|
| 281 | .IT "Compile the test suite"
|
---|
| 282 | To test MINIX 3, at the command prompt (#) type
|
---|
| 283 | .PP
|
---|
| 284 | cd /usr/src/test
|
---|
| 285 | .br
|
---|
| 286 | make
|
---|
| 287 | .PP
|
---|
| 288 | and wait until it completes all 40 compilations.
|
---|
| 289 | Log out by typing CTRL-D,
|
---|
| 290 |
|
---|
| 291 | .IT "Run the test suite"
|
---|
| 292 | To test the system, log in as bin (required) and type
|
---|
| 293 | .PP
|
---|
| 294 | cd /usr/src/test
|
---|
| 295 | .br
|
---|
| 296 | ./run
|
---|
| 297 | .PP
|
---|
| 298 | to run the test programs. They should all run correctly but they can take
|
---|
| 299 | 20 min on a fast machine and over an hour on a slow one.
|
---|
| 300 | \fINote\fR: It is necessary to compile the test suite when running as root
|
---|
| 301 | but execute it as bin in order to see if the setuid bit works correctly.
|
---|
| 302 |
|
---|
| 303 | .IT "Rebuild the entire operating system"
|
---|
| 304 | If all the tests work correctly, you can now rebuild the system.
|
---|
| 305 | Doing so is not necessary since it comes prebuilt, but
|
---|
| 306 | if you plan to modify the system, you will need to know how to rebuild it.
|
---|
| 307 | Besides, rebuilding the system is a good test to see if it works. Type:
|
---|
| 308 | .PP
|
---|
| 309 | cd /usr/src/tools
|
---|
| 310 | .br
|
---|
| 311 | make
|
---|
| 312 | .PP
|
---|
| 313 | to see the various options available. Now make a new bootable image by typing
|
---|
| 314 | .PP
|
---|
| 315 | su
|
---|
| 316 | make clean
|
---|
| 317 | time make image
|
---|
| 318 | .PP
|
---|
| 319 | You just rebuilt the operating system, including all the kernel and user-mode
|
---|
| 320 | parts. That did not take very long, did it?
|
---|
| 321 | If you have a legacy floppy disk drive, you can make a
|
---|
| 322 | bootable floppy for use later by inserting a formatted floppy and typing
|
---|
| 323 | .PP
|
---|
| 324 | make fdboot
|
---|
| 325 | .PP
|
---|
| 326 | When you are asked to complete the path, type:
|
---|
| 327 | .PP
|
---|
| 328 | fd0
|
---|
| 329 | .PP
|
---|
| 330 | This approach does not currently work with USB floppies since there is no MINIX 3 USB
|
---|
| 331 | floppy disk driver yet.
|
---|
| 332 | To update the boot image currently installed on the hard disk, type
|
---|
| 333 | .PP
|
---|
| 334 | make hdboot
|
---|
| 335 | .PP
|
---|
| 336 |
|
---|
| 337 | .IT "Shut down and reboot the new system"
|
---|
| 338 | To boot the new system, first shut down by typing:
|
---|
| 339 | .PP
|
---|
| 340 | shutdown
|
---|
| 341 | .PP
|
---|
| 342 | This command saves certain files and returns you to the MINIX 3 boot monitor.
|
---|
| 343 | To get a summary of what the boot monitor can do, while in it, type:
|
---|
| 344 | .PP
|
---|
| 345 | help
|
---|
| 346 | .PP
|
---|
| 347 | For more details, see \fIwww.minix3.org/manpages/man8/boot.8.html\fR.
|
---|
| 348 | You can now remove any CD-ROM or floppy disk and turn off the computer.
|
---|
| 349 |
|
---|
| 350 | .IT "Booting Tomorrow"
|
---|
| 351 | .PP
|
---|
| 352 | If you have a legacy floppy disk drive, the simplest way to boot MINIX 3 is by
|
---|
| 353 | inserting your new boot floppy and turning on the power. It takes only a few seconds.
|
---|
| 354 | Alternatively, boot from the MINIX 3 CD-ROM, login as bin and type:
|
---|
| 355 | .PP
|
---|
| 356 | shutdown
|
---|
| 357 | .PP
|
---|
| 358 | to get back to the MINIX 3 boot monitor. Now type:
|
---|
| 359 | .PP
|
---|
| 360 | boot c0d0p0
|
---|
| 361 | .PP
|
---|
| 362 | to boot from the operating system image file on
|
---|
| 363 | controller 0, driver 0, partition 0.
|
---|
| 364 | Of course, if you put MINIX 3 on drive 0 partition 1, use:
|
---|
| 365 | .PP
|
---|
| 366 | boot c0d0p1
|
---|
| 367 | .PP
|
---|
| 368 | and so on.
|
---|
| 369 | .PP
|
---|
| 370 | A third possibility for booting is to make the MINIX 3 partition the active one,
|
---|
| 371 | and use the MINIX 3 boot monitor to start MINIX 3 or any other operating system.
|
---|
| 372 | For details
|
---|
| 373 | see \fIwww.minix3.org/manpages/man8/boot.8.html\fR.
|
---|
| 374 | .PP
|
---|
| 375 | Finally, a fourth option is for you to install a multiboot loader such as
|
---|
| 376 | LILO or GRUB (\fIwww.gnu.org/software/grub\fR).
|
---|
| 377 | Then you can boot any of your operating systems easily.
|
---|
| 378 | Discussion of multiboot loaders is beyond the scope of this guide, but there
|
---|
| 379 | is some information of the subject at \fIwww.minix3.org/doc\fR.
|
---|
| 380 |
|
---|
| 381 | \fBUSING A SIMULATOR\fR
|
---|
| 382 | .nr a 0
|
---|
| 383 | .PP
|
---|
| 384 | A completely different approach to running MINIX 3 is to run it
|
---|
| 385 | on top of another operating system instead of native on the bare
|
---|
| 386 | metal. Various virtual machines, simulators, and emulators are
|
---|
| 387 | available for this purpose. Some of the most popular ones are:
|
---|
| 388 |
|
---|
| 389 | \(bu VMware (www.vmware.com)
|
---|
| 390 | .br
|
---|
| 391 | \(bu Bochs (www.bochs.org)
|
---|
| 392 | .br
|
---|
| 393 | \(bu QEMU (www.qemu.org)
|
---|
| 394 | .sp 1v
|
---|
| 395 | See the documentation for each of them. Running a program on a
|
---|
| 396 | simulator is similar to running it on the actual machine, so you
|
---|
| 397 | should go back to Part I and acquire the latest CD-ROM and continue
|
---|
| 398 | from there.
|
---|
| 399 |
|
---|