Minix
Minix
-----------------------------------------------------------------------------------------------------------------------------------
Minix 安裝對硬體要求不高,386 到 Pentium II,
用 ROOT+USR 盤啟動電腦,當提示輸入設備名掛接 /usr 檔系統時,輸入『/dev/fd0p
-----------------------------------------------------------------------------------------------------------------------------------
Minix
Executing in
32-bit protected mode
Memory size =
130632K MINIX = 291K RAM disk = 480K Available = 129861K
RAM disk
loaded.
Sun Jun 27 16:21:37
GMT 2004
Finish the name of device to mount as /usr: /dev/fd0p2
/dev/fd0p2 is read-write mounted on /usr
Multiuser
startup in progress.
Starting standard daemons: update.
Login as root
and run 'setup' to install Minix.
Minix Release
2 Version 0.4
noname login:
-----------------------------------------------------------------------------------------------------------------------------------
用 root 登錄,運行『setup'開始安裝。
-----------------------------------------------------------------------------------------------------------------------------------
noname login: root
# setup
This is the
Minix installation script.
Note 1: If the
screen blanks suddenly then hit F3 to select "software
scrolling".
Note 2: If
things go wrong then hit
Note 3: The
installation procedure is described in the manual page
usage(8). It will be hard without it.
Note 4: Some
questions have default answers, like this: [y]
Simply hit RETURN (or ENTER) if you want to choose that answer.
Note 5: If you
see a colon (:) then you should hit RETURN to continue.
:
-----------------------------------------------------------------------------------------------------------------------------------
按下 ENTER 鍵。
-----------------------------------------------------------------------------------------------------------------------------------
What type of keyboard do you have? You can choose one of:
french
japanese polish
german latin-am scandinavn us-std
italian olivetti spanish us-swap
Keyboard type?
[us-std]
-----------------------------------------------------------------------------------------------------------------------------------
一般鍵盤都是 U.S.標準鍵盤,所以擊 ENTER 鍵。
-----------------------------------------------------------------------------------------------------------------------------------
Minix needs one primary partition of at least 35 Mb (it fits in 25 Mb, but
it needs 35 Mb if fully recompiled. Add more space to taste, but don't
overdo it, there are limits to the size of a file system.)
If there is no
free space on your disk then you have to back up one of the
other partitions, shrink, and reinstall. See the appropriate manuals of the
the operating systems currently installed. Restart your Minix installation
after you have made space.
To make this
partition you will be put in the editor "part". Follow the
advice under the '!' key to make a new partition of type MINIX. Do not
touch an existing partition unless you know precisely what you are doing!
Please note the name of the partition (e.g. c0d0p1, c0d1p3, c1d1p0) you
make. (See the devices section in usage(8) on Minix device names.)
:
-----------------------------------------------------------------------------------------------------------------------------------
按下 ENTER 鍵進行磁區分割。
-----------------------------------------------------------------------------------------------------------------------------------
Select device ----first---- --geom/last-- ------sectors-----
Device Cyl Head Sec Cyl Head Sec Base Size Kb
/dev/c0d0 ? ? ?
? ? ? ? ? ? ? ? ?
Num Sort Type
? ? ? ? ? ? ? ? ? ? ?
? ?
? ? ? ? ? ? ? ? ? ? ?
? ?
? ? ? ? ? ? ? ? ? ? ?
? ?
? ? ? ? ? ? ? ? ? ? ?
? ?
Type '+' or
'-' to change, 'r' to read, '?' for more help, '!' for advice
-----------------------------------------------------------------------------------------------------------------------------------
這部電腦只有一個硬碟,按 『r' 讀入磁區訊息。
-----------------------------------------------------------------------------------------------------------------------------------
Select device ----first---- --geom/last-- ------sectors-----
Device Cyl Head Sec Cyl Head Sec Base Size Kb
/dev/c0d0 823 32
63
0 0 0 823 15 62 0 1660176
830088
Num Sort Type
1* p0 06 DOS-BIG 0 1 0 731 31 62 63 1475649 737824
2 p1 00
None 0 0 0 0 0 -1
0 0 0
3 p2 00
None 0 0 0 0 0 -1 0 0 0
4 p3 00
None 0 0 0 0 0 -1 0 0 0
at-hd0:
QUANTUM TRB850
-----------------------------------------------------------------------------------------------------------------------------------
這個硬碟已有一個 Dos 磁區,剩餘大約
-----------------------------------------------------------------------------------------------------------------------------------
Select device ----first---- --geom/last-- ------sectors-----
Device Cyl Head Sec Cyl Head Sec Base Size Kb
/dev/c0d0 823 32 63
0 0 0 823 15 62 0 1660176
830088
Num Sort Type
1 p0 06 DOS-BIG 0 1 0 731 31 62 63 1475649 737824
2* p1 81 MINIX 732 0 0 823 31 62 1475712 185472
92736
3 p2 00
None 0 0 0 0 0 -1 0 0 0
4 p3 00
None 0 0 0 0 0 -1 0 0 0
Save partition
table? (y/n) y
-----------------------------------------------------------------------------------------------------------------------------------
當提示建立主磁區時,輸入『/dev/c0d0p
-----------------------------------------------------------------------------------------------------------------------------------
Please finish the name of the primary partition you have created:
(Just type RETURN if you want to rerun "part") /dev/c0d0p1
-----------------------------------------------------------------------------------------------------------------------------------
交換空間大小的設置,不是必須的。設置為『
-----------------------------------------------------------------------------------------------------------------------------------
How much swap space would you like? Swapspace is only needed if this
system is memory starved, like a 16-bit system with less then
32-bit system with less then
there is no need for it otherwise.
Size in kilobytes? [0] 4000
You have
created a partition named: /dev/c0d0p1
The following subpartitions are about to be created on /dev/c0d0p1:
Root
subpartition: /dev/c0d0p1s0 1440 kb
Swap subpartition: /dev/c0d0p1s1 4000 kb
/usr subpartition: /dev/c0d0p1s2 rest of c0d0p1
Hit return if
everything looks fine, or hit
think it over. The next step will destroy /dev/c0d0p1.
:
-----------------------------------------------------------------------------------------------------------------------------------
按下 ENTER 鍵。
-----------------------------------------------------------------------------------------------------------------------------------
/dev/c0d0p1s1: swapspace at offset 2, size 3998 kilobytes
/dev/c0d0p1s1 is swapspace
Migrating from
floppy to disk...
Scanning /dev/c0d0p1s2 for bad blocks. (
absolutely sure that there can not be any bad blocks. Otherwise just wait.)
Scan done
/dev/c0d0p1s2 is read-write mounted on /mnt
mkdir /mnt/bin
cp /usr/bin/MAKEDEV /mnt/bin/MAKEDEV
cp /usr/bin/arch /mnt/bin/arch
cp /usr/bin/badblocks /mnt/bin/badblocks
.
.
.
mkdir /mnt/root
mkdir /mnt/tmp
cp /root/.ashrc /mnt/.ashrc
/dev/fd0 unmounted from /root
/dev/c0d0p1s0 unmounted from /mnt
Second level file system block cache set to 1024 kb.
-----------------------------------------------------------------------------------------------------------------------------------
安裝第一步完成了,輸入『halt'和『boot c0d0p
-----------------------------------------------------------------------------------------------------------------------------------
Please insert the installation ROOT floppy and type 'halt' to exit Minix.
You can type 'boot c0d0p1' to try the newly installed Minix system. See
"TESTING" in the usage manual.
# halt
System Halted
fd0>boot c0d0p1
Minix
Executing in
32-bit protected mode
at-hd0: QUANTUM TRB850
Memory size =
130632K MINIX = 291K RAM disk = 1024K Available = 129317K
Sun Jun 27 16:31:37
GMT 2004
/dev/c0d0p1s1 is swapspace
/dev/c0d0p1s2 is read-write mounted on /usr
Multiuser
startup in progress.
Starting standard daemons: update.
Login as root and run 'setup /usr' to install floppy sets.
Minix Release
2 Version 0.4
noname login:
-----------------------------------------------------------------------------------------------------------------------------------
用 root 登錄,運行『setup /usr',ENTER,ENTER,插入 1 of USR.TAZ,ENTER。
-----------------------------------------------------------------------------------------------------------------------------------
noname login: root
# setup /usr
What is the size of the images on the diskettes? [all]
What floppy drive to use? [0]
Please insert input volume 1 and hit return
created
directory: adm
adm/lastlog, 0 tape blocks
adm/log, 0 tape blocks
.
.
.
created directory: man
Can't make directory mdec: File exists
-----------------------------------------------------------------------------------------------------------------------------------
當出現「File exists」警告資訊時,不用管它。-----------------------------------------------------------------------------------------------------------------------------------
mdec/boot, 050 tape blocks
mdec/bootblock, 01 tape blocks
mdec/extboot, 01 tape blocks
-----------------------------------------------------------------------------------------------------------------------------------
第一張盤的檔拷貝完成後,當系統提示時,插入 2 of USR.TAZ、3 of USR.TAZ。完成後,運行『setup /usr'安裝 NET.TAZ、SYS.TAZ、CMD.TAZ、FIX.TAZ等 7 張盤。
-----------------------------------------------------------------------------------------------------------------------------------
src/commands/talkd/talk.h, 03 tape blocks
src/commands/talkd/talkd.c, 03 tape blocks
src/commands/talkd/talkd.h, 01 tape blocks
/tmp/LAST, 0 tape blocks
Done.
-----------------------------------------------------------------------------------------------------------------------------------
然後我給系統命名為『host
-----------------------------------------------------------------------------------------------------------------------------------
# echo host1 >/etc/hostname.file
# ^D
Minix Release
2 Version 0.4
finiah login:
bin
! vi /usr/include/minix/config.h
-----------------------------------------------------------------------------------------------------------------------------------
我修改以下參數,處理更多進程,加大緩衝區,只使用 AT/IDE 磁片驅動,網路支援,8 個遠端終端登錄。
-----------------------------------------------------------------------------------------------------------------------------------
#define NR_PROCS 64
#if (MACHINE
== IBM_PC && _WORD_SIZE == 4)
#define NR_BUFS 2048 /* # blocks in the buffer cache */
#define NR_BUF_HASH 4096 /* size of buf hash table; MUST BE POWER OF 2*/
#endif
#define
ENABLE_CACHE2 0
#define
ENABLE_USERBIOS 1 /* enable user mode BIOS calls */
#define ENABLE_PCI 1 /* enable PCI device recognition */
#define
DMA_SECTORS 64 /* DMA buffer size (must be >= 1) */
#define
ENABLE_DP8390 1 /* enable DP8390 ethernet driver */
#define ENABLE_RTL8139 1 /* enable Realtek 8139 (rtl8139) */
#define
NR_CONS 4 /* # system consoles (1 to 8) */
#define NR_RS_LINES 2 /* # rs232 terminals (0 to 4) */
#define NR_PTYS 16 /* # pseudo terminals (0 to 64) */
-----------------------------------------------------------------------------------------------------------------------------------
主核心 Makefile 在 /usr/src/tools。用命令 『make hdboot'編譯新映射,並把其拷貝到 /minix/ 。
-----------------------------------------------------------------------------------------------------------------------------------
! cd tools/
! make hdboot
generic/tcp_send.o generic/udp.o
exec cc -c -m -
exec cc -o inet -i inet.a putk.o
install -S 512w fs
exec make - image
exec cc -O -D_MINIX -D_POSIX_SOURCE init.c -o init
.
.
.
install -S 192w init
installboot -image image ../kernel/kernel ../mm/mm ../fs/fs init
text data bss size
86384 21720 136336 244440 ../kernel/kernel
14672 1156 42800 58628 ../mm/mm
29024 2400 2189456 2220880 ../fs/fs
7008 2084 1356 10448 init
------ ------ ------ -------
137088 27360 2369948 2534396 total
exec sh mkboot hdboot
cp image /dev/c0d0p1s0:/minix/
Done.
-----------------------------------------------------------------------------------------------------------------------------------
Ctrl+D 退出後用 『root'登錄,用『shutdown'命令關閉系統。此時進入啟動管理器,可關機,也可修改啟動參數。現在修改啟動參數,關閉 RAM 盤,設置網卡參數,NE2000 或 NE2000 相容網卡 I/O 位址
300, IRQ 10。保存並引導。
-----------------------------------------------------------------------------------------------------------------------------------
! shutdown
Broadcast message from bin@finiah (console)
Tue Oct 1 18:08:49 1996...
The system will shutdown NOW
System Halted
d0p1s0>unset ramsize
d0p1s0>DPETH0=300:10
d0p1s0>servers=inet
d0p1s0>save
d0p1s0>boot
-----------------------------------------------------------------------------------------------------------------------------------
啟動後,要設置本機的 IP 位址,子網路遮罩。
修改『/etc/inet.conf'檔,內容是『eth0
DP8390 0 { default; };』;
建立『/etc/rc.net'檔,內容是
『
ifconfig -h 198.8.8.20 -n 255.255.255.0
daemonize nonamed
daemonize irdpd
daemonize tcpd shell in.rshd
daemonize tcpd login in.rld
daemonize tcpd telnet in.telnetd
daemonize tcpd ftp in.ftpd
』。
-----------------------------------------------------------------------------------------------------------------------------------
Minix
Executing in
32-bit protected mode
ne2000: NE2000 at 300:10
at-hd0:
QUANTUM TRB850
Memory size =
130632K MINIX = 2483K RAM disk = 0K Available = 128079K
Sun Jun 27 16:31:37
GMT 2004
/dev/c0d0p1s1 is swapspace
/dev/c0d0p1s2 is read-write mounted on /usr
Multiuser
startup in progress.
dp8390#0: NE2000 at 300:10
Starting daemons: update cron.
Minix Release
2 Version 0.4
noname login:
root
#
-----------------------------------------------------------------------------------------------------------------------------------
最後,建立『/etc/hosts',『etc/ethers'檔。
-----------------------------------------------------------------------------------------------------------------------------------
# echo nameserver 192.168.1.20 >/etc/resolv.conf
-----------------------------------------------------------------------------------------------------------------------------------
建立『/etc/rc.net',『/etc/hosts',『etc/ethers'文件。
-----------------------------------------------------------------------------------------------------------------------------------
.
.
.
# shutdown -r