📄 usage.8
字号:
Next make a file system for on-disk /usr and copy the floppy /usr on to it..PP.XB "mkfs\0/dev/c0d0p1s2".XB "readall\0\-b\0/dev/c0d0p1s2 | sh".XB "mount\0/dev/c0d0p1s2\0/mnt".XB "cpdir\0\-v\0/usr\0/mnt".PPThis will create a file system on /dev/c0d0p1s2, mount it on /mnt, and copy thecontents of the \s-2USR\s+2 floppy onto it. The call to.B readallmarks bad blocks on the file system as unusable, you can omit this on adrive known to be spotless (\s-2IDE\s+2 or \s-2SCSI\s+2.).PPYou can now use the new /usr in place of the \s-2USR\s+2 floppy:.PP.XB "umount\0/dev/c0d0p1s2".XB "umount\0/dev/fd0\0\0\0\0\0\0\0\0\0# fd0p2 if combined".XB "mount\0/dev/c0d0p1s2\0/usr".PPThis little dance has freed up your floppy drive, so please remove the\s-2USR\s+2 diskette and replace it by the \s-2ROOT\s+2 diskette. Make afile system for the root with at least 512 inodes (files), andfill it from the floppy:.PP.XB "mkfs\0\-i\0512\0/dev/c0d0p1s0".XB "mount\0/dev/fd0\0/fd0".XB "mount\0/dev/c0d0p1s0\0/mnt".XB "cpdir\0\-v\0/fd0\0/mnt".XB "umount\0/dev/fd0".PPRemove.B /mnt/etc/issueto get rid of the "use setup" message that greets you when you boot, andedit the file.B /mnt/etc/fstabto name the devices MINIX has been installed on. In our example itshould look like this:.PP.XB "root=/dev/c0d0p1s0".XB "swap=/dev/c0d0p1s1".XB "usr=/dev/c0d0p1s2".PPUnmount the new root:.PP.XB "umount\0/dev/c0d0p1s0".PPMake it bootable:.PP.XB "installboot\0\-d\0/dev/c0d0p1s0\0/usr/mdec/bootblock\0boot".PPThe automatic script would now set the.B rootdevand.B ramimagedevboot variables. You can do this now using the.B edparamscommand, but it is easier to postpone it until the testing phase. Thesettings should be:.PP.XB "rootdev=c0d0p1s0".XB "ramimagedev=c0d0p1s0".SS "7. TESTING"By now a new MINIX system is present on your hard disk. Time to see ifit works. Leave the \s-2ROOT\s+2 diskette in the drive and type.BR halt .You are now going to use the power of the Boot Monitor on the diskette toboot the MINIX partition on the hard disk. Use the monitor command.B boot c0d0p1to boot the primary partition MINIX has been installed in. (It is "c0d0p1" inour example.).PPThe hard disk bootstrap is now showing the menu again. You can type '='to start MINIX, but you probably want to change the boot parameters.Hit.B ESConce more to get to the command prompt. The command.B setshows what the current parameters are. Here is an example that shows howto make a menu to either start MINIX or boot Windows:.PP.XB "minix(=,Minix)\0boot".XB "win(w,Windows)\0boot\0c0d0p0".XB "save".PPWindows is assumed to be in the first partition in the example above (c0d0p0).When finished type.B menuto see if the menu looks right. If so hit '=' to start MINIX. Log in asroot..SS "8. ADDING PROGRAMS AND SOURCES TO /usr"The.B setupcommand can also be used to add files from floppy sets to the system. The.B \s-2USR.TAZ\s+2(programs and stuff),.B \s-2SYS.TAZ\s+2(system sources), and.B \s-2CMD.TAZ\s+2(commands sources)are all installed relative to the.B /usrdirectory, so the command to use three times is.PP.XB setup\0/usr.PP.B Setupwill ask for the size of data on the floppies, which is by default simplythe entire floppy. You will see some "Cannot make directory" errorswhile extracting, as some directories already exist. Ignore these messages.You need the.B \s-2USR.TAZ\s+2set if you want a working MINIX system,.B \s-2SYS.TAZ\s+2if you want recompile the system or study it, and.B \s-2CMD.TAZ\s+2if you also want the sources of the commands. On a disk spacestarved machine you could opt to do without the commands sources, as theyare not absolutely necessary to understand MINIX..PPIf your machine does not have enough memory to run.B setup\0/usrthen type these commands manually:.PP.XB "cd\0/usr".XB "vol\0/dev/fd0 | zcat | tar\0xvfp\0\-".PPIf.3B USR.TAZis already present on the hard disk in an.3A DOSor Windows partition, then this command can be used under MINIX-386 toextract it to avoid the floppy detour:.PP.XB "cd\0/usr".XB "mtools\0copy\0c0d0p0:USR.TAZ\0\- | setup\0/usr".PPIn 16-bit mode you don't have mtools, but maybe dosread will work:.PP.XB "cd\0/usr".XB "dosread\0c0d0p0\0USR.TAZ | setup\0/usr".PPThe file doesn't have to be in the root directory of.BR c0d0p0 ,of course,.B "c0d1p0:/TMP/USR.TAZ"would name a file on the first partition of the second hard disk in thedirectory.BR \eTMP ..PPThe /usr file system can also be filled through a network from a remote hostif MINIX if you can get networking going with the NET.TAZ supplement. Use.B "setup\0/"to install NET.TAZ (note that it goes into / instead of /usr), thenfollow the instructions in.BR boot (8)to configure TCP/IP and boot MINIX. There are now two ways to fill/usr. One is to add the host name and login name of a remote host and aremote user to.BR /.rhosts ,as root, and to use the following command on the remote host:.PP.XB "rsh\0\-l\0root\0\fIminix-box\fP\0setup\0/usr\0< USR.TAZ".PPTwo is to use.B urlgetto copy the data directly from a Web or FTP site by using thesecommands under MINIX:.PP.XB "cd\0/usr".XB "urlget\0\fIurl\fP.../USR.TAZ | setup\0/usr".PPThe sources may be installed using exactly the same commands, but with.3B USR.TAZreplaced by.3B SRC.TAZ .Note that this means that the sources must also be extracted relative to.BR /usr ..SS "9. NAMES"A standalone machine will have to be given a name. As.B roottype.PP.XB "echo\0\fIname\fB\0>/etc/hostname.file".PPto change the host name of your machine to.IR name ..SS "10. ACTIVE ON BOOT"You may want to make the MINIX partition active so that it is automaticallybooted. With Windows.B fdiskor MINIX.BR part ,mark the primary partition that contains MINIX active. Using the menu youmade earlier you can boot either MINIX or Windows at a keypress. You can evenset timeouts. To boot MINIX automatically after 5 seconds:.PP.XB "main()\0{trap\05000\0minix;\0menu}".PPSee.BR monitor (8)for all the details on the monitor..PPIf you don't trust this then you can rig up a diskette that boots the MINIXpartition when left in the drive:.PP.XB "installboot\0\-m\0/dev/fd0\0/usr/mdec/jumpboot\0010".PPThe numbers 010 indicate the device (disk or partition) that must be booted,i.e..B /dev/c0d0p1s0in this example. Take the name of the device, and use the disk, partitionand subpartition numbers, or less. So c0d1p2s0 -> 120, c0d3 -> 3,c0d2p0 -> 20.).SS "11. DEVICES"A crash course on the MINIX devices in.BR /dev :The first two hard disks are named.BR c0d0and.BR c0d1 .These devices address the entire hard disk, from thefirst to the last byte. Each disk has four partitions, for disk 0 they are.BR c0d0p0 ,.BR c0d0p1 ,.BR c0d0p2 ,and.BR c0d0p3 .And for disk 1 they are named.BR c0d1p0to.BR c0d1p3 .These partitions may contain file systems,.B c0d0p0often contains the.3A MS-DOSor Windows "C:" file system. MINIX can use these partitionsfor file systems too, but you can also partition one of these "primarypartitions" into four so-called "subpartitions". The subpartitions of.B c0d0p0are named.BR c0d0p0s0 ,.BR c0d0p0s1 ,.BR c0d0p0s2 ,and.BR c0d0p0s3 .The other partitions may have four subpartitions that are named in the sameway. See.BR controller (4)for an elaborate description..PPYou may need to add devices to.BR /dev ,because not all devices are present to keep down the clutter.The command.3B MAKEDEVknows how to make devices, and.3B DESCRIBEcan tell you what an unknown device may be, or even what all devices in.B /devmay be if called without arguments. Devices are described in.BR dev (4),with pointers to more specific pages..SS "12. EDITORS"The editors available are.B elvis(a.B viclone),.B elle(a simple.B emacsclone),and the old MINIX.B minededitor. Of these editors only elvis can recover your file after a systemcrash. Only.B minedis available at installation time. (All you need to know about mined rightnow is that CTRL-X gets you out of it.).SS "13. BOOT MONITOR VS. MINIX"The Boot Monitor uses the.3A BIOSto address disks, so it has no idea of controllers, it just lumps everythingtogether and ignores controller numbers. So what the monitor thinks are.BR d0 ,.BR d1 ,and.BR d2 ,may be.BR c0d0(IDE primary master),.BR c0d2(IDE secondary master), and.BR c1d3(SCSI disk at target 3).One must keep this in mind when MINIX is installed on a disk other than thevery first. So if MINIX is installed in the third partition of the SCSI disk,then.B "boot d2p2"will boot it, and.B "rootdev=c1d3p2s0"will tell MINIX where its root file system is..SS "14. NATIONAL KEYBOARDS"The directory.B /usr/lib/keymapscontains keymap tables for several national keyboards. If you have a Germankeyboard for instance, then.PP.XB "loadkeys\0/usr/lib/keymaps/german.map".PPwill load the German key translation table into the keyboard driver. Copythe map to.B /etc/keymaponce MINIX is installed on the hard disk, because having to type a keysequence like one of these:.PP.XB "loadkezs\0\-usr\-lib\-kezmaps\-german.map".XB "loqdkeys\0=usr=lib=key,qps=french.,qp".PPon a reboot gets a bit annoying after a while. Send corrections and newkeymaps to the person named below. (Do not send a Dutch keymap, buyyourself a real keyboard instead.).SH SUGGESTIONSBelow are a few useful suggestions. Some of the information can be of use
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -