⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.t

📁 操作系统设计与实现源码
💻 T
📖 第 1 页 / 共 3 页
字号:
.PP
This 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 a
file system for the root with at least 512 inodes (files), and
fill it from the floppy:
.PP
.XB "mkfs\0\-i\0512\0/dev/hd2a"
.XB "mount\0/dev/fd0\0/fd0"
.XB "mount\0/dev/hd2a\0/mnt"
.XB "cpdir\0\-v\0/fd0\0/mnt"
.XB "umount\0/dev/fd0"
.PP
Remove
.B /mnt/etc/issue
to get rid of the "use setup" message that greets you when you boot, and
edit the file
.B /mnt/etc/fstab
to name the devices MINIX has been installed on.  In our example it
should look like this:
.PP
.XB "root=/dev/hd2a"
.XB "usr=/dev/hd2c"
.PP
Unmount the new root:
.PP
.XB "umount\0/dev/hd2a"
.PP
Make it bootable:
.PP
.XB "installboot\0\-d\0/dev/hd2a\0/usr/mdec/bootblock\0boot"
.PP
The automatic script would now set the
.B rootdev
and
.B ramimagedev
boot variables.  You can do this now using the
.B edparams
command, but it is easier to postpone it until the testing phase.  The
settings should be:
.PP
.XB "rootdev=hd2a"
.XB "ramimagedev=hd2a"
.SS "6. TESTING"
By now a new MINIX system is present on your hard disk.  Time to see if
it 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 to
boot the MINIX partition on the hard disk.  Use the monitor command
.B boot hd2
to boot the primary partition MINIX has been installed in.  (It is "hd2" in
our example.)  For a \s-2SCSI\s+2 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.
.PP
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
.B ESC
once more to get to the command prompt.  The command
.B 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:
.PP
.XB "minix(=,MINIX)\0{boot}"
.XB "dos(d,MS-DOS)\0{boot\0hd1}"
.XB "save"
.PP
MS-DOS is assumed to be in the first partition in the example above (hd1).
When finished type
.B menu
to see if the menu looks right. If so hit '=' to start MINIX. Log in as root.
.SS "7. ADDING PROGRAMS AND SOURCES TO /usr"
The
.B setup
command 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 /usr
directory, so the command to use three times is
.PP
.XB setup\0/usr
.PP
.B Setup
will ask for the size of data on the floppies, which is by default simply
the entire floppy.  You will see some "Cannot make directory" errors
while extracting, as some directories already exist.  Ignore these messages.
You need the
.B \s-2USR.TAZ\s+2
set if you want a working MINIX system,
.B \s-2SYS.TAZ\s+2
if you want recompile the system or study it, and
.B \s-2CMD.TAZ\s+2
if you also want the sources of the 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.
.PP
If your machine does not have enough memory to run
.B setup\0/usr
then type these commands manually:
.PP
.XB "cd\0/usr"
.XB "vol\0/dev/fd0 | uncompress | tar\0xvfp\0\-"
.SS "8. NAMES"
A standalone machine will have to be given a name.  As
.B root
type
.PP
.XB "echo\0\fIname\fB\0>/etc/hostname.file"
.PP
to change the host name of your machine to
.IR name .
.SS "9. ACTIVE ON BOOT"
You may want to make the MINIX partition active so that it is automatically
booted.  With MS-DOS
.B fdisk
or MINIX
.BR part ,
mark the primary partition that contains MINIX active.  Using the menu you
made earlier you can boot either MINIX or MS-DOS at a keypress.  You can even
set timeouts.  To boot MINIX automatically after 5 seconds:
.PP
.XB "main()\0{trap\05000\0minix;\0menu}"
.PP
See
.BR monitor (8)
for all the details on the monitor.
.PP
If you don't trust this then you can rig up a diskette that boots the MINIX
partition when left in the drive:
.PP
.XB "installboot\0\-m\02\0/dev/fd0\0/usr/mdec/masterboot"
.PP
The number 2 indicates the hard disk partition that must be booted, you can
use the numbers 1 to 9 for hd1 to hd9.
.SS "10. DEVICES"
A crash course on the MINIX devices in
.BR /dev :
The two hard disks are named
.BR hd0
and
.BR 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
.BR hd1 ,
.BR hd2 ,
.BR hd3 ,
and
.BR hd4 .
And for disk 1 they are named
.BR hd6 ,
.BR hd7 ,
.BR hd8 ,
and
.BR hd9 .
These partitions may contain file systems,
.B 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
.B hd1
are named
.BR hd1a ,
.BR hd1b ,
.BR hd1c ,
and
.BR hd1d .
The other partitions may have four subpartitions that are named in the same
way by adding a letter from
.B a
to
.BR d .
So one disk may have four partitions, and 16 subpartititions total.  SCSI
disks are named in the same way, from
.BR sd0
to
.BR sd39d
for all possible devices for all eight SCSI targets.
The two floppy disks are
.BR fd0
and
.BR fd1 .
Each may have four partitions named
.BR fd0a ,
.BR fd0b ", ..."
.BR fd1d .
The command
.B MAKEDEV
knows how to make devices, and
.B DESCRIBE
can tell you what an unknown device may be, or even what all devices in
.B /dev
may be if called without arguments.  Devices are described fully in
.BR dev (4),
and in the device specific manual pages like
.BR fd (4)
and
.BR hd (4).
.SS "11. EDITORS"
The editors available are
.B elvis
(a
.B vi
clone),
.B elle
(a simple
.B emacs
clone),
and the old MINIX
.B mined
editor.  Of these editors only elvis can recover your file after a system
crash.  Only
.B mined
is available at installation time.  (All you need to know about mined right
now is that CTRL-X gets you out of it.)
.SS "12. INSTALLING ON A SCSI DISK"
Using a disk other than an (IDE)
.B hd
disk complicates things a bit.  The Boot Monitor uses the BIOS, so it names
all disks with
.B hd
names.  So it is
.B boot hd1
to boot partition 1, and
.B "ramimagedev=sd2a"
to tell MINIX its root partition.  If you have both a normal and a SCSI disk
then the disks may be
.B hd0
and
.B hd5
to the Monitor, and
.B hd0
and
.B sd0
to MINIX.
.SS "13. NATIONAL KEYBOARDS"
The directory
.B /usr/lib/keymaps
contains keymap tables for several national keyboards.  If you have a German
keyboard for instance, then
.PP
.XB "loadkeys\0/usr/lib/keymaps/german.map"
.PP
will load the German key translation table into the keyboard driver.  Copy
the map to
.B /etc/keymap
once MINIX is installed on the hard disk, because having to type a key
sequence like one of these:
.PP
.XB "loadkezs\0\-usr\-lib\-kezmaps\-german.map"
.XB "loqdkeys\0=usr=lib=key,qps=french.,qp"
.PP
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.)
.SH SUGGESTIONS
Below are a few useful suggestions.  Some of the information can be of use
in other situations than described here.
.SS "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.)
.PP
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.
.SS "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
.B rootdev
to the same value as
.BR ramimagedev .
This is slower then a RAM disk, but saves a lot of memory.
.PP
The automatic installation script knows how to handle this new situation.
If you install manually then you have to use
.PP
.XB "cpdir\0\-vx\0/\0/mnt"
.PP
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.
See the XT640K.TXT file for more advice on small machines.
.SS "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 \s-2TINYROOT\s+2 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 \s-2ROOT\s+2 to
install the root file system.  Keep booting your machine with
\s-2TINYROOT\s+2 until you have compiled a small kernel for your system.
Use the
.B rootdev
boot variable to select the hard disk root file system.  Do
.B not
use \s-2TINYROOT\s+2 for anything other than booting, always use
\s-2ROOT\s+2 when mentioned.
.SS "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 \s-2USR\s+2 image onto a diskette for drive 0.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -