add directory study

This commit is contained in:
gohigh
2024-02-19 00:25:23 -05:00
parent b1306b38b1
commit f3774e2f8c
4001 changed files with 2285787 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
root::0:root
other::1:
bin::2:root,bin,daemon
sys::3:root,bin,sys,adm
adm::4:root,adm,daemon
uucp::5:uucp
mail::7:root
daemon::12:root,daemon
cron::16:
lp::18:lp
mem::20:
sysadmin::23:sysadmin
group::50:

View File

@@ -0,0 +1,5 @@
If your screen goes blank periodically, hit the F3 key.
Welcome to MINIX.

View File

@@ -0,0 +1,41 @@
# Make the special files. Call:
# /etc/mkdev ram_size hd1_size hd2_size hd3_size hd4_size
# If the sizes are omitted, 0 is used.
case $# in
5) A=$1; B=$2; C=$3 D=$4; E=$5 ;;
*) A=0; B=0; C=0; D=0; E=0;
echo RAM disk and hard disk sizes are being set to 0 ;;
esac
mknod ram b 1 0 $A
mknod mem c 1 1
mknod kmem c 1 2
mknod null c 1 3
mknod port c 1 4
mknod fd0 b 2 0 0
mknod fd1 b 2 1 0
mknod pc0 b 2 4 360
mknod pc1 b 2 5 360
mknod at0 b 2 8 1200
mknod at1 b 2 9 1200
mknod ps0 b 2 16 720
mknod ps1 b 2 17 720
mknod pat0 b 2 20 360
mknod pat1 b 2 21 360
mknod PS0 b 2 28 1440
mknod PS1 b 2 29 1440
mknod hd0 b 3 0 0
mknod hd1 b 3 1 $B
mknod hd2 b 3 2 $C
mknod hd3 b 3 3 $D
mknod hd4 b 3 4 $E
mknod console c 4 0
mknod tty0 c 4 0
mknod tty1 c 4 1
mknod tty2 c 4 2
mknod tty c 5 0
mknod lp c 6 0
chmod 600 hd?
chmod 640 mem kmem
chmod 222 lp

Binary file not shown.

View File

@@ -0,0 +1,4 @@
root:ok9WLe10V{vdt:0:0::/:
daemon:*:1:1::/etc:
bin::2:2::/bin:
ast:Oky||V|yoZ7vO:8:3::/usr/ast:

View File

@@ -0,0 +1,23 @@
# This file performs various system initializations.
# Initialize files.
>/etc/mtab # create file to log mounts
>/etc/utmp # /etc/utmp keeps track of logins
# Mount the floppy disk.
/bin/getlf "Please insert /usr diskette in drive 0. Then hit ENTER."
/etc/mount /dev/fd0 /usr # mount the floppy disk
# Try to read the hardware real-time clock, if there is one, to set the date
/usr/bin/date `/usr/bin/readclock` </dev/tty0
# Initialization (cannot be done until /usr is mounted).
>/usr/adm/wtmp # accounting information
/usr/bin/printroot >>/etc/mtab # /etc/mtab keeps track of mounts
# Initialize the first RS232 line to 1200 baud.
/usr/bin/stty 1200 </dev/tty1
#Display the message of the day and start update.
cat /etc/message
/etc/update &

View File

@@ -0,0 +1,37 @@
# Shell script to set up usr when no RAM disk is being used.
cd /usr
if test -d bin; then : ; else echo Cannot find /usr/bin; exit 1; fi
if test -d lib; then : ; else echo Cannot find /usr/lib; exit 1; fi
if test -d src; then : ; else echo Cannot find /usr/src; exit 1; fi
if test -d tmp; then : ; else echo Cannot find /usr/tmp; exit 1; fi
if test -d include; then : ; else echo Cannot find /usr/include; exit 1; fi
mkdir dev etc usr usr/tmp 2>/dev/null
cd /etc
cp * /usr/etc
cd /usr/dev
/etc/mkdev
echo "You may wish to rm /usr/dev/ram and /usr/dev/hd* and remake them with sizes."
echo "It is not required however. Installing sizes is only affects a few"
echo "programs that sequentially read entire partitions, such as 'readall'"
cd /usr
mv lib usr/lib
mv src usr/src
mv adm usr/adm
mv ast usr/ast
mv doc usr/doc
mv man usr/man
mv spool usr/spool
mv include usr/include
mv bin usr/bin
mkdir bin
cd /bin
cp * /usr/bin
PATH=$PATH:/usr/usr/bin
cd /usr/usr/bin
fixbin /usr/bin /usr/bin >/dev/null 2>&1
fixbin /usr/usr/bin /usr/usr/bin >/dev/null 2>&1

View File

@@ -0,0 +1,35 @@
case $# in
6) ;;
*) echo "Usage: setup_root device ram_size hd1_size hd2_size hd3_size hd4_size"
exit 1
;;
esac
old_dir=`pwd` # save current directory
if /etc/mount $1 /user
then : # successful mount
else echo "Unable to mount $1. Root file system not created."
exit 1
fi
# Make the directories
cd /user
mkdir bin dev etc lib tmp user usr
chown bin bin dev etc lib tmp user usr
chgrp bin bin dev etc lib tmp user usr
chmod 777 bin dev etc lib tmp user usr
# Make the special files.
cd dev
/etc/mkdev $2 $3 $4 $5 $6
# Copy /bin and /etc
cpdir -m /bin /user/bin
cpdir -m /etc /user/etc
fixbin /user/bin /user/bin >/dev/null 2>&1
chown bin /user/etc/*
chown root /user/etc/*mount
chmod 4755 /user/etc/*mount
cd $old_dir
/etc/umount $1

View File

@@ -0,0 +1,205 @@
# Install the /usr file system
disk=6 # starting disk (1-3 are boot diskettes)
STOP=18 # first disk that does not exist
i=/usr/include
s=/usr/src
l=/usr/src/lib
# Unmount all hard disk partitions and see if the argument can be mounted.
case $# in
1) ;;
*) echo Please specify the special file for the MINIX partition
echo For example: /etc/setup_usr /dev/hd1
exit 1
;;
esac
cd /
/etc/umount /dev/hd1 >/dev/null 2>&1
/etc/umount /dev/hd2 >/dev/null 2>&1
/etc/umount /dev/hd3 >/dev/null 2>&1
/etc/umount /dev/hd4 >/dev/null 2>&1
if /etc/mount $1 /user >/dev/null 2>&1
then :
else echo Unable to mount $1
exit 1
fi
PATH=$PATH:/user/bin # hard disk will be mounted on /user
# Make the principal MINIX directories.
echo Making directories
mkdir /user/adm 2>/dev/null
mkdir /user/ast 2>/dev/null
mkdir /user/bin 2>/dev/null
mkdir /user/doc 2>/dev/null
mkdir /user/etc 2>/dev/null
mkdir /user/include 2>/dev/null
mkdir /user/include/minix 2>/dev/null
mkdir /user/include/sys 2>/dev/null
mkdir /user/lib 2>/dev/null
mkdir /user/lib/tmac 2>/dev/null
mkdir /user/man 2>/dev/null
mkdir /user/spool 2>/dev/null
mkdir /user/spool/at 2>/dev/null
mkdir /user/spool/lpd 2>/dev/null
mkdir /user/spool/mail 2>/dev/null
mkdir /user/spool/uucp 2>/dev/null
mkdir /user/src 2>/dev/null
mkdir /user/src/amoeba 2>/dev/null
mkdir /user/src/amoeba/examples 2>/dev/null
mkdir /user/src/amoeba/kernel 2>/dev/null
mkdir /user/src/amoeba/fs 2>/dev/null
mkdir /user/src/amoeba/mm 2>/dev/null
mkdir /user/src/amoeba/util 2>/dev/null
mkdir /user/src/commands 2>/dev/null
mkdir /user/src/commands/bin 2>/dev/null
mkdir /user/src/commands/ibm 2>/dev/null
mkdir /user/src/commands/bawk 2>/dev/null
mkdir /user/src/commands/de 2>/dev/null
mkdir /user/src/commands/dis88 2>/dev/null
mkdir /user/src/commands/ic 2>/dev/null
mkdir /user/src/commands/indent 2>/dev/null
mkdir /user/src/commands/kermit 2>/dev/null
mkdir /user/src/commands/m4 2>/dev/null
mkdir /user/src/commands/make 2>/dev/null
mkdir /user/src/commands/mined 2>/dev/null
mkdir /user/src/commands/nroff 2>/dev/null
mkdir /user/src/commands/patch 2>/dev/null
mkdir /user/src/commands/sh 2>/dev/null
mkdir /user/src/commands/zmodem 2>/dev/null
mkdir /user/src/elle 2>/dev/null
mkdir /user/src/fs 2>/dev/null
mkdir /user/src/lib 2>/dev/null
mkdir /user/src/lib/ansi 2>/dev/null
mkdir /user/src/lib/ibm 2>/dev/null
mkdir /user/src/lib/other 2>/dev/null
mkdir /user/src/lib/posix 2>/dev/null
mkdir /user/src/lib/string 2>/dev/null
mkdir /user/src/kernel 2>/dev/null
mkdir /user/src/mm 2>/dev/null
mkdir /user/src/test 2>/dev/null
mkdir /user/src/tools 2>/dev/null
mkdir /user/tmp 2>/dev/null
# At this point, the root file system is in place and diskette #5 is in
# drive 0 mounted on /usr. The MINIX hard disk partition is on /user.
# Copy /bin and /etc to the hard disk.
echo Copying /bin
cpdir -m /bin /user/bin # copy /bin to the hard disk
echo Copying /etc
cpdir -m /etc /user/etc # copy /etc to the hard disk
cpdir -m /usr/bin /user/bin # copy /usr/bin to the hard disk
echo Copying diskette 5
fixbin /user/bin /user/bin >/dev/null 2>&1
echo Diskette 5 copied
/etc/umount /dev/fd0
while test $disk != $STOP
do getlf "Please insert disk $disk, then hit the ENTER key"
/etc/mount /dev/fd0 /usr -r
cd /usr
for dir in *
do echo Copying $dir
if test $dir = 'LAST_DISK'; then disk=`expr $STOP - 1`; fi
# Establish base name
case $dir in
include) base=/user/include ;;
ast) base=/user/ast ;;
bin) base=/user/bin ;;
etc) base=/user/etc ;;
usrlib) base=/user/lib ;;
kernel) base=/user/src/kernel ;;
fs) base=/user/src/fs ;;
mm) base=/user/src/mm ;;
tools) base=/user/src/tools ;;
test) base=/user/src/test ;;
elle) base=/user/src/elle ;;
amoeba) base=/user/src/amoeba ;;
lib) base=/user/src/lib ;;
commands) base=/user/src/commands ;;
LAST_DISK) base=/tmp ;;
*) base=/user/$dir ;;
esac
cd / # cpdir creates pipes in current dir
cpdir -m /usr/$dir $base
done
disk=`expr $disk + 1`
cd /
/etc/umount /dev/fd0
done
#All the disks have now been loaded. Unpack them.
echo Loading finished. Please remove the last diskette from the drive.
echo The files will now be unpacked.
cd /
fixbin /user/bin /user/bin >/dev/null 2>&1
/etc/umount $1 >/dev/null 2>&1
/etc/mount $1 /usr >/dev/null 2>&1
echo Unpacking /usr/lib
cd /usr/lib
compress -d *Z >/dev/null 2>&1
rm -f *Z 2>/dev/null
chown bin *
for d in $i \
$i/minix \
$i/sys \
$s/elle \
$s/kernel \
$s/fs \
$s/mm \
$s/tools \
$s/test \
$l/ansi \
$l/posix \
$l/other \
$l/ibm \
$l/string \
$s/commands \
$s/commands/ibm \
$s/commands/bawk \
$s/commands/de \
$s/commands/dis88 \
$s/commands/indent \
$s/commands/ic \
$s/commands/m4 \
$s/commands/make \
$s/commands/mined \
$s/commands/nroff \
$s/commands/patch \
$s/commands/sh \
$s/commands/zmodem \
$s/commands/kermit \
$s/commands/elvis \
$s/amoeba \
$s/amoeba/kernel \
$s/amoeba/fs \
$s/amoeba/mm \
$s/amoeba/examples \
$s/amoeba/util
do echo Unpacking $d
cd $d
compress -d *Z >/dev/null 2>&1
rm -f *.Z 2>/dev/null
for j in *.a; do ar x $j >/dev/null 2>&1; done
rm -f *.a 2>/dev/null
chown bin * .
done
# link commands/nroff/tmac.an to lib/tmac/tmac.an
ln /usr/src/commands/nroff/tmac.an /usr/lib/tmac/tmac.an
rm -rf /usr/LAST_DISK 2>/dev/null
chown bin /usr/*
cd /usr/lib
chmod 755 cem cpp cg opt
echo Installation completed.
exit 0

View File

@@ -0,0 +1,32 @@
# Minix Termcap
# Modified by Glen Overby <overby@plains.nodak.edu> 3/4/90
# Added insert/delete line, character, etc. Now supports
# everything the console impliments that Termcap can use.
mx|minix|minix console:\
:bs:\
:co#80:li#25:\
:cd=\E[0J:cl=\E[H\E[0J:\
:so=\E[7m:se=\E[0m:\
:us=\E[4m:ue=\E[0m:\
:mb=\E[5m:md=\E[1m:\
:mr=\E[7m:me=\E[0m:\
:sr=\EM:\
:cm=\E[%i%d;%dH:\
:ho=\E[H:\
:al=\E[L:AL=\E[%dL:\
:ce=\E[K:\
:DC=\E[%dP:dc=\E[P:\
:DL=\E[%dM:dl=\E[M:\
:DO=\E[%dB:do=\E[B:\
:IC=\E[%d@:ic=\E[@:\
:it#8:\
:le=^H:LE=\E[%dD:nd=\E[C:\
:RI=\E[%dC:\
:up=\E[A:UP=\E[%dA:\
:ku=\E[A:kd=\E[B:\
:kl=\E[D:kr=\E[C:\
:kh=\E[H:k0=\E[Y:\
:k1=\E[V:k2=\E[U:\
:k3=\E[T:k4=\E[S:\
:k5=\E[G:

View File

@@ -0,0 +1,2 @@
100
0f1

View File

@@ -0,0 +1,2 @@
minix tty0
vt100 tty1

Binary file not shown.

Binary file not shown.