setup.8
来自「minix操作系统最新版本(3.1.1)的源代码」· 8 代码 · 共 400 行
8
400 行
.TH SETUP 8.SH NAMEsetup \- Install MINIX 3 on a hard disk.SH SYNOPSISsetup.SH DESCRIPTION.tr ~ .nr a 0 +1.de CB.sp 0.5v\s-1\\f5\\c...de CE\\fR\\s0\\c.sp 0.5v...de IT.ti -0.25i.PP...PPThis appendix explains how to install MINIX 3.Standard MINIX 3 requires a Pentium (or compatible) with at least16-MB of RAM, at least 200-MB of free disk space, an IDE CD-ROM and anIDE hard disk. Serial ATA, USB, and SCSI disks are not supported at present.For USB CD-ROMS, see the Website: \fIwww.minix3.org\fR.\fBPREPARATION\fR.PPIf you already have the CD-ROM (e.g., from the book), you can skip steps 1 and2, but it is wise to check \fIwww.minix3.org\fR to see if a newer versionis available.If you want to run MINIX 3 on a simulator instead of native, see Part V first.If you do not have an IDE CD-ROM, either get the special USB CD-ROM boot image or use a simulator..IT "Download the MINIX 3 CD-ROM image"Download the MINIX 3 CD-ROM image from the MINIX 3 Websiteat \fIwww.minix3.org\fR..IT "Create a bootable MINIX 3 CD-ROM"Decompress the downloaded file.You will get a CD-ROM image file with extension \fI.iso\fR and this manual.The \fI.iso\fR file is a bit-for-bit CD-ROM image.Burn it to a CD-ROM to make a bootable CD-ROM..PPIf you are using \fIEasy CD Creator 5\fR, select \*(OQRecord CD from CD image\*(CQ from the Filemenu and change the file type from \fI.cif\fR to \fI.iso\fR in the dialog box thatappears. Select the image file and click \*(OQOpen.\*(CQ Then click \*(OQStart Recording.\*(CQ.PPIf you are using \fINero Express 5\fR, choose \*(OQDisc Image or Saved Project\*(CQ andchange the type to \*(OQImage Files,\*(CQ select the image file and click \*(OQOpen.\*(CQSelect your CD recorder and click on \*(OQNext.\*(CQ.PPIf you are running Windows and do not have a CD-ROM burning program, take a look at.br\fIalexfeinman.brinkster.net/isorecorder.htm\fR.brfor a free one and use it to createa CD image..IT "Determine which Ethernet Chip you have".PPMINIX 3 supports several Ethernet chips for networking over LAN, ADSL, andcable. These include Intel Pro/100, RealTek 8029 and 8139, AMD LANCE,and several 3Com chips.During setupyou will be asked which Ethernet chip you have, if any. Determine that now bylooking at your documentation. Alternatively, if you are using Windows, go tothe device manager as follows:.sp 1.ta 0.9iWindows 2000: .brStart> Settings> Control Panel> System> Hardware> Device Mgr.sp 1Windows XP: .brStart> Control Panel> System> Hardware> Device Mgr\s0.ll -1i.sp 1System requires double clicking; the rest are single. Expand the + next to\*(OQNetwork adapters\*(CQ to see what you have. Write it down. If you do not havea supported chip, you can still run MINIX 3, but without Ethernet..IT "Partition your hard disk".PPYou can boot the computer from your CD-ROM ifyou like and MINIX 3 will start, but to do anything useful, you have to create apartition for it on your hard disk.But before partitioning, be sure to \fBback up your data to an external med\%iumlike CD-ROM or DVD\fR as a safety precaution, just in case something goes wrong.Your files are valuable; protect them..PPUnless you are sure you are an expert on disk partitioning with much experience, it is strongly suggested that youread the online tutorial on disk partitioningat \fIwww.minix3.org/doc/partitions.html.\fRIf you already know how to manage partitions, create a contiguous chunk of freedisk space of at least 200 MB (even better: 400 MB or more).If you do not know how to manage partitions but have a partitioning programlike \fIPartition Magic\fR, use it to create a region of free disk space of atleast 200 MB. Also make sure there is at least one primary partition (i.e.,Master Boot Record slot) free.The MINIX 3 setup script will guide you through creating a MINIX partition in the free space, which can be on either the first or second IDE disk..PPIf you are running Windows 95, 98, ME, or 2000 \fIand\fR your disk consists of a singleFAT partition, you can use the \fIpresz134.exe\fR program on the CD-ROM(also available at \fIzeleps.com\fR) to reduce its size to leave room for MINIX.In all other cases, please read the online tutorial cited above..PP\fBWARNING: If you make a mistake during disk partitioning, you can lose all the dataon the disk, so be sure to back it up to CD-ROM or DVD before starting.Disk partitioning requires great care, so proceed with caution.\fR\fBBOOTING\fR.nr a 0 .PPBy now you should have allocated at least 200 MB of free space on your disk.If you have not done so yet, please do it now unless there is an existing200-MB (or larger) partition you are willing to convert to MINIX 3..IT "Boot from the CD-ROM"Insert the CD-ROM into your CD-ROM drive and boot the computer from it.If you have 16 MB of RAM or more, choose \*(OQRegular;\*(CQ if you have only 8 MB choose \*(OQsmall.\*(CQIf the computer boots from the hard disk instead of the CD-ROM, boot again and enter theBIOS setup program to change the order of boot devices, putting the CD-ROM beforethe hard disk..IT "Login as root"When the \fIlogin\fR prompt appears, login as \fIroot.\fRAfter a successful login as root, you will see the shell prompt (#).At this point you are running fully-operational MINIX 3. If you type:.PP ls /usr/bin | more.PPyou can see what software is available.Hit space to scroll the list. To see what program \fIfoo\fR does, type:.PP man foo.PPThe manual pages are also available at.br\fIwww.minix3.org/manpages\fR. .IT "Start the setup script"To start the installation of MINIX 3 on the hard disk, type.PP setup.PPAfter this and all other commands, be sure to type ENTER (RETURN).When the installation script ends a screen with a colon, hit ENTER tocontinue. If the screen suddenly goes blank, press CTRL-F3 to selectsoftware scrolling (should only be needed on very old computers).Note that CTRL-key means depress the CTRL key and while holding it down,press \*(OQkey.\*(CQ\fBINSTALLING TO THE HARD DISK\fR.nr a 0.PPThese steps correspond to the steps on the screen..IT "Select keyboard type"When you are asked to select your national keyboard, do so. This and other steps have a default choice, in square brackets.If you agree with it, just hit ENTER. In most steps, the default is generallya good choice for beginners.The us-swap keyboard interchanges the CAPS LOCK and CTRL keys, as is conventionalon UNIX systems..IT "Select your Ethernet chip"You will now be asked which of the available Ethernet driver you wantin\%stalled (or none). Please choose one of the options..IT "Basic minimal or full install?"If you are tight on disk space, select M for a minimal installationwhich includes all the binaries but only the system sources installed.200 MB is enough for a bare-bones system. If you have 400 MB or more,choose F for a full installation..IT "Create or select a partition for MINIX 3"You will first be asked if you are an expert in MINIX 3 disk partitioning.If so, you will be placed in the \fIpart\fR program to give you full power toedit the Master Boot Record (and enough rope to hang yourself).If you are not an expert, press ENTER for the default action, which is anautomated step-by-step guide to formatting a disk partition for MINIX 3.\fBSubstep 4.1: Select a disk to install MINIX 3\fR.PPAn IDE controller may have up to four disks. The \fIsetup\fR script will nowlook for each one. Just ignore an error messages.When the drives are listed, select one. and confirm your choice.If you have two hard disks and you decide to install MINIX 3 to the second one and havetrouble booting from it, please see \fIwww.minix3.org/doc/using2disks.html\fRfor the solution.\fBSubstep 4.2: Select a disk region\fR.PPNow choose a region to install MINIX 3 into. You have three choices:.sp 0.5v (1) Select a free region (2) Select a partition to overwrite (3) Delete an existing partition to free up space and merge with adjacent free space.sp 0.5vFor choices (1) and (2), type the region number. For (3) type.sp -0.25v.PP delete.PP.sp -0.25vthen give the region number when asked. This region will be overwritten and its previous contents lost forever.\fBSubstep 4.3: Confirm your choices\fR.PPYou have now reached the point of no return. You will be asked if you want tocontinue. \fBIf you do, the data in the selected region will be lost forever.\fRIf you are sure, type:.PP yes.PPand then ENTER. To exit the setup script without changing thepartition table, hit CTRL-C..IT "Reinstallation choice"If you chose an existing MINIX 3 partition, in this step you will beoffered a choice between a Full install, which erases everything in thepartition, and a Reinstall, which does not affect your existing \fI/home\fRpartition. This design means that you can put your personal files on\fI/home\fR and reinstall a newer version of MINIX 3 when it is availablewithout losing your personal files..IT "Select the size of /home"The selected partition will be divided into three subpartitions: root, \fI/usr\fR,and \fI/home\fR. The latter is for your own personal files. Specify how much of thepartition should be set aside for your files.You will be asked to confirm your choice..IT "Select a block size"Disk block sizes of 1-KB, 2-KB, 4-KB, and 8-KB are supported, butto use a size larger than 4-KB you have to change a constant and recompilethe system. If your memory is 16 MB or more, use the default (4 KB); otherwise, use 1 KB..IT "Wait for bad block detection"The setup script will now scan each partition for bad disk blocks. This will takeseveral minutes, possibly 10 minutes or more on a large partition.Please be patient.If you are absolutely certain there are no bad blocks, you can kill each scanby hitting CTRL-C..IT "Wait for files to be copied"When the scan finishes, files will be automatically copied from the CD-ROM tothe hard disk. Every file will be announced as it is copied. When the copying is complete, MINIX 3 is installed.Shut the system down by typing.PP shutdown.PPAlways stop MINIX 3 this way to avoid data loss as MINIX 3 keeps some files onthe RAM disk and only copies them back to the hard disk at shutdown time.\fBTESTING\fR.nr a 0.PPThis section tells you how to test your installation, rebuild the system aftermodifying it, and boot it later. To start, boot your new MINIX 3 system.For example, if you used controller 0, disk 0, partition 3, type.PP boot c0d0p3.PPand log in as root. Under very rare conditions the drive number seen by theBIOS (and used by the boot monitor) may not agree with the one used byMINIX 3, in which case try other drive numbers.This is a good time to create a root password. See \fIman passwd\fR for help..IT "Compile the test suite"To test MINIX 3, at the command prompt (#) type.PP cd /usr/src/test.br make.PPand wait until it completes all 40 compilations.Log out by typing CTRL-D,.IT "Run the test suite"To test the system, log in as bin (required) and type.PP cd /usr/src/test.br ./run.PPto run the test programs. They should all run correctly but they can take20 min on a fast machine and over an hour on a slow one.\fINote\fR: It is necessary to compile the test suite when running as rootbut execute it as bin in order to see if the setuid bit works correctly..IT "Rebuild the entire operating system"If all the tests work correctly, you can now rebuild the system.Doing so is not necessary since it comes prebuilt, butif you plan to modify the system, you will need to know how to rebuild it.Besides, rebuilding the system is a good test to see if it works. Type:.PP cd /usr/src/tools.br make.PPto see the various options available. Now make a new bootable image by typing.PP su make clean time make image.PPYou just rebuilt the operating system, including all the kernel and user-modeparts. That did not take very long, did it?If you have a legacy floppy disk drive, you can make abootable floppy for use later by inserting a formatted floppy and typing.PP make fdboot.PPWhen you are asked to complete the path, type:.PP fd0.PPThis approach does not currently work with USB floppies since there is no MINIX 3 USBfloppy disk driver yet. To update the boot image currently installed on the hard disk, type.PP make hdboot.PP.IT "Shut down and reboot the new system"To boot the new system, first shut down by typing:.PP shutdown.PPThis command saves certain files and returns you to the MINIX 3 boot monitor.To get a summary of what the boot monitor can do, while in it, type:.PP help.PPFor more details, see \fIwww.minix3.org/manpages/man8/boot.8.html\fR.You can now remove any CD-ROM or floppy disk and turn off the computer..IT "Booting Tomorrow".PPIf you have a legacy floppy disk drive, the simplest way to boot MINIX 3 is byinserting your new boot floppy and turning on the power. It takes only a few seconds.Alternatively, boot from the MINIX 3 CD-ROM, login as bin and type:.PP shutdown.PPto get back to the MINIX 3 boot monitor. Now type:.PP boot c0d0p0.PPto boot from the operating system image file oncontroller 0, driver 0, partition 0.Of course, if you put MINIX 3 on drive 0 partition 1, use:.PP boot c0d0p1.PPand so on..PPA third possibility for booting is to make the MINIX 3 partition the active one,and use the MINIX 3 boot monitor to start MINIX 3 or any other operating system.For detailssee \fIwww.minix3.org/manpages/man8/boot.8.html\fR..PPFinally, a fourth option is for you to install a multiboot loader such asLILO or GRUB (\fIwww.gnu.org/software/grub\fR).Then you can boot any of your operating systems easily. Discussion of multiboot loaders is beyond the scope of this guide, but thereis some information of the subject at \fIwww.minix3.org/doc\fR.\fBUSING A SIMULATOR\fR.nr a 0.PPA completely different approach to running MINIX 3 is to run iton top of another operating system instead of native on the baremetal. Various virtual machines, simulators, and emulators areavailable for this purpose. Some of the most popular ones are: \(bu VMware (www.vmware.com).br \(bu Bochs (www.bochs.org).br \(bu QEMU (www.qemu.org).sp 1vSee the documentation for each of them. Running a program on asimulator is similar to running it on the actual machine, so youshould go back to Part I and acquire the latest CD-ROM and continuefrom there.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?