📄 usage.8
字号:
Remove /mnt/etc/issue to get rid of the "use setup" message that greets
you when you boot, and edit the file /mnt/etc/fstab to name the devices
Minix has been installed on. In our example it should look like this:
root=/dev/hd2a
usr=/dev/hd2c
Unmount the new root:
umount /dev/hd2a
Make it bootable:
installboot -d /dev/hd2a /usr/mdec/bootblock boot
The automatic script would now set the rootdev and ramimagedev boot
variables. You can do this now using the edparams command, but it is
easier to postpone it until the testing phase. The settings should be:
rootdev=hd2a
ramimagedev=hd2a
6. TESTING
By now a new Minix system is present on your hard disk. Time to see if
it works. Leave the ROOT diskette in the drive and type halt. You are
now going to use the power of the Boot Monitor on the diskette to boot
the Minix partition on the hard disk. Use the monitor command boot hd2
to boot the primary partition Minix has been installed in. (It is "hd2"
in our example.) For a SCSI disk you will have to use a 'hd' name too.
The monitor uses the BIOS, so you will have to treat it as a "normal"
disk at this point.
5
USAGE(8) Minix Programmer's Manual USAGE(8)
The 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
ESC once more to get to the command prompt. The command set shows what
the current parameters are. Here is an example that shows how to make a
menu to either start Minix or boot MS-DOS:
minix(=,Minix) {boot}
dos(d,MS-DOS) {boot hd1}
save
MS-DOS is assumed to be in the first partition in the example above
(hd1). When finished type menu to see if the menu looks right. If so
hit '=' to start Minix.
7. ADDING PROGRAMS AND SOURCES TO /usr
The setup command can also be used to add files from floppy sets to the
system. The USR.TAZ (programs and stuff), SYS.TAZ (system sources), and
CMD.TAZ (commands sources) are all installed relative to the /usr
directory, so the command to use three times is
setup /usr
Setup will ask for the size of data on the floppies, which is by default
simply the entire floppy. Don't worry if you see a few "File exists"
errors while extracting, as some directories already exist. You need the
USR.TAZ set if you want a working Minix system, SYS.TAZ if you want
recompile the system or study it, and CMD.TAZ if you also want the
sources of the simple commands. On a disk space starved machine you
could opt to do without the commands sources, as they are not absolutely
necessary to understand Minix.
If your machine does not have enough memory to run setup /usr then type
these commands manually:
cd /usr
vol /dev/fd0 | uncompress | tar xvfp -
8. NAMES
A standalone machine will have to be given a name. As root type
echo name >/etc/hostname.file
to change the host name of your machine to name.
9. ACTIVE ON BOOT
You may want to make the Minix partition active so that it is
automatically booted. With DOS fdisk or Minix part, mark the primary
partition that contains Minix active. Using the menu you made earlier
you can boot either Minix or DOS at a keypress. You can even set
timeouts. To boot Minix automatically after 5 seconds:
6
USAGE(8) Minix Programmer's Manual USAGE(8)
main() {trap 5000 minix; menu}
See monitor(8) for all the details on the monitor.
If you don't trust this then you can rig up a diskette that boots the
Minix partition when left in the drive:
installboot -m 2 /dev/fd0 /usr/mdec/masterboot
The number 2 indicates the hard disk partition that must be booted, you
can use the numbers 1 to 9 for hd1 to hd9.
10. DEVICES
A crash course on the Minix devices in /dev: The two hard disks are
named hd0 and hd5. These "multiple of five" devices address the entire
hard disk, from the first to the last byte. Each disk has four
partitions, for disk 0 they are hd1, hd2, hd3, and hd4. And for disk 1
they are named hd6, hd7, hd8, and hd9. These partitions may contain file
systems, hd1 often contains the MS-DOS "C:" file system. Minix can use
these partitions for file systems too, but you can also partition one of
these "primary partitions" into four so-called "subpartitions". The
subpartitions of hd1 are named hd1a, hd1b, hd1c, and hd1d. The other
partitions may have four subpartitions that are named in the same way by
adding a letter from a to d. So one disk may have four partitions, and
16 subpartititions total. SCSI disks are named in the same way, from sd0
to sd39d for all possible devices for all eight SCSI targets. The two
floppy disks are fd0 and fd1. Each may have four partitions named fd0a,
fd0b, ... fd1d. The command MAKEDEV knows how to make devices, and
DESCRIBE can tell you what an unknown device may be, or even what all
devices in /dev may be if called without arguments. Devices are
described fully in dev(4), and in the device specific manual pages like
fd(4) and hd(4).
11. EDITORS
The editors available are elvis (a vi clone), elle (a simple emacs
clone), and the old Minix mined editor. Of these editors only elvis can
recover your file after a system crash. Only mined is available at
installation time. (All you need to know about mined right now is that
CTRL-X gets you out of it.)
12. INSTALLING ON A SCSI DISK
Using a disk other than a hd disk complicates things a bit. The Boot
Monitor uses the BIOS, so it names all disks with hd names. So it is
boot hd1 to boot partition 1, and ramimagedev=sd2a to tell Minix its root
partition. If you have both a normal and a SCSI disk then the disks may
be hd0 and hd5 to the Monitor, and hd0 and sd0 to Minix.
7
USAGE(8) Minix Programmer's Manual USAGE(8)
13. NATIONAL KEYBOARDS
The directory /usr/lib/keymaps contains keymap tables for several
national keyboards. If you have a German keyboard for instance, then
loadkeys /usr/lib/keymaps/german.map
will load the German key translation table into the keyboard driver.
Copy the map to /etc/keymap once Minix is installed on the hard disk,
because having to type a key sequence like one of these:
loadkezs -usr-lib-kezmaps-german.map
loqdkeys =usr=lib=key,qps=french.,qp
on a reboot gets a bit annoying after a while. Send corrections and new
keymaps to the person named below. (Do not send a Dutch keymap, buy
yourself a real keyboard instead.)
SUGGESTIONS
Below are a few useful suggestions. Some of the information can be of
use in other situations than described here.
14. VIRTUAL CONSOLES
Hold down the ALT key and press the left or right arrow key, F1, or F2.
This switches the console between two login sessions. (Unless you have
an old mono adapter, because virtual consoles sit in video memory, and a
mono adapter only has memory for one.)
Note that kernel messages, including function key output, only appear on
the first console. This may be confusing, but it keeps the other
consoles clean.
15. LOW ON MEMORY
The normal installation requires that you have enough memory for a large
RAM disk. You can still install Minix normally if you either have a high
density diskette drive for a combined root+usr floppy, or you have two
floppy drives of at least 720 kb. Before booting you have to set the
variable rootdev to the same value as ramimagedev. This is slower then a
RAM disk, but saves a lot of memory.
The automatic installation script knows how to handle this new situation.
If you install manually then you have to use
cpdir -vx / /mnt
to copy the root device to disk. When it is time to fill /usr and you
only have one floppy drive then hit DEL to get out of the installation
script and reboot as described in "TESTING". You can then finish the
installation manually.
8
USAGE(8) Minix Programmer's Manual USAGE(8)
16. LOW ON MEMORY AND ONLY ONE 720 KB FLOPPY DRIVE
If you only have one 720 kb floppy drive and your system is low on memory
then you can use the TINYROOT boot image. This image contains a small
kernel with only the BIOS disk driver, and a small root file system. You
can use this disk to boot your machine. Use the normal ROOT to install
the root file system. Keep booting your machine with TINYROOT until you
have compiled a small kernel for your system. Use the rootdev boot
variable to select the hard disk root file system. Do not use TINYROOT
for anything other than booting, always use ROOT when mentioned.
17. FLOPPY DRIVE 1 IS A HIGH DENSITY DRIVE
If you would like to install from floppy drive 1 then you need to copy at
least one sector from the USR image onto a diskette for drive 0. The USR
bootstrap has been rigged to boot the other drive.
18. INSTALLING ON A SECOND HARD DISK
Minix doesn't care if it is installed on the second disk of a system with
two disks. The only problem is to get it booted. You can either rig up
a diskette to boot Minix as shown earlier, or you can use the same trick
on the first disk. The command
installboot -m 5 /dev/hd0 /usr/mdec/masterboot
will lock the first disk into booting the second disk. Note that this
command modifies the disk outside a Minix partition, overwriting a bit of
code that has likely been put there by DOS fdisk. First verify that the
Boot Monitor can boot a DOS partition, because then the Minix master
bootstrap can do it too.
19. LOTS OF MEMORY ON A 286
You will have a hard time making Minix run out of 3 Mb memory. Memory
you can spare can be used for a "second level block cache" on the RAM
disk. The File System uses the second level cache to store copies of
disk blocks that are pushed out of the normal (primary) block cache. The
size of the primary cache is compiled into the FS server, but the size of
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -