initial commit
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
7
|
||||
@@ -0,0 +1,263 @@
|
||||
#!/bin/bash
|
||||
|
||||
#if [ -x /usr/bin/logger ]; then
|
||||
# LOGGER="/usr/bin/logger -s -p user.notice -t dhclient"
|
||||
#else
|
||||
LOGGER=/bin/echo
|
||||
#fi
|
||||
|
||||
make_resolv_conf() {
|
||||
if [ "x$new_domain_name" != x ] || [ x"$new_domain_name_servers" != x ]; then
|
||||
>/etc/resolv.conf
|
||||
if [ "x$new_domain_name" != x ]; then
|
||||
$LOGGER search $new_domain_name >/etc/resolv.conf
|
||||
fi
|
||||
if [ "x$new_domain_name_servers" != x ]; then
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
$LOGGER nameserver $nameserver >>/etc/resolv.conf
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
||||
exit_with_hooks() {
|
||||
exit_status=$1
|
||||
# if [ -f /etc/dhclient-exit-hooks ]; then
|
||||
# . /etc/dhclient-exit-hooks
|
||||
# fi
|
||||
# probably should do something with exit status of the local script
|
||||
exit $exit_status
|
||||
}
|
||||
|
||||
# Invoke the local dhcp client enter hooks, if they exist.
|
||||
if [ -f /etc/dhclient-enter-hooks ]; then
|
||||
exit_status=0
|
||||
# . /etc/dhclient-enter-hooks
|
||||
# allow the local script to abort processing of this state
|
||||
# local script must set exit_status variable to nonzero.
|
||||
# if [ $exit_status -ne 0 ]; then
|
||||
# exit $exit_status
|
||||
# fi
|
||||
fi
|
||||
|
||||
if [ x$new_network_number != x ]; then
|
||||
$LOGGER New Network Number: $new_network_number
|
||||
fi
|
||||
|
||||
if [ x$new_broadcast_address != x ]; then
|
||||
$LOGGER New Broadcast Address: $new_broadcast_address
|
||||
new_broadcast_arg="broadaddr $new_broadcast_address"
|
||||
fi
|
||||
if [ x$old_broadcast_address != x ]; then
|
||||
old_broadcast_arg="broadaddr $old_broadcast_address"
|
||||
fi
|
||||
if [ x$new_subnet_mask != x ]; then
|
||||
new_netmask_arg="netmask $new_subnet_mask"
|
||||
fi
|
||||
if [ x$old_subnet_mask != x ]; then
|
||||
old_netmask_arg="netmask $old_subnet_mask"
|
||||
fi
|
||||
if [ x$alias_subnet_mask != x ]; then
|
||||
alias_subnet_arg="netmask $alias_subnet_mask"
|
||||
fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
eval "/bin/ifconfig $interface $medium"
|
||||
eval "/bin/ifconfig $interface addr -alias 0.0.0.0 $medium" >/dev/null 2>&1
|
||||
sleep 1
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xPREINIT ]; then
|
||||
if [ x$alias_ip_address != x ]; then
|
||||
/bin/ifconfig $interface addr -alias $alias_ip_address > /dev/null 2>&1
|
||||
/bin/route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
/bin/ifconfig $interface addr 0.0.0.0 netmask 0.0.0.0 \
|
||||
broadaddr 255.255.255.255 up
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then
|
||||
exit_with_hooks 0;
|
||||
fi
|
||||
|
||||
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
|
||||
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
|
||||
|
||||
# if [ -n "$new_nis_domain" ]; then
|
||||
# domainname "$new_nis_domain"
|
||||
|
||||
# rm -f /etc/yp.conf
|
||||
# if [ -n "$new_nis_servers" ]; then
|
||||
# for I in $new_nis_servers; do
|
||||
# echo "domain $new_nis_domain server $I" >> /etc/yp.conf
|
||||
# done
|
||||
# else
|
||||
# echo "domain $new_nis_domain broadcast" >> /etc/yp.conf
|
||||
# fi
|
||||
# elif [ -n "$new_nis_servers" ]; then
|
||||
# rm -f /etc/yp.conf
|
||||
# for I in $new_nis_servers; do
|
||||
# echo "ypserver $I" >> /etc/yp.conf
|
||||
# done
|
||||
# fi
|
||||
|
||||
# if [ -n "$new_ntp_servers" ]; then
|
||||
# cat <<EOF > /etc/ntp.conf
|
||||
#restrict default ignore
|
||||
#restrict 127.0.0.1
|
||||
#driftfile /etc/ntp/drift
|
||||
#broadcastdelay 0.008
|
||||
#authenticate yes
|
||||
#keys /etc/ntp/keys
|
||||
#EOF
|
||||
# :> /etc/ntp/step-tickers
|
||||
# for I in $new_ntp_servers; do
|
||||
# echo "server $I" >> /etc/ntp.conf
|
||||
# echo "$I" >> /etc/ntp/step-tickers
|
||||
# done
|
||||
# fi
|
||||
|
||||
# current_hostname=`hostname`
|
||||
# if [ x$current_hostname = x ] || \
|
||||
# [ x$current_hostname = x$old_host_name ]; then
|
||||
# if [ x$current_hostname = x ] || \
|
||||
# [ x$new_host_name != x$old_host_name ]; then
|
||||
# $LOGGER "New Hostname: $new_host_name"
|
||||
# hostname $new_host_name
|
||||
# fi
|
||||
# fi
|
||||
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
|
||||
[ x$alias_ip_address != x$old_ip_address ]; then
|
||||
/bin/ifconfig $interface addr -alias $alias_ip_address > /dev/null 2>&1
|
||||
/bin/route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]
|
||||
then
|
||||
eval "/bin/ifconfig $interface addr -alias $old_ip_address $medium"
|
||||
/bin/route delete $old_ip_address 127.1 >/dev/null 2>&1
|
||||
for router in $old_routers; do
|
||||
/bin/route delete default $router >/dev/null 2>&1
|
||||
done
|
||||
if [ "$old_static_routes" != "" ]; then
|
||||
set -- $old_static_routes
|
||||
while [ $# -gt 1 ]; do
|
||||
/bin/route delete $1 $2
|
||||
shift; shift
|
||||
done
|
||||
fi
|
||||
arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' |sh
|
||||
fi
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
eval "/bin/ifconfig $interface addr $new_ip_address $new_netmask_arg \
|
||||
$new_broadcast_arg $medium"
|
||||
$LOGGER "New IP Address($interface): $new_ip_address"
|
||||
$LOGGER "New Subnet Mask($interface): $new_subnet_mask"
|
||||
$LOGGER "New Broadcast Address($interface): $new_broadcast_address"
|
||||
if [ "$new_routers" != "" ]; then
|
||||
$LOGGER "New Routers: $new_routers"
|
||||
fi
|
||||
/bin/route add $new_ip_address 127.1 >/dev/null 2>&1
|
||||
for router in $new_routers; do
|
||||
/bin/route add default $interface gw $router >/dev/null 2>&1
|
||||
done
|
||||
if [ "$new_static_routes" != "" ]; then
|
||||
$LOGGER "New Static Routes: $new_static_routes"
|
||||
set -- $new_static_routes
|
||||
while [ $# -gt 1 ]; do
|
||||
/bin/route add $1 $2
|
||||
shift; shift
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
|
||||
then
|
||||
/bin/ifconfig $interface addr alias $alias_ip_address $alias_subnet_arg
|
||||
/bin/route add $alias_ip_address 127.0.0.1
|
||||
fi
|
||||
make_resolv_conf
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
|
||||
|| [ x$reason = xSTOP ]; then
|
||||
if [ x$alias_ip_address != x ]; then
|
||||
/bin/ifconfig $interface addr -alias $alias_ip_address > /dev/null 2>&1
|
||||
/bin/route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
if [ x$old_ip_address != x ]; then
|
||||
eval "/bin/ifconfig $interface addr -alias $old_ip_address $medium"
|
||||
/bin/route delete $old_ip_address 127.1 >/dev/null 2>&1
|
||||
for router in $old_routers; do
|
||||
/bin/route delete default $router >/dev/null 2>&1
|
||||
done
|
||||
if [ "$old_static_routes" != "" ]; then
|
||||
set -- $old_static_routes
|
||||
while [ $# -gt 1 ]; do
|
||||
/bin/route delete $1 $2
|
||||
shift; shift
|
||||
done
|
||||
fi
|
||||
arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
|
||||
|sh >/dev/null 2>&1
|
||||
fi
|
||||
if [ x$alias_ip_address != x ]; then
|
||||
/bin/ifconfig $interface addr alias $alias_ip_address $alias_subnet_arg
|
||||
/bin/route add $alias_ip_address 127.0.0.1
|
||||
fi
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
if [ x$reason = xTIMEOUT ]; then
|
||||
if [ x$alias_ip_address != x ]; then
|
||||
/bin/ifconfig $interface addr -alias $alias_ip_address > /dev/null 2>&1
|
||||
/bin/route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
eval "/bin/ifconfig $interface addr $new_ip_address $new_netmask_arg \
|
||||
$new_broadcast_arg $medium"
|
||||
$LOGGER "New IP Address($interface): $new_ip_address"
|
||||
$LOGGER "New Subnet Mask($interface): $new_subnet_mask"
|
||||
$LOGGER "New Broadcast Address($interface): $new_broadcast_address"
|
||||
sleep 1
|
||||
if [ "$new_routers" != "" ]; then
|
||||
$LOGGER "New Routers: $new_routers"
|
||||
set -- $new_routers
|
||||
if ping -q -c 1 $1; then
|
||||
if [ x$new_ip_address != x$alias_ip_address ] && \
|
||||
[ x$alias_ip_address != x ]; then
|
||||
/bin/ifconfig $interface addr alias $alias_ip_address $alias_subnet_arg
|
||||
/bin/route add $alias_ip_address 127.0.0.1
|
||||
fi
|
||||
/bin/route add $new_ip_address 127.1 >/dev/null 2>&1
|
||||
for router in $new_routers; do
|
||||
/bin/route add default $interface gw $router >/dev/null 2>&1
|
||||
done
|
||||
set -- $new_static_routes
|
||||
while [ $# -gt 1 ]; do
|
||||
/bin/route add $1 $2
|
||||
shift; shift
|
||||
done
|
||||
make_resolv_conf
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
fi
|
||||
eval "/bin/ifconfig $interface addr -alias $new_ip_address $medium"
|
||||
for router in $old_routers; do
|
||||
/bin/route delete default $router >/dev/null 2>&1
|
||||
done
|
||||
if [ "$old_static_routes" != "" ]; then
|
||||
set -- $old_static_routes
|
||||
while [ $# -gt 1 ]; do
|
||||
/bin/route delete $1 $2
|
||||
shift; shift
|
||||
done
|
||||
fi
|
||||
arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' \
|
||||
|sh >/dev/null 2>&1
|
||||
exit_with_hooks 1
|
||||
fi
|
||||
|
||||
exit_with_hooks 0
|
||||
@@ -0,0 +1,2 @@
|
||||
search enivest.net
|
||||
nameserver 192.168.80.1
|
||||
@@ -0,0 +1 @@
|
||||
root:x:0:0::/home:/bin/bash
|
||||
@@ -0,0 +1,3 @@
|
||||
PS1='\[\e[31m\]\u\[\e[m\]@\[\e[32m\]\h\[\e[m\]:\W\$ '
|
||||
export PS1
|
||||
alias ls='ls --color'
|
||||
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
Minixfs is copyright S.N. Henson 1991,1992,1993,1994,1995.
|
||||
This code may be freely distributed unmodified, provided this copyright notice
|
||||
is intact. A small copying fee may be charged for redistribution provided this
|
||||
does not exceed the equivalent of five pounds Sterling (UK currency).
|
||||
|
||||
You are free to compile, modify and recompile modified versions of this
|
||||
program. Modified versions of this source may be redistributed provided:
|
||||
|
||||
1. Modified versions are clearly marked as such in each file modified.
|
||||
2. This copying file is included unmodified in any distribution.
|
||||
3. An additional startup message is added stating that it is a modified
|
||||
version after the original startup message.
|
||||
4. The orginal copyright startup message is not modified in any way.
|
||||
5. No additional restrictions are placed on the modified version, in particular
|
||||
full source must still be freely available and freely distributable.
|
||||
|
||||
Binaries compiled from this code may also be redistributed. Binaries
|
||||
compiled from modified versions of this code may also be redistributed provided
|
||||
this copying file is included intact and conditions 1 to 5 above are met.
|
||||
|
||||
This version may not be used for profit or in a commercial environment,
|
||||
this includes the development of software that requires a registration fee.
|
||||
If you wish to use Minixfs to develop anything other than free software or use
|
||||
it in a commercial environment then Minixfs must be registered for a small fee,
|
||||
please contact me for further details.
|
||||
|
||||
Distribution of this program with commercial packages is not allowed
|
||||
without my written permission, please contact me if you wish to do this,
|
||||
or indeed if you want a similar filesystem writing for a different purpose
|
||||
(e.g. TT Unix or Spectre), however I am not in a position to write filesystems
|
||||
for other commercial packages free of charge.
|
||||
|
||||
I reserve the right to modify these conditions at some future date.
|
||||
|
||||
Please note that although I believe each release to be stable and
|
||||
test it thoroughly I offer no guarantee. Therefore, THIS PROGRAM COMES
|
||||
WITH NO WARANTEE WHATSOEVER AND USE IS ENTIRELY AT YOUR OWN RISK, I WILL
|
||||
NOT BE LIABLE FOR ANY DAMAGE CAUSED DIRECTLY OR INDIRECTLY FROM ITS USE.
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
I can be contacted by email as shenson@nyx.cs.du.edu . Donations or snail
|
||||
mail should be sent to:
|
||||
|
||||
S N Henson.
|
||||
4 Monaco Place,
|
||||
Westlands,
|
||||
Newcastle,
|
||||
Staffordshire.
|
||||
ST5 2QT.
|
||||
ENGLAND.
|
||||
|
||||
Phone: (within UK) (0782) 662808
|
||||
(elsewhere) +44 782 662808
|
||||
@@ -0,0 +1,45 @@
|
||||
No this isn't a list of bugs, its a list of what to do when you send a bug
|
||||
report. I've included this because lots of bug reports I receive are incomplete
|
||||
and I have to email back asking for more information, and often receive no
|
||||
reply. It costs me real money to do this which is in very short supply.
|
||||
|
||||
Please use one of the following methods:
|
||||
|
||||
|
||||
1. Technical description of bug, basically where it is in the source and/or a
|
||||
fix.
|
||||
|
||||
|
||||
|
||||
2. As much information as possible about the bug. You should include:
|
||||
|
||||
a. Your hardware and hard disk driver software.
|
||||
b. Version of MiNT, Minixfs and TOS.
|
||||
c. As much information as you can about the bug. If I can't recreate the bug
|
||||
then there isn't much I can do to fix it. Basically some method (as simple
|
||||
as possible) to recreate the bug is best, also if fsck complains before
|
||||
or after the problem as well. All relevant alerts or debugging/trace info
|
||||
would help as well. Note also the output of minit with the '-t' flag should
|
||||
be sent to me as well; this helps enormously in tracing bugs.
|
||||
|
||||
|
||||
Please remember I have an STE and limited software, so if you say "When
|
||||
I run x.prg on a minix partition it crashes" and 'x.prg' is commercial software
|
||||
then I can't really do much to help. If 'x.prg' is free then I may be able to
|
||||
download it. Alternatively if you know how to recompile minixfs and you don't
|
||||
mind doing a few tests then I may be able to trace things that way. In any case
|
||||
you should be prepared to answer a few questions at least.
|
||||
|
||||
One more point. Using Minixfs with older versions of MiNT may make bugs
|
||||
appear which are caused by the MiNT kernel. Please use the latest version
|
||||
possible. Preferably at least 1.08 . Any bug reports using MiNT versions prior
|
||||
to 0.95 are untestable. The version of MiNT normally supplied with MultiTOS i.e.
|
||||
1.04 can be rather unstable when used with Minixfs due to MiNT bugs (if you
|
||||
try to change a disk with MiNT 1.04 is crashes horribly). A known MiNT 0.95 bug
|
||||
is that it loads filesystems twice ...
|
||||
|
||||
|
||||
Reports should be addressed to:
|
||||
shenson@nyx.cs.du.edu
|
||||
If you send it to Usenet then I may well miss it. In fact I may take a long
|
||||
time to reply anyway, so mailing the MiNT mailing list may be more productive.
|
||||
@@ -0,0 +1,3 @@
|
||||
This is another quick hack program. Useage if flist X: . This will print out
|
||||
all the inodes of open files on drive X: . You can then run fsck with the -i
|
||||
option to find out what the files are.
|
||||
@@ -0,0 +1,150 @@
|
||||
Fsck is a File System Consistency checKer. It checks Minixfs filesystems for
|
||||
consistency and optionally repairs them too. It is important that a Minixfs
|
||||
filesystem is checked for errors when, for example, the system crashes or a
|
||||
lock up forces a reboot when programs are using the filesystems. This will
|
||||
occasionally mean that fsck will perform minor repairs which will cause no
|
||||
damage at all. Using a damaged filesystems can result in much more serious
|
||||
damage occuring at a later date which require more destructive repairs to
|
||||
fix.
|
||||
|
||||
ADVICE ON USE OF FSCK
|
||||
|
||||
fsck cannot perform miracles; a severely damaged filesystem (such as if a lot
|
||||
of sectors get wiped somehow) may have very little salvageable. However, don't
|
||||
be overwhelmed by the options available. In practice only fsck -n or fsck on
|
||||
its own are used, the -p option is useful in shell scripts where non-interactive
|
||||
repair is needed, but you dont want any attempted destructive repair.
|
||||
|
||||
If fsck -n does produce what appear like a lot of serious errors then it might
|
||||
be an idea to attempt to backup the data before trying repairs; of course if
|
||||
you have a full backup (you do make regular backups don't you?) available it
|
||||
might be best to forget about repair altogether and just reinitialize the
|
||||
filesystem (with minit) and restore from backup.
|
||||
|
||||
USING FSCK
|
||||
|
||||
Fsck can be used in interactive or non-interactive mode. In interactive mode
|
||||
you are prompted before each fix. In non-interactive mode, repairs are carried
|
||||
out automatically or not at all. The option '-y' carries out all repairs that
|
||||
fsck would suggest, the '-p' (preen) option carries out all repairs if the
|
||||
Minixfs filesystems is only slighlty damaged and can be repaired without
|
||||
destroying data, the '-n' option only prints out the damage: it does not
|
||||
repair anything. The '-y' option is not recommended, unless you are sure it
|
||||
is what you want.
|
||||
|
||||
The options are followed by the drive letter of the partition you want to
|
||||
check for example,
|
||||
fsck -p D:
|
||||
|
||||
REPAIRS CARRIED OUT
|
||||
|
||||
In order to know precisely what repairs are carried out you must know a litle
|
||||
about the internal structure of a Minixfs filesystem. Each filesystem is
|
||||
divided into blocks or zones, these are always 1K in size.
|
||||
|
||||
Each directory/file/symbolic link has an inode associated with it. This is
|
||||
a small part of a disk sector which carries all information about a file
|
||||
except its name. It contains the file access modes (including what kind of
|
||||
entity the inode refers to) as well as it's size and a list of sectors where
|
||||
the file can be found. If this list is not large enough then an 'indirection
|
||||
block' which is a disk block containing a list of further blocks belonging to
|
||||
the file is used (and recorded in the inode). If this is not enough then a
|
||||
'double indirection block' is used containing a list of further indirection
|
||||
blocks. With this information, all the data in a file can be accessed.
|
||||
|
||||
A directory is basically identical to a file except it has a different mode
|
||||
number. The 'data' in this file is a list of 'entries' (or links) each entry
|
||||
contains a filename and an inode number where that name can be found. The root
|
||||
directory is always contained in inode 1. A field in the inode called it's
|
||||
'link count' gives a count of the number directory entries that refer to it.
|
||||
Every directory has two filenames '.' which refers to itself and '..' which
|
||||
refers to the parent directory. The only exception is the root directory where
|
||||
'..' refers to itself as well.
|
||||
|
||||
Each used inode/block is referenced in a bitmap. If the filesystem crashes
|
||||
before this can be written out to disk then it will be inaccurate. Fortunately
|
||||
fsck can rebuild the bitmaps from the data contained in inodes. This is what
|
||||
the prompts asking about bitmap repair mean. They are harmless and it is
|
||||
strongly advised that any bitmap repairs suggested are made.
|
||||
|
||||
If you use the filesystem and some used blocks do not have their bits set in
|
||||
the bitmap then other files can use them, overwriting the original data. These
|
||||
are called 'multiply allocated blocks'. fsck will give a list of these blocks
|
||||
and (optionally) allow you to decide which inode is the valid block. Usually
|
||||
the valid data is contained in the file with the latest modify time: the '-y'
|
||||
option removes all of the references. By finding the files the inodes
|
||||
refer to (e.g. with the -i option) you can look to see which file
|
||||
contains the valid data and then interactively remove the other references.
|
||||
The other files where the references are removed then have 'holes' in them,
|
||||
you may want to try to recover them or just delete them after 'fsck' has done
|
||||
its work. This is why it is important that the bitmaps are accurate and should
|
||||
be checked regularly.
|
||||
|
||||
This is the 'best case' scenario of multiply allocated blocks. If the block
|
||||
overwritten belongs to a directory then much more trouble is caused. After
|
||||
deleting the overwritten reference in a directory lots of inodes may no
|
||||
longer be referenced in a directory, these are called 'orphaned' inodes (they
|
||||
have no parent directory). fsck has no way of knowing their original names,
|
||||
but the data is recoverable. fsck makes entries for these inodes in a
|
||||
directory called lost+found . The name chosen is simply the inode number. You
|
||||
can then analyse the files/directories in lost+found and delete, rename or move
|
||||
them to where they were originally.
|
||||
|
||||
The worst case is if an indirection block is overwritten. This can cause lots
|
||||
of spurious messages about bad zone numbers and other multiply allocated blocks.
|
||||
fsck cannot currently help much under such circumstances: if a certain inode
|
||||
contains lots of multiple block number or bad zone numbers then it's best to
|
||||
delete all multiply allocated blocks in that inode; either with fsck or finding
|
||||
the inode on the disk and deleting the associated file.
|
||||
|
||||
Here is a summary of the possible repairs fsck performs:
|
||||
|
||||
1. Scan all inodes, allow deletion of multiply allocated blocks, inodes with
|
||||
bad modes, truncation of inodes which reference too many zones.
|
||||
|
||||
2. Scan all directories, check for valid names and the existance of '.' and
|
||||
'..' entries and allow fixing.
|
||||
|
||||
3. Check filesystem conectivity (that each inode has a directory entry) and
|
||||
allow repair of any problems and reconnection of orphaned inodes.
|
||||
|
||||
4. Check bitmaps and repair; check inode link counts and allow repair.
|
||||
|
||||
MISCELLANEOUS OPTIONS
|
||||
|
||||
If the root directory gets destroyed it must be handled separately because the
|
||||
lost+found directory will be killed also. If this is the case then the '-R'
|
||||
option will reform the root directory. Unfortunately the directory increment
|
||||
is determined from the root directory, so you must manually tell fsck the
|
||||
directory increment with the '-d' option followed by the increment. If you
|
||||
get this wrong then a large number of errors about directory entries will
|
||||
be erroneously reported.
|
||||
If for some reason the root inode is no longer a directory Minixfs
|
||||
may get confused and not recognise the filesystem anymore. By asking fsck to
|
||||
continue it will still check the root inode as though it were a directory: if
|
||||
it looks OK fsck allows you to make it a directory again. However you will
|
||||
have to reboot before the filesystem will be recognised by Minixfs again.
|
||||
|
||||
The '-i' option followed by a comma separated list of numbers will
|
||||
print out the pathnames of the corresponding inodes. E.g. fsck -i 1,2,3 D:
|
||||
This will print out *all* the possible names so e.g. fsck -i 1 d: may
|
||||
give something like:
|
||||
|
||||
\.
|
||||
\..
|
||||
\dir\..
|
||||
\dir2\..
|
||||
etc.
|
||||
|
||||
The '-z' option allows an inode to be zeroed if for example it is
|
||||
severely trashed and fixing would do more harm than good (e.g. if an
|
||||
indirection block has been overwritten). -z may be followed by a comma
|
||||
separated list of inodes to zero. NB use this option with extreme caution,
|
||||
the data the inode refers to will be effectively deleted (it will still be
|
||||
on the disk but no longer accessible directly). Using this option will also
|
||||
cause related "errors" to appear (though all can be fixed) such as inode
|
||||
and bitmap errors and links a free inode.
|
||||
|
||||
The '-e' option tries to find out the filesystem size by reading
|
||||
as far as it can through a partition: this is an experimental option and
|
||||
isn't too useful at present.
|
||||
@@ -0,0 +1,107 @@
|
||||
This version is mainly a collection of patches for minixfs pl10. Details are
|
||||
contained below. Many thanks to all concerned!
|
||||
|
||||
The only addition I have made is a -z option to fsck to clear troublesome
|
||||
inodes. See fsck.doc for more details.
|
||||
|
||||
**************************************
|
||||
|
||||
initial revision
|
||||
|
||||
**************************************
|
||||
|
||||
makefile fixes
|
||||
|
||||
**************************************
|
||||
|
||||
increase cache sizes
|
||||
|
||||
**************************************
|
||||
|
||||
From: inf03@Uni-Trier.de (Sascha Blank)
|
||||
Message-Id: <9409051059.AA07720@Uni-Trier.De>
|
||||
Subject: Better personae management for MiNT 1.11beta
|
||||
|
||||
use effective instead of real uid for access checking
|
||||
|
||||
**************************************
|
||||
|
||||
From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
Date: Mon, 17 Oct 94 10:46:00 +0100
|
||||
Message-Id: <9410170946.AA02849@issan.informatik.uni-dortmund.de>
|
||||
To: mint@atari.archive.umich.edu
|
||||
Subject: MinixFS: directory creation und symlinks
|
||||
|
||||
There are two other places where MinixFS uses the ruid instead of the
|
||||
euid, that is when it creates a directory or a symlink (although for
|
||||
the latter it does not matter). Also, the size of a symlink node is
|
||||
set to the length + 1, but Linux (and probably Minix too) expects it
|
||||
to be the length without the terminating null. And neither Linux nor
|
||||
Minix knows anything about drive specifiers, but MiNTlib always adds
|
||||
U: to an absolute path, making it difficult to, for example, extract
|
||||
the Linux root filesystem with its symlinks under MiNT. I have fixed
|
||||
this by always stripping the U: prefix on symlink creation and adding
|
||||
it back in readlink. This isn't fully backward compatible since
|
||||
before an absolute link target without drive has been interpreted
|
||||
relative to the current drive, but i don't thinks this is much of a
|
||||
problem. Another difference is that the link size reported by
|
||||
getxattr may be off by two, but MiNT always uses PATH_MAX when reading
|
||||
a link. If this creates a problem then getxattr will have to check if
|
||||
the symlink name starts with a slash and add two to the size in this
|
||||
case.
|
||||
|
||||
**************************************
|
||||
|
||||
From: Ulrich Kuehn <kuehn@GOEDEL.UNI-MUENSTER.DE>
|
||||
Message-Id: <9411021016.AA21609@math.uni-muenster.de>
|
||||
Subject: Re: Sync() and shutdown() system call
|
||||
|
||||
config.h, filesys.h, minixfs.c:
|
||||
use Sync() and Shutdown() system calls
|
||||
|
||||
**************************************
|
||||
|
||||
From: Juergen Lock <nox@jelal.north.de>
|
||||
Subject: Re: MinixFS 0.60 PL10 Patch Collection
|
||||
Message-Id: <9411122007.AA00358@jelal.north.de>
|
||||
|
||||
. fix bitmaps Kmalloc calculation for larger filesystems
|
||||
. a hack for fsck to check for sparse directories
|
||||
. clear bitmap dirty bits on `unmounts' (Dlock), you'll get warnings
|
||||
about bitmaps not written out after fsck runs sometimes, don't ask
|
||||
me why... as long as fsck found no errors you can ignore them
|
||||
. make sure symlinks always go in the same cache too
|
||||
|
||||
**************************************
|
||||
|
||||
From: Ulrich Kuehn <kuehn@GOEDEL.UNI-MUENSTER.DE>
|
||||
Message-Id: <9411180940.AA27680@math.uni-muenster.de>
|
||||
Subject: Re: sync patch for minixfs pl 10
|
||||
|
||||
don't run the update daemon if SYSUPDATE def'd
|
||||
|
||||
**************************************
|
||||
|
||||
From: scott@telle.dmi.stevens-tech.edu (Scott Kolodzieski)
|
||||
Message-Id: <9411250353.AA09142@telle.dmi.stevens-tech.edu>
|
||||
Subject: minor diff for minixfs pl10
|
||||
|
||||
really don't run the update daemon if MiNT >= 1.12
|
||||
|
||||
**************************************
|
||||
|
||||
From: woodford@esca.com (Steven Woodford)
|
||||
Message-Id: <9411290411.AA05910@flash.esca.com>
|
||||
Subject: One more patch for MinixFs PL10
|
||||
|
||||
don't delete "." or ".." even if dir increment > 1
|
||||
|
||||
**************************************
|
||||
|
||||
From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||
Message-Id: <9412160954.AA28843@issan.informatik.uni-dortmund.de>
|
||||
Subject: MinixFS: completed support for V2 filesystem
|
||||
|
||||
add support for v2 triple indirection blocks
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,18 @@
|
||||
The utility mfsconf is a very simple utility to set the filename translation
|
||||
modes for a given device, or to inquire what they are.
|
||||
|
||||
To determine the file translation modes for a given drive (X: say) type:
|
||||
mfsconf X:
|
||||
The output is self explanatory.
|
||||
|
||||
To set the modes the options -d -s -x or -c are used for directory search
|
||||
execute or creation translation. The letter is followed by one of the
|
||||
letters n, a, t or m for neither, all TOS or MiNT scopes respectively finally
|
||||
the drive is specified.
|
||||
|
||||
E.g.
|
||||
|
||||
mfsconf -d n -s a X:
|
||||
sets directory translation to none and search translation to all on drive X:
|
||||
All other modes remain the same.
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
This file is designed as an introduction to minixfs. What it is, what it does
|
||||
and why you might want to use it.
|
||||
|
||||
Minixfs is an alternative filesystem which runs under MiNT. It can
|
||||
replace the standard TOS MS-DOS like filesystem which is standard on the ST.
|
||||
So why would you want to replace the standard TOS filesystem? Here are some
|
||||
of the arguments for and against minixfs:
|
||||
|
||||
For:
|
||||
|
||||
1. Filenames are no longer limited to 8 characters with an optional 3
|
||||
character extension, the standard filesystem supports mixed case 14 character
|
||||
filenames. Alternative filesystems support 30 or even 62 character filenames.
|
||||
|
||||
2. The filesystem is much more U*ix like, supporting the standard user/group
|
||||
ids, 3 access times (well for the V2 filesystem anyway) and so on. If you're
|
||||
used to Un*x like filesystems then this will certainly make you feel at home!
|
||||
Symbolic and hard links are supported too as are sparse files and the root
|
||||
directory can never fill up.
|
||||
|
||||
3. The filesystem is compatible with that used by Minix as might be guessed
|
||||
from its name. If you use Minix then using minixfs under MiNT will allow the
|
||||
minix partitions to be accessible under TOS, in fact they can be set up to
|
||||
appear almost indistinguishable from TOS partitions.
|
||||
|
||||
4. Because it uses an indirection block Un*x like filesystem it tends to be
|
||||
somewhat more robust than TOS filesystems.
|
||||
|
||||
5. Full source is available, as am I. You find a bug, tell me and I'll fix it.
|
||||
|
||||
6. It is possible to make *huge* partitions, theoretically the limit is 4096Gb
|
||||
if your hardware and software can take it (and I don't know anything that
|
||||
can!). This is achieved *without* increasing the sector size, unlike the
|
||||
standard TOS filesystems.
|
||||
|
||||
7. It is quite a bit quicker than TOS filesystems. If you don't use
|
||||
write-caching disk software then the speedup using turbo mode is considerable.
|
||||
Even if you do use write-caching software (e.g. ICD) the speedup is still
|
||||
useable.
|
||||
|
||||
Against:
|
||||
|
||||
1. Programs which depend upon the filesystem format (defraggers consistency
|
||||
checkers etc) will not work. I have written a consistency checker for Minixfs
|
||||
however, which is supplied. A port of the Linux defragger is also available.
|
||||
|
||||
2. Non MiNT aware programs will not be able to access longer filenames and
|
||||
some non conforming MiNT aware programs wont either. You can still use the
|
||||
translated TOS compatible names though.
|
||||
|
||||
3. Minixfs is not officially supported by Atari. At least they've never told
|
||||
me if it is. This has several consequences and some of the more cynical may
|
||||
consider this should be put in the 'for' group :-)
|
||||
|
||||
4. Huge partitions have a few caveats, mainly due to buggy driver software.
|
||||
Although work arounds exist. Roughly speaking this works in spite of the
|
||||
driver software rather than because of it :-)
|
||||
|
||||
In spite of the above 'againsts' I regard minixfs as a very powerful
|
||||
and useful addition to the ST (then again I would wouldn't I?). For programmers
|
||||
it is very useful indeed particularly if you are porting from Un*x, many of
|
||||
the standard kludges to make filenames fit are no longer necessary nor are
|
||||
some of the tricks to keep TOS happy (like not unlinking an open file).
|
||||
|
||||
If you haven't decided not to try Minixfs by now then you'll want to
|
||||
know more information. If you're unsure you can always experiment with Minixfs
|
||||
filesystems on floppy disks first before comitting your hard disk.
|
||||
The remaining files in this directory give information about minixfs
|
||||
itself and the various tools for creating and fixing minixfs partitions.
|
||||
@@ -0,0 +1,181 @@
|
||||
The program 'minit' creates minixfs filesystems. Then can be created on a
|
||||
TOS formatted disk or a TOS filesystem, then can also be created to alter
|
||||
the parameters of an already existing minixfs partition.
|
||||
|
||||
WARNING: USING MINIT TO CREATE FILESYSTEMS WILL IRRETRIEVABLY WIPE ALL DATA
|
||||
ON THAT PARTITION. This includes using it to create a filesystem 'on top' of
|
||||
an already existing one. Don't say I didn't warn you.
|
||||
|
||||
FILESYSTEM VERSIONS.
|
||||
Before you decide to make a filesystem you must decide which kind of filesystem
|
||||
you want to make. There are two kinds at present V1 and V2. These are
|
||||
compatible with the equivalent Minix filesystems. V1 filesystems are the
|
||||
standard Minix filesystems used with all versions of Minix, they do have a
|
||||
number of shortcomings, there is only one kind of file access time and V1
|
||||
filesystems can be at most 64Mb in size. V2 filesystems are newer and are
|
||||
the same as the V2 filesystems used by Minix 1.6xx (and presumably higher).
|
||||
They have three access times and can be any size (if you hard disk software
|
||||
will support it). I would strongly advise the use of V2 filesystems.
|
||||
|
||||
If you supply the -V option to minit you will make a V2 filesystem,
|
||||
otherwise it will be V1.
|
||||
|
||||
DIRECTORY INCREMENT
|
||||
|
||||
It doesn't quite end there though. There are a couple more parameters
|
||||
you should know about. Under Minix itself you can have filenames of at most
|
||||
14 characters in length. Minixfs uses this value by default. However there is
|
||||
a parameter called 'directory increment' which allows you to use longer
|
||||
filenames. This parameter must be a power of two between 1 and 8 (inclusive)
|
||||
in other words it can be 1,2,4 or 8. The maximum filename size is given by
|
||||
the formula maxlength= increment*16 - 2. Thus increments of 1,2,4,8 will
|
||||
result in maximum filename lengths of 14,30,62 and 126 respectively. However
|
||||
be advised that every filename whatever length occupies this space, so if you
|
||||
set the increment to 8 then a filename of length 1 will still use up the same
|
||||
space in a directory as a filename of length 126. Setting this too high will
|
||||
slow down directory operations somewhat. 2 is a reasonable value for this
|
||||
parameter. NB If you use Minix itself then only the default increment (1) is
|
||||
accessible to Minix; other values will seriously confuse Minix, so if you want
|
||||
partitions to be accessible to Minix use increment 1 (the default).
|
||||
|
||||
The -n option allows you to set the directory increment, follow it by
|
||||
the increment you want. If this option is not present then a value of one is
|
||||
assumed.
|
||||
|
||||
PROTECTION
|
||||
|
||||
A couple of options deal with 'protection'. This is a somewhat tricky
|
||||
subject. Basically protection is a method I use to prevent TOS from writing
|
||||
to a Minixfs partition when MiNT is not running, if TOS did then the partition
|
||||
would be damaged (possibly irreparably). If you will always use MiNT and
|
||||
Minixfs, or you are absolutely certain you will never write to a Minixfs
|
||||
partition without MiNT/Minixfs running then feel free to use no protection at
|
||||
all.
|
||||
|
||||
However this is rather unlikely so you usually will need some form of
|
||||
protection. There are currently two methods. Null Disk and other partition ID.
|
||||
|
||||
A Null disk makes TOS think it's root directory is full so it
|
||||
can't write to a filesystem because it can't create any files.
|
||||
|
||||
If Null disk doesn't work then you can try an alternate partition ID.
|
||||
This only works if you have software with an XHDI version of 1.10 or higher,
|
||||
if you use the '-t' option to minit you can find out your XHDI version (if any).
|
||||
The partition ID is a three character identifier for the partition type. TOS
|
||||
uses GEM and BGM for its filesystems; you can use other types to ensure TOS
|
||||
will never access the partition and Minixfs can. There are quite a few problems
|
||||
though. Not all hard disk software allows the partition ID to be edited. Also
|
||||
Minixfs can only automatically access other partitions with XHDI compliant
|
||||
software (see the information provided by the '-t' option).
|
||||
|
||||
If you have XHDI compliant software and you can edit the partition ID
|
||||
then you can use the ID MIX for Minixfs (you can also use RAW, but I wouldn't
|
||||
advise it). After altering the ID, reboot and use minit as normal and all should
|
||||
be OK.
|
||||
|
||||
OTHER OPTIONS
|
||||
|
||||
Normally minit tries to find out the size of a partition by itself,
|
||||
this can sometimes fail. If it does then you must enter the partition size
|
||||
(in K) manually with the -b option.
|
||||
|
||||
Inodes are part of the filesystem. Every file/directory/symbolic link
|
||||
on the filesystem uses precisely one inode. If you run out of inodes then you
|
||||
can't create any more files/directories/symbolic links without first deleting
|
||||
some already there. The default number of inodes is a third the partition size
|
||||
in K. If you want to create more then use the '-i' option followed by the number
|
||||
you want. You can have at most 65535 inodes on a filesystem. The default will
|
||||
almost always suffice, but you can increase this if you will need more.
|
||||
|
||||
The -S option writes out part of the filesystem called the 'super
|
||||
block' only. If you accidentally wipe out the start of a partition then this
|
||||
option may allow some data to be salvaged. If the start of a partition is
|
||||
wiped out then the partition may not be even recognised as minix, so the -S
|
||||
option can help under these rare circumstances. Note: you must use exactly the
|
||||
same pararmeters you used to create the fileystem in the first place.
|
||||
|
||||
The -t option is a test option. It does almost everything needed to
|
||||
create a filesystem without writing anything. It also gives a status report
|
||||
of any options (e.g. XHDI support) the driver software may have. Use of '-t'
|
||||
is recommended before actually creating the partition; it wont harm anything.
|
||||
|
||||
HUGE PARTITIONS
|
||||
A *huge* partition is a partition where the logical sector size is
|
||||
bigger than 1K. In practice this means bigger than 64Mb (or 32Mb with some
|
||||
partitioning software). Unlike TOS filesystems when you create a Minixfs
|
||||
filesystem bigger than 64Mb the filesystem is still accessed in 1K blocks.
|
||||
In this sense if you create a 1 byte file when the logical sector size is
|
||||
e.g. 4K you use up 1K of the disk not the 8K (2 sectors) TOS filesystems
|
||||
would use.
|
||||
|
||||
If the partition you are creating is huge then you may have some
|
||||
problems. This is basically down to bugs and inconsistencies in driver
|
||||
software. I've tried to work around these as much as possible, but I can't
|
||||
guarantee anything. The rules are explained below, which should help if you
|
||||
want to create such a partition and minit complains. Generally minit will
|
||||
complain if it can't find a work around for your software.
|
||||
|
||||
If the drive letter is A-P (inclusive) you should always be OK. If
|
||||
you are using software which conforms to XHDI then you should also have no
|
||||
problems (and you might want to set the partition ID to MIX as well). If
|
||||
neither is the case then you may need to either obtain XHDI compatible disk
|
||||
software or repartition/reorder (set the ID's so the large partition is on
|
||||
the first hard drive) to make the large partition drive A-P.
|
||||
|
||||
The A-P restriction may be fixed in future versions of Minixfs if there
|
||||
is any demand (however it is rather tricky to do).
|
||||
|
||||
RECREATING A TOS PARTITION
|
||||
|
||||
If you decide you want to turn a Minixfs partition back into a normal
|
||||
TOS partition then you can use the '-r' option. This will recreate a blank
|
||||
TOS filesystem on the partition selected. Certain hard disk software may not
|
||||
recognise the new filesystem, so always reboot after you use this option.
|
||||
|
||||
Note: This option only works at present if you created the filesystem with
|
||||
a newer version of minit. If there is any demand I may add an option for it
|
||||
to work if the filesystem is older, by 'improvising' a bit.
|
||||
|
||||
Some hard disk software (e.g. ICD) and disk tools have an option to
|
||||
rebuild a single partition without disturbing the others. If you have such
|
||||
sofware then please use as opposed to the '-r' option. Such software will
|
||||
probably work under all circumstances (e.g. filesystems made with older minit
|
||||
versions). The primary reason I added the '-r' option was to allow people
|
||||
without partition rebuilding software to be saved the effort of reformatting
|
||||
or repartitioning their hard disks to get a TOS filesystem back.
|
||||
|
||||
USING MINIT
|
||||
|
||||
After all the options must come a drive letter (either case) followed
|
||||
by a colon. You will then be given a warning, if you type 'y' or 'Y' then the
|
||||
process continues, otherwise it is aborted. If you are running Minixfs/MiNT
|
||||
the partition should be instantly recognisable. To check try using 'mfsconf'
|
||||
and you should get some status info about translation modes (see minixfs.doc).
|
||||
If you get the message 'drive X: is not minix' then there may be a problem.
|
||||
Try rebooting, if that doesn't work try recreating a TOS partition (there
|
||||
should be an option in you hard disk driver sofware to do this) and using
|
||||
minit without any protection options. If this still fails then your system
|
||||
hard disk driver software currently cannot use Minixfs partitions. Send me
|
||||
a report (see the file 'bugs.doc') and I'll see what I can do.
|
||||
|
||||
WARNING: you should not make the partition you boot from or the partition that
|
||||
you load MiNT and minix.xfs a Minixfs partition. This is because TOS cannot boot
|
||||
a Minixfs partition or run MiNT/minix.xfs from a Minixfs partition.
|
||||
|
||||
EXAMPLES
|
||||
|
||||
Create a minixfs filesystem on drive A:
|
||||
|
||||
minit A:
|
||||
|
||||
Create a V2 filesystem on E:
|
||||
|
||||
minit -V E:
|
||||
|
||||
Create a V2 filesystem with increment 2 and null disk protection on drive D:
|
||||
|
||||
minit -V -d 2 -P D:
|
||||
|
||||
Test the disk driver software used to access drive F:
|
||||
|
||||
minit -t F:
|
||||
@@ -0,0 +1,59 @@
|
||||
MINIX.XFS is the minix filesystem driver. To use it copy MINIX.XFS to
|
||||
the root directory of whichever partition you start MiNT from. Reboot and
|
||||
you should get the startup Minixfs message. Any Minixfs partitions should then
|
||||
be immediately accessible.
|
||||
|
||||
If you don't use MultiTOS then you should also copy nohog.acc into your
|
||||
root directory (or wherever you load accessories from).
|
||||
|
||||
There isn't a great deal more to say about it from a normal users point
|
||||
of view. The only thing which can potentially cause trouble is filename
|
||||
translation.
|
||||
|
||||
The system calls specific to Minixfs are described in syscall.doc.
|
||||
These are only likely to interest programmers.
|
||||
|
||||
FILENAME TRANSLATION
|
||||
|
||||
Some programs cannot cope properly with mixed case filenames. In
|
||||
general a program which is not MiNT aware (and some which are) will only
|
||||
receive 13 chacacters of a filename. This is not the fault of Minixfs, in
|
||||
pre-MiNT days there was simply no way to pass more characters to a program.
|
||||
Some quite common (!) programs have problems, for example the desktop and
|
||||
the standard file selector. As a result Minixfs has the option to translate
|
||||
filenames to the standard TOS form, that is 8 characters with 3 character
|
||||
extension and upper case (this will be referred to as 8+3 format).
|
||||
|
||||
Naturally this translation is not ideal and some conflicts may occur.
|
||||
The normal translation rule is to make the filename upper case and to retain
|
||||
the original extension. For example FooBARFilename.C becomes FOOBARFI.C. The
|
||||
basename and extension are cut back to 8 and 3 characters respectively as
|
||||
would be expected. Periods are replaced by commas in all but the extension.
|
||||
|
||||
There are four cases where translation can occur and 4 'scopes'. The
|
||||
scope determines when a program should receive translation. The scopes are
|
||||
all, MiNT domain, TOS domain and neither. Usually a program that understands
|
||||
MiNT will run in MiNT domain; otherwise it will run in TOS domain. Clearly the
|
||||
'neither' scope means translation will never occur for that case and 'all'
|
||||
means it will always occur.
|
||||
|
||||
The 'cases' are search, directory, creation and executability.
|
||||
When you attempt to access a file, 'search' is used. For example if the scope
|
||||
means translations occurs for a specific program then if the file
|
||||
FooBARFilename.C exists then it can be accessed as FOOBARFI.C. When a directory
|
||||
is listed 'directory' translation is used, thus FooBARFilename.C will appear
|
||||
as FOOBARFI.C on e.g. the desktop.
|
||||
|
||||
Creation is slightly different. This simply translates all filenames
|
||||
created to lower case. So a TOS program creating FOOBARFI.C will actually
|
||||
create foobarf.c . This can be useful for certain programs which translate
|
||||
filenames to upper case.
|
||||
|
||||
Executability refers to creating files as well, if a file is created
|
||||
with the extensions ttp,gtp,tos,prg (either or mixed case) then the 'x' bit
|
||||
in the filename is set automatically. This makes sure executable programs
|
||||
stay executable. This is useful for utilities that copy files but are not
|
||||
aware of MiNT's extensions.
|
||||
|
||||
You can set the translation modes to different values for different
|
||||
partitions, using the utility 'mfsconf'.
|
||||
@@ -0,0 +1,44 @@
|
||||
Welcome to Minixfs! If you are attemting to use Minixfs for the first time
|
||||
then I would advise you read all the docs in this directory (except
|
||||
syscall.doc). Otherwise you can just read latest.doc for features added to
|
||||
the latest version and any bugfixes etc. (for more detailed info read the
|
||||
'changes' file in the source distribution).
|
||||
|
||||
Here is a summary of the contents of the document files:
|
||||
|
||||
copying Conditions of use.
|
||||
|
||||
address.doc Contact addresses.
|
||||
|
||||
mfsdoc.doc introduction to Minixfs and why you may or may not want to
|
||||
use it.
|
||||
|
||||
minit.doc How to use 'minit' to create a Minixfs partition.
|
||||
|
||||
minixfs.doc How to install Minixfs and about filename translation.
|
||||
|
||||
flist.doc Description of flist utility.
|
||||
|
||||
csize.doc Cache resizing utility.
|
||||
|
||||
fsck.doc How to use fsck to fix filesystems and a bit of backround
|
||||
as to their structure.
|
||||
|
||||
mfsconf.doc How to use mfsconf to set the filesystem translation modes.
|
||||
|
||||
mount.doc How to use the mount program.
|
||||
|
||||
bugs.doc How to submit a bug report.
|
||||
|
||||
syscall.doc Minixfs specific system calls and special features of standard
|
||||
system calls. Only really of interest to programmers.
|
||||
|
||||
latest.doc Bugfixes and/or features of this version.
|
||||
|
||||
NB Read the file bugs.doc before submitting a bug report. I don't have access
|
||||
to your system so all I know about it is what you tell me, this file tells you
|
||||
the kind of information I need to have a reasonable chance of fixing a problem.
|
||||
I waste a great deal of time and money simply asking people to give me the
|
||||
proper information after an initial report saying "Minixfs doesn't work" or
|
||||
a nasty post to Usenet. In future I'll ingnore such reports, if you can't be
|
||||
bothered to read the docs then I can't be bothered to help.
|
||||
@@ -0,0 +1,212 @@
|
||||
This file describes some of the syscalls and some special aspects of the
|
||||
standard syscalls.
|
||||
|
||||
STAT (Fxattr)
|
||||
|
||||
Almost all the fields are relevant and not 'faked' unlike most of the
|
||||
standard filesystems. There are a couple of minor exceptions. For V1
|
||||
filesystems atime/adate and ctime/cdate fields are faked, they are
|
||||
the same as mtime/mdate; these are not faked for V2 filesystems. The
|
||||
nblocks field is faked by just assuming the file is continuous, this
|
||||
will usually be correct; if the file is sparse however this will be
|
||||
too high.
|
||||
|
||||
The 'dev' field is the drive with the standard form 0=A,1=B etc. The
|
||||
field 'index' is the inode number, this is again valid: if two files
|
||||
or file descriptors have the same inode and device numbers then they
|
||||
are the same file, otherwise they are different.
|
||||
|
||||
If there are character or block special files on the device then the
|
||||
field 'rdev' gets filled in appropriately.
|
||||
|
||||
DOPENDIR (DREADIR)
|
||||
|
||||
In normal mode you never get translated filenames, in addition the
|
||||
long field is the inode number.
|
||||
|
||||
RENAME
|
||||
|
||||
You can 'move' directories with this call, as would be expected for
|
||||
a U*ix like filesystem. This naturally moves all the contents of that
|
||||
subtree as well. This call will not allow a directory to be moved inside
|
||||
itself, as this would damage the filesystem (and is illegal anyway).
|
||||
|
||||
FDATIME
|
||||
|
||||
This is made fairly close to 'utimes', basically setting both atime/mtime
|
||||
to the value specified and ctime to the current time. It can't change the
|
||||
times for directories because MiNT blocks opening directories.
|
||||
|
||||
FATTR
|
||||
|
||||
This is largely faked, the fields aren't really valid for U*ix like
|
||||
filesystems. Only the DIR/RDONLY bits have any meaning, and RDONLY
|
||||
can be set as well.
|
||||
|
||||
VOLUME NAMES
|
||||
|
||||
Basically these don't exist. I suppose I could add support in some way if
|
||||
there was any demand.
|
||||
|
||||
LINK/SYMLINK
|
||||
|
||||
As would be expected these are perfectly valid. LINK does not allow hard links
|
||||
to directories, even by superuser basically because there is no real need since
|
||||
symbolic links can do this and there would be no way to remove them.
|
||||
|
||||
UNLINK
|
||||
|
||||
Unlink behaves in a U*ix like manner with regard to open files. Basically you
|
||||
can unlink() an open file and let all processes with it open read/write as
|
||||
normal. When all processes close() the file (or exit which closes anyway) the
|
||||
space used by the file is freed up.
|
||||
|
||||
You can *not* unlink directories, this would be too risky and isn't needed
|
||||
anyway.
|
||||
|
||||
FSEEK
|
||||
|
||||
Minixfs allows the creation of sparse files in the usual way (seek past EOF and
|
||||
write).
|
||||
|
||||
DCNTL CALLS
|
||||
|
||||
The Dcntl syscall has several options for minixfs filesystems. The 'standard'
|
||||
calls FUTIME (set inode times) and FTRUNCATE (truncate file) exist as do their
|
||||
Fcntl (ioctl) equivalents. However also inluded are several Minixfs specific
|
||||
calls.
|
||||
|
||||
Opcode 0x100 MFS_VALID
|
||||
|
||||
This interprets the value of the additional argument as a long pointer, and
|
||||
is stores the value MFS_MAGIC there. This is intended so that the path passed
|
||||
to Dcntl can verified as being on a minixfs filesystem. MFS_MAGIC has the
|
||||
value 0x1870431. Because of the possibility of other filesystems using the
|
||||
same numbers for Dcntl functions with different purposes (though none do as
|
||||
far as I know) MFS_VALID should always be called before using the other Minixfs
|
||||
specific opcodes and MFS_MAGIC checked.
|
||||
|
||||
Opcode 0x101 MFS_SYNC
|
||||
|
||||
Synchronise *all* filesystems, basically write out internal buffers to disk.
|
||||
Currently the filesystem internally sync()'s as well at various points, so
|
||||
this call is not at present necessary before rebooting the system.
|
||||
|
||||
Opcode 0x102 MFS_CINVALID
|
||||
|
||||
Invalidate all cache entries for a given drive. This is used mainly internally.
|
||||
|
||||
Opcode 0x103 MFS_FINVALID
|
||||
|
||||
Invalidate all file descriptors on the given drive.
|
||||
|
||||
Opcode 0x104 MFS_INFO
|
||||
|
||||
This call basically returns some info about the Minixfs filesystem on which
|
||||
the path resides. It interprets the value of the additional parameter as a
|
||||
pointer to an mfs_info structure. This structure has the following form:
|
||||
|
||||
long total_inodes,total_zones;
|
||||
long free_inodes,free_zones;
|
||||
short version;
|
||||
short incr;
|
||||
long res1,res2,res3,res4;
|
||||
|
||||
(long=32 bits, short=16bits).
|
||||
|
||||
total_inodes and total_zones return the total number of inodes and zones
|
||||
for the filesystem. Similarly free_inodes and free_zones show how many are
|
||||
unused. A 'zone' is always 1K. version is 1 for V1 filesystems and 2 for
|
||||
V2. incr is the directory increment. You can use this to determine the
|
||||
maximum filename size with the formula incr*16-2. The MiNT syscall Dconf
|
||||
can also be used for this purpose (see MiNT docs).
|
||||
|
||||
Opcode 0x106 MFS_IMODE
|
||||
|
||||
The extra paramater is interpreted as a long int. Its value is used to set
|
||||
the mode of *all* the bits of the file pathname points to. Including the
|
||||
type fields, thus you can change directories to files, and vice-versa.
|
||||
This is again root only. Extreme caution is needed with this syscall: it
|
||||
can do a lot of damage.
|
||||
|
||||
Opcode 0x107 MFS_GTRANS
|
||||
Opcode 0x108 MFS_STRANS
|
||||
|
||||
This call gets and sets the translation modes for this device. Only the
|
||||
superuser can do this. The extra parameter is interpreted as a long
|
||||
pointer. The scope corresponds to the following values.
|
||||
|
||||
#define NONE 0
|
||||
#define TOS 1
|
||||
#define MINT 2
|
||||
#define ALL 3
|
||||
|
||||
The 'type' is contained in groups of two bits. Bits 0-1 correspond to
|
||||
search translation, bits 2-3 are directory translation, bits 4-5 are for
|
||||
creation translation and bits 6-7 are for execute translation. All other
|
||||
bits are currently ignored and should be set to zero.
|
||||
|
||||
Opcode 0x10a MFS_IADDR
|
||||
|
||||
The argument is a long pointer which will have the start address of Minixfs
|
||||
placed in it. If Minixfs has crashed then using this address along with the
|
||||
symbol table (or a suitable debugger) allows the precise point of the crash
|
||||
to be determined.
|
||||
|
||||
Opcode 0x10b MFS_UPDATE
|
||||
|
||||
This controls the update daemon. If no daemon is running (e.g. not Turbo mode)
|
||||
then this function returns -1. Otherwise the argument is a long which is
|
||||
interpreted as follows.
|
||||
|
||||
0x0: Return 1 if daemon suspended, 0 if running.
|
||||
0x1: Suspend execution of the daemon.
|
||||
0x2: Resume execution of daemon.
|
||||
0x3: Return the process id (pid) of the daemon (returns -1 if daemon not used)
|
||||
|
||||
Opcode 0x10c MFS_MOUNT
|
||||
|
||||
This is a bit experimental at present. It is used to mount one Minixfs
|
||||
filesystem on another and may go away some day if the kernel implements
|
||||
this (which is where it should really be). 'arg' is a pointer to the
|
||||
following structure:
|
||||
|
||||
unsigned int dev;
|
||||
long flags;
|
||||
long reserved[4];
|
||||
|
||||
dev is the device to mount (the path to Dcntl gives the path to mount on).
|
||||
flags is unused at present and should be set to zero. The reserved fields
|
||||
are also unused at present. The Dcntl path must be a directory other than
|
||||
the root directory. The filesystem of device 'dev' must not have any filesytems
|
||||
mounted on it already.
|
||||
|
||||
Opcode 0x10d MFS_UMOUNT
|
||||
|
||||
The filesystem the Dcntl path is on is umounted.
|
||||
|
||||
Opcode 0x10e MFS_LOPEN
|
||||
|
||||
arg points to the following structure:
|
||||
|
||||
long limit;
|
||||
unsigned int ilist[SIZE];
|
||||
|
||||
The field 'limit' should be set to the value of SIZE (the size of the ilist
|
||||
array). After this call the inode numbers of all open files on the Dcntl path
|
||||
filesystem are entered into the ilist array, followed by a zero terminator.
|
||||
If there isn't enough room in the array, it is truncated and ERANGE returned.
|
||||
|
||||
Opcode 0x10f MFS_MKNOD
|
||||
|
||||
arg is a long. The low word is a mode parameter which is the full mode of
|
||||
a character or block special file mode. The high word is the major/minor
|
||||
device numbers of the file. The Dcntl path is the path to create.
|
||||
|
||||
NOTE ON FILENAME TRANSLATION
|
||||
|
||||
Using minixfs filesystems you should always use the Dopendir etc. MiNT calls
|
||||
in normal mode. This way you never get translated filenames. You can use the
|
||||
Dconf or the MFS_INFO Dcntl syscalls to get the maximum filename length (if
|
||||
needed).
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
mkfatfs, filesystem tool
|
||||
========================
|
||||
|
||||
Here is the first public release of mkfatfs, a filesystem creation tool.
|
||||
Main reason for this programm is to build TOS and DOS FAT32 partitions also
|
||||
on ATARI computers.
|
||||
|
||||
Sorry, it's a commandline tool. Contact me if you will write
|
||||
a graphical user interface.
|
||||
|
||||
|
||||
Ok, what is FAT32 you ask now?
|
||||
|
||||
FAT32 is a extension of the existing FAT definition. The FAT (File
|
||||
Allocation Table) on existing partitions is 16 bit wide.
|
||||
This limits the maximum number of cluster to 65536 (under TOS
|
||||
to 32768 because of some bugs). So if you need large partitions
|
||||
you must increase cluster size. But this has a negative side effect.
|
||||
Large cluster also increase
|
||||
|
||||
It requires a harddiskdriver that support at least XHDI level 1.10.
|
||||
|
||||
If you start mkfatfs without any parameter, you get the
|
||||
following output:
|
||||
------------------------------------------------------------------------------
|
||||
./mkfatfs 0.2b, 1998-08-01 for TOS and DOS FAT/FAT32-FS
|
||||
Found XHDI level 1.30.
|
||||
|
||||
No drive specified.
|
||||
|
||||
Usage: ./mkfatfs [OPTIONS] drv:
|
||||
-c Check filesystem as is gets built
|
||||
-f <num> Number of FATs (between 1 and 4)
|
||||
-F <num> FAT size (12, 16, or 32)
|
||||
-i <id> Volume ID as hexadecimal number (i.e. 0x0410)
|
||||
-l <filename> Bad block filename
|
||||
-m <filename> Boot message filename--text is used as a boot message
|
||||
-n <name> Volume name
|
||||
-r <num> Root directory entries (not applicable to FAT32)
|
||||
-s <num> Sectors per cluster (2, 4, 8, 16, 32, 64, or 128)
|
||||
-a Create filesystem always (disables partition ID checking)
|
||||
------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,36 @@
|
||||
All files in this archive are Copyright (c) 1993-95 Kay Roemer.
|
||||
Exceptions are explicitely stated.
|
||||
|
||||
I cannot take over any responsibility for any files in this distribution.
|
||||
Therefore the following disclaimer:
|
||||
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
You are welcome to use, copy, distribute and modify the source code
|
||||
included in this package for noncommercial purposes as long as the
|
||||
following conditions are met:
|
||||
|
||||
o All the files are kept in the distribution.
|
||||
|
||||
o Any modifications on files in the distribution are clearly
|
||||
marked as such, including a statement that the original author
|
||||
is not responsible for your modifications and possible damage
|
||||
resulting in your modifications.
|
||||
|
||||
o You may not sell this package or parts of it for more than
|
||||
double the cost of copying the files onto media, including
|
||||
the cost of the media, excluding local taxes.
|
||||
|
||||
Usage of MintNet or parts of it as part of commercial products requires a
|
||||
written licence from Kay Roemer.
|
||||
|
||||
You have agreed with the above conditions when holding copies of the
|
||||
distribution in your posession.
|
||||
@@ -0,0 +1,50 @@
|
||||
SLINKCTL.TTP
|
||||
------------
|
||||
SLINKCTL is a command-line program for controlling SCSILINK.XIF. It
|
||||
retrieves statistics, clears statistics, and/or resets the device. The
|
||||
statistics are intended to help in problem determination, so will not be
|
||||
very meaningful to the end user; however, if you have a problem, we may
|
||||
ask you to run it and send the results to Anodyne Software. SLINKCTL
|
||||
has the following syntax:
|
||||
|
||||
slinkctl [-c] [-r] [-tN] <interface>
|
||||
|
||||
By default (i.e. with no optional parameters) it reports internal statistics
|
||||
including the trace for the interface named <interface>. If one or more
|
||||
of the options is set, the appropriate actions are carried out but no
|
||||
report is created.
|
||||
|
||||
Available options:
|
||||
-c clears the statistics counters
|
||||
-r resets the interface (useful if it seems to be hung)
|
||||
-tN sets the number of entries in the trace table to N; N must
|
||||
be between 0 & 10000 inclusive. NOTE: the trace table is
|
||||
mostly for use during development, and is not likely to
|
||||
mean much to the casual user. It's recommended that you
|
||||
leave the number of entries at zero (the default).
|
||||
|
||||
Output is to stdout.
|
||||
|
||||
Examples:
|
||||
slinkctl.ttp en0
|
||||
writes the statistics for port 'en0' to stdout
|
||||
slinkctl.ttp -c en0
|
||||
clears the statistics for port 'en0'
|
||||
slinkctl.ttp -r en1
|
||||
resets the SCSI/Link device at port 'en1'
|
||||
|
||||
|
||||
REVISION HISTORY
|
||||
================
|
||||
Version
|
||||
-------
|
||||
0.50 First public beta release
|
||||
|
||||
0.60 . SLINKCTL now displays the MAC address of the device
|
||||
. SLINKCTL now only writes to stdout (you may of course use
|
||||
the shell to redirect output to a file)
|
||||
|
||||
|
||||
Roger Burrows
|
||||
Anodyne Software
|
||||
20/November/2007
|
||||
@@ -0,0 +1,53 @@
|
||||
All files in this archive are Copyright (c) 1993, 1994 by Ulrich Kuehn.
|
||||
Exceptions are explicitely stated.
|
||||
|
||||
I cannot take over any responsibility for any files in this distribution.
|
||||
Therefore the following disclaimer:
|
||||
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
You are welcome to use, copy, distribute and modify the source code
|
||||
included in this package as long as the following conditions are met:
|
||||
|
||||
o All the files are kept in the distribution.
|
||||
|
||||
o Any modifications on files in the distribution are clearly
|
||||
marked as such, including a statement that the original author
|
||||
is not responsible for your modifications and possible damage
|
||||
resulting in your modifications.
|
||||
|
||||
o You may not sell this package for more than the cost of copying
|
||||
the files onto media, including the cost of the media, excluding
|
||||
local taxes. This does not apply to modified versions, which are
|
||||
only allowed to be distributed for free (of course you are
|
||||
allowed to sell the diffs, but not the modified package!).
|
||||
For exceptions the written consent of the author is necessary.
|
||||
|
||||
|
||||
You have agreed with the above conditions when holding copies of the
|
||||
distribution in your posession, you can terminate this by destroying
|
||||
any copy and all modified versions of this software in your possession.
|
||||
|
||||
|
||||
Of course any donations of money in any amount are very wellcome, just send
|
||||
it to my address or ask for a bank connection...
|
||||
|
||||
|
||||
My address is:
|
||||
|
||||
Email:
|
||||
kuehn@math.uni-muenster.de (preferred)
|
||||
|
||||
Snail mail:
|
||||
Ulrich Kuehn
|
||||
Geibelstr.9
|
||||
48161 Muenster
|
||||
Germany
|
||||
@@ -0,0 +1,145 @@
|
||||
This is an early beta version of an networking file system for MiNT.
|
||||
|
||||
Copyright 1993, 1994 by Ulrich K�hn. All rights reserved.
|
||||
|
||||
|
||||
DISCLAIMER:
|
||||
===========
|
||||
THIS PROGRAM COMES WITH ABSOLUTELY NO WARRANTY, NOT
|
||||
EVEN THE IMPLIED WARRANTIES OF MERCHANTIBILITY OR
|
||||
FITNESS FOR A PARTICULAR PURPOSE. USE AT YOUR OWN
|
||||
RISK.
|
||||
|
||||
See also the file COPYING for further details.
|
||||
|
||||
|
||||
|
||||
EXPLANATION:
|
||||
============
|
||||
A network file system allows computers to access file that are physically
|
||||
located on another computer transparently. Therefor the must be a means of
|
||||
data transport between these two computers (see above for the current
|
||||
situation). The computer accessing the remote file is called the client,
|
||||
the computer being physically the owner of that file is the server.
|
||||
On the server, there must be a service program running, that satisfies the
|
||||
access requests of the client. This program is called nfs daemon, short
|
||||
named nfsd. Because normally the client does not know which files can be
|
||||
accessed by it, it must be told so; this is called mounting of a remote
|
||||
directory or file and done with a program called mount on the client.
|
||||
On the server side there must run another service program, the mount daemon
|
||||
called mountd, which serves these mount requests by clients.
|
||||
So: without nfsd no file access, without mountd no mounts to access files.
|
||||
|
||||
Another point is that both server and client can be the same computer!
|
||||
Then the daemon programs run on that machine, and also the mount program is
|
||||
executed there. This is the easiest way to test this package.
|
||||
|
||||
|
||||
|
||||
INSTALLATION:
|
||||
=============
|
||||
There are a few things to do (better try first server and client on the
|
||||
same computer) :
|
||||
- (both server and client) make sure to have Kay Roemer's mint-net (a socket
|
||||
device) installed correctly. Version >= 0.30
|
||||
(eMail: roemer@hera.rbi.informatik.uni-frankfurt.de)
|
||||
This includes:
|
||||
- make sure to have a directory u:\etc (make a symbolic link to
|
||||
your preferred place in mint.cnf)
|
||||
- place the following files in u:\etc
|
||||
hostname, hosts, networks, services, resolv.conf
|
||||
- name your host by writing a name into u:\etc\hostname
|
||||
- (client) copy the nfs.xfs (the client filesystem driver) to a place where
|
||||
MiNT can find it at boot time (that is \mint or \multitos on your boot drive)
|
||||
- (server) install the portmapper daemon from the sun rpc package. Place
|
||||
the rpc file into u:\etc
|
||||
The portmapper is essential as both the mount daemon and the mount
|
||||
command rely on that, but as a temporary hack, they can also work without
|
||||
the portmapper.
|
||||
- (server) create a file u:\etc\xtab containing all the exported directories
|
||||
or files. This file is necessary for both nfsd and mountd (if necessary,
|
||||
rename them to nfsd.ttp and mountd.ttp). Please look into the bundled
|
||||
example, as no further docs are availbale at the moment. (or look into
|
||||
some unix adm doc)
|
||||
- reboot
|
||||
|
||||
|
||||
Then start the mountd and the nfsd. Now the system is ready to do some
|
||||
nfs mounts. Here an example: (suppose \etc\xtab contains a line
|
||||
\f\source ....)
|
||||
mount hostname:\f\source \nfs\source
|
||||
where hostname is the name of your host. (all operations done while drive
|
||||
u: is the current. It should be, as mount treats the ':' as separator
|
||||
betweeen hostname and directory name)
|
||||
Another point is that if you are trying to run server and client stuff on
|
||||
the same machine, the hostname for the mount command must be 'localhost'
|
||||
or 'loopback' (there should be such a line in \etc\hosts), as the resolver
|
||||
otherwise does not find the correct host (this behavior might depend on the
|
||||
version of the mint-net your are using, or on your configuration)
|
||||
After this operation you should have a directory source in u:\nfs which has
|
||||
all the contents of the original \f\source
|
||||
|
||||
All this can be done within mint.cnf (or better use a shell script which
|
||||
is started from mint.cnf -- look at the example rc.mup and mint.cnf)
|
||||
|
||||
A new feature of the mountd and nfsd is that they can be started by
|
||||
the inetd and terminate themselfes in this case after a short time, so
|
||||
there is no need to hold the all the time running in memory. Just install
|
||||
the inetd and make sure that the mount and nfs lines in u:\etc\inetd.conf
|
||||
are correct, that means they are active and the paths are correct.
|
||||
|
||||
|
||||
|
||||
COMPILATION:
|
||||
============
|
||||
If you want to rebuild the binaries by yourself, you have first to edit
|
||||
the paths in the Makevars file, especially the BUILDDIR variable.
|
||||
Then simply type make all or make install and wait...
|
||||
|
||||
|
||||
|
||||
BUGS:
|
||||
=====
|
||||
- the nfsd is not able to find a file on a TOSFS (in the state of MiNT
|
||||
<= 1.10) if it has only its nfs handle and no internal information. So
|
||||
it does not work properly on such a file system, sorry. But it works on
|
||||
a patched TOSFS with Julian Reschke's crc patch applied and enabled.
|
||||
This patch is included in MiNT 1.12 (get this anyway, as binaries are
|
||||
available!), but it seems to be disabled by default (take a look into
|
||||
tosfs.c in the MiNT source).
|
||||
- no caching of results for nonidempotent requests. So if the anser of a
|
||||
file remove request gets lost and the client resends this request, it
|
||||
will fail because the file is already gone.
|
||||
- no exportfs command, so you have to edit your \etc\xtab yourself and
|
||||
cannot use the \etc\exports file.
|
||||
- several mount options are still not supported by the XFS, such as
|
||||
hard mounts
|
||||
|
||||
|
||||
|
||||
MY CONFIGURATION:
|
||||
=================
|
||||
I am running this system on a TT030 with 4/4 Mb ram, TOS 3.06, a patched
|
||||
MiNT 1.12, using both minixfs and the patched tosfs, and it seems to be
|
||||
quite stable now, but who knows?
|
||||
|
||||
|
||||
THANKS:
|
||||
=======
|
||||
Many thanks go to Kay Roemer for his great socket device, which made this
|
||||
nfs possible. He also constantly supplied me with critics, suggestions,
|
||||
ideas and bug fixes.
|
||||
|
||||
|
||||
CONTACT ADDRESS:
|
||||
================
|
||||
If you have questions, bug reports, suggestions, etc. please contact
|
||||
me under:
|
||||
|
||||
kuehn@math.uni-muenster.de (Ulrich Kuehn) preferred
|
||||
|
||||
Ulrich Kuehn, Geibelstr.9, 48161 Muenster, Germany
|
||||
|
||||
|
||||
Have fun
|
||||
Ulrich
|
||||
@@ -0,0 +1,264 @@
|
||||
Examples of the use of sfdisk 3.0 (to partition a disk)
|
||||
Input lines have fields <start>,<size>,<type>... - see sfdisk.8.
|
||||
Usually no <start> is given, and input lines start with a comma.
|
||||
|
||||
Before doing anything with a disk, make sure it is not in use;
|
||||
unmount all its file systems, and say swapoff to its swap partitions.
|
||||
(The final BLKRRPART ioctl will fail if anything else still uses
|
||||
the disk, and you will have to reboot. It is easier to first make
|
||||
sure that nothing uses the disk, e.g., by testing:
|
||||
% umount /dev/sdb1
|
||||
% sfdisk -R /dev/sdb
|
||||
BLKRRPART: Device or resource busy
|
||||
* Device busy for revalidation (usage=2)
|
||||
% swapoff /dev/sdb3
|
||||
% sfdisk -R /dev/sdb
|
||||
* sdb: sdb1 < sdb5 sdb6 > sdb3
|
||||
%
|
||||
Note that the starred messages are kernel messages, that may be
|
||||
logged somewhere, or written to some other console.
|
||||
In sfdisk 3.01 sfdisk automatically does this check, unless told not to.)
|
||||
|
||||
1. One big partition:
|
||||
sfdisk /dev/hda << EOF
|
||||
;
|
||||
EOF
|
||||
|
||||
(If there was garbage on the disk before, you may get error messages
|
||||
like: `ERROR: sector 0 does not have an msdos signature'
|
||||
and `/dev/hda: unrecognized partition'. This does not matter
|
||||
if you write an entirely fresh partition table anyway.)
|
||||
|
||||
The output will be:
|
||||
-----------------------------------------------------------------------
|
||||
Old situation:
|
||||
...
|
||||
New situation:
|
||||
Units = cylinders of 208896 bytes, blocks of 1024 bytes, counting from 0
|
||||
|
||||
Device Boot Start End #cyls #blocks Id System
|
||||
/dev/hda1 0+ 1023 1024- 208895+ 83 Linux native
|
||||
Successfully wrote the new partition table
|
||||
hda: hda1
|
||||
-----------------------------------------------------------------------
|
||||
Writing and rereading the partition table takes a few seconds -
|
||||
don't be alarmed if nothing happens for six seconds or so.
|
||||
|
||||
|
||||
2. Three primary partitions: two of size 50MB and the rest:
|
||||
sfdisk /dev/hda -uM << EOF
|
||||
,50
|
||||
,50
|
||||
;
|
||||
EOF
|
||||
-----------------------------------------------------------------------
|
||||
New situation:
|
||||
Units = megabytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
|
||||
|
||||
Device Boot Start End MB #blocks Id System
|
||||
/dev/hda1 0+ 50- 51- 51203+ 83 Linux native
|
||||
/dev/hda2 50+ 100- 51- 51204 83 Linux native
|
||||
/dev/hda3 100+ 203 104- 106488 83 Linux native
|
||||
Successfully wrote the new partition table
|
||||
hda: hda1 hda2 hda3
|
||||
-----------------------------------------------------------------------
|
||||
/dev/hda1 is one block (in fact only half a block) shorter than
|
||||
/dev/hda2 because its start had to be shifted away from zero in
|
||||
order to leave room for the Master Boot Record (MBR).
|
||||
|
||||
|
||||
3. A 1MB OS2 Boot Manager partition, a 50MB DOS partition,
|
||||
and three extended partitions (DOS D:, Linux swap, Linux):
|
||||
sfdisk /dev/hda -uM << EOF
|
||||
,1,a
|
||||
,50,6
|
||||
,,E
|
||||
;
|
||||
,20,4
|
||||
,16,S
|
||||
;
|
||||
EOF
|
||||
-----------------------------------------------------------------------
|
||||
Device Boot Start End MB #blocks Id System
|
||||
/dev/hda1 0+ 1- 2- 1223+ a OS/2 Boot Manager
|
||||
/dev/hda2 1+ 51- 51- 51204 6 DOS 16-bit FAT >=32M
|
||||
/dev/hda3 51+ 203 153- 156468 5 Extended
|
||||
/dev/hda4 0 - 0 0 0 Empty
|
||||
/dev/hda5 51+ 71- 21- 20603+ 4 DOS 16-bit FAT <32M
|
||||
/dev/hda6 71+ 87- 17- 16523+ 82 Linux swap
|
||||
/dev/hda7 87+ 203 117- 119339+ 83 Linux native
|
||||
Successfully wrote the new partition table
|
||||
hda: hda1 hda2 hda3 < hda5 hda6 hda7 >
|
||||
-----------------------------------------------------------------------
|
||||
All these rounded numbers look better in cylinder units:
|
||||
% sfdisk -l /dev/hda
|
||||
-----------------------------------------------------------------------
|
||||
Device Boot Start End #cyls #blocks Id System
|
||||
/dev/hda1 0+ 5 6- 1223+ a OS/2 Boot Manager
|
||||
/dev/hda2 6 256 251 51204 6 DOS 16-bit FAT >=32M
|
||||
/dev/hda3 257 1023 767 156468 5 Extended
|
||||
/dev/hda4 0 - 0 0 0 Empty
|
||||
/dev/hda5 257+ 357 101- 20603+ 4 DOS 16-bit FAT <32M
|
||||
/dev/hda6 358+ 438 81- 16523+ 82 Linux swap
|
||||
/dev/hda7 439+ 1023 585- 119339+ 83 Linux native
|
||||
-----------------------------------------------------------------------
|
||||
But still - why does /dev/hda5 not start on a cylinder boundary?
|
||||
Because it is contained in an extended partition that does.
|
||||
Of the chain of extended partitions, usually only the first is
|
||||
shown. (The others have no name under Linux anyway.) But
|
||||
these additional extended partitions can be made visible:
|
||||
% sfdisk -l -x /dev/hda
|
||||
-----------------------------------------------------------------------
|
||||
Device Boot Start End #cyls #blocks Id System
|
||||
/dev/hda1 0+ 5 6- 1223+ a OS/2 Boot Manager
|
||||
/dev/hda2 6 256 251 51204 6 DOS 16-bit FAT >=32M
|
||||
/dev/hda3 257 1023 767 156468 5 Extended
|
||||
/dev/hda4 0 - 0 0 0 Empty
|
||||
|
||||
/dev/hda5 257+ 357 101- 20603+ 4 DOS 16-bit FAT <32M
|
||||
- 358 1023 666 135864 5 Extended
|
||||
- 257 256 0 0 0 Empty
|
||||
- 257 256 0 0 0 Empty
|
||||
|
||||
/dev/hda6 358+ 438 81- 16523+ 82 Linux swap
|
||||
- 439 1023 585 119340 5 Extended
|
||||
- 358 357 0 0 0 Empty
|
||||
- 358 357 0 0 0 Empty
|
||||
|
||||
/dev/hda7 439+ 1023 585- 119339+ 83 Linux native
|
||||
- 439 438 0 0 0 Empty
|
||||
- 439 438 0 0 0 Empty
|
||||
- 439 438 0 0 0 Empty
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Why the empty 4th input line? The description of the extended partitions
|
||||
starts after that of the four primary partitions.
|
||||
You force an empty partition with a ",0" input line, but here all
|
||||
space was divided already, so the fourth partition became empty
|
||||
automatically.
|
||||
|
||||
How did I know about 4,6,a,E,S? Well, E,S,L stand for Extended,
|
||||
Swap and Linux. The other values are hexadecimal and come from
|
||||
the table:
|
||||
% sfdisk -T
|
||||
Id Name
|
||||
|
||||
0 Empty
|
||||
1 DOS 12-bit FAT
|
||||
2 XENIX root
|
||||
3 XENIX usr
|
||||
4 DOS 16-bit FAT <32M
|
||||
5 Extended
|
||||
6 DOS 16-bit FAT >=32M
|
||||
7 OS/2 HPFS or QNX or Advanced UNIX
|
||||
8 AIX data
|
||||
9 AIX boot or Coherent
|
||||
a OS/2 Boot Manager
|
||||
...
|
||||
|
||||
|
||||
4. Preserving the sectors changed by sfdisk.
|
||||
% sfdisk -O save-hdd-partition-sectors /dev/hda
|
||||
...
|
||||
will write the sectors overwritten by sfdisk to file.
|
||||
If you notice that you trashed some partition, you may
|
||||
be able to restore things by
|
||||
% sfdisk -I save-hdd-partition-sectors /dev/hda
|
||||
%
|
||||
|
||||
5. Preserving some old partitions.
|
||||
% sfdisk -N2 /dev/hda
|
||||
...
|
||||
will only change the partition /dev/hda2, and leave the rest
|
||||
unchanged. The most obvious application is to change an Id:
|
||||
% sfdisk -N7 /dev/hda
|
||||
,,63
|
||||
%
|
||||
-----------------------------------------------------------------------
|
||||
Old situation:
|
||||
|
||||
Device Boot Start End #cyls #blocks Id System
|
||||
/dev/hda1 0+ 5 6- 1223+ a OS/2 Boot Manager
|
||||
...
|
||||
/dev/hda6 358+ 438 81- 16523+ 82 Linux swap
|
||||
/dev/hda7 439+ 1023 585- 119339+ 83 Linux native
|
||||
|
||||
New situation:
|
||||
|
||||
Device Boot Start End #cyls #blocks Id System
|
||||
/dev/hda1 0+ 5 6- 1223+ a OS/2 Boot Manager
|
||||
...
|
||||
/dev/hda6 358+ 438 81- 16523+ 82 Linux swap
|
||||
/dev/hda7 439+ 1023 585- 119339+ 63 GNU HURD
|
||||
-----------------------------------------------------------------------
|
||||
Note that changing a logical partition into an empty partition
|
||||
will decrease the number of all subsequent logical partitions.
|
||||
|
||||
6. Deleting a partition.
|
||||
At first I thought of having an option -X# for deleting partitions,
|
||||
but there are several ways in which a partition can be deleted, and
|
||||
it is probably better to handle this just as a general change.
|
||||
% sfdisk -d /dev/hda > ohda
|
||||
will write the current tables on the file `ohda'.
|
||||
-----------------------------------------------------------------------
|
||||
% cat ohda
|
||||
# partition table of /dev/hda
|
||||
unit: sectors
|
||||
|
||||
/dev/hda1 : start= 1, size= 40799, Id= 5
|
||||
/dev/hda2 : start= 40800, size= 40800, Id=83
|
||||
/dev/hda3 : start= 81600, size= 336192, Id=83
|
||||
/dev/hda4 : start= 0, size= 0, Id= 0
|
||||
/dev/hda5 : start= 2, size= 40798, Id=83
|
||||
-----------------------------------------------------------------------
|
||||
In order to delete the partition on /dev/hda3, edit this file
|
||||
and feed the result to sfdisk again.
|
||||
-----------------------------------------------------------------------
|
||||
% emacs ohda
|
||||
% cat ohda
|
||||
# partition table of /dev/hda
|
||||
unit: sectors
|
||||
|
||||
/dev/hda1 : start= 1, size= 40799, Id= 5
|
||||
/dev/hda2 : start= 40800, size= 40800, Id=83
|
||||
/dev/hda3 : start= 0, size= 0, Id= 0
|
||||
/dev/hda4 : start= 0, size= 0, Id= 0
|
||||
/dev/hda5 : start= 2, size= 40798, Id=83
|
||||
% sfdisk /dev/hda < ohda
|
||||
Old situation:
|
||||
Units = cylinders of 208896 bytes, blocks of 1024 bytes, counting from 0
|
||||
|
||||
Device Boot Start End #cyls #blocks Id System
|
||||
/dev/hda1 0+ 99 100- 20399+ 5 Extended
|
||||
/dev/hda2 100 199 100 20400 83 Linux native
|
||||
/dev/hda3 200 1023 824 168096 83 Linux native
|
||||
/dev/hda4 0 - 0 0 0 Empty
|
||||
/dev/hda5 0+ 99 100- 20399 83 Linux native
|
||||
New situation:
|
||||
Units = sectors of 512 bytes, counting from 0
|
||||
|
||||
Device Boot Start End #sectors Id System
|
||||
/dev/hda1 1 40799 40799 5 Extended
|
||||
/dev/hda2 40800 81599 40800 83 Linux native
|
||||
/dev/hda3 0 - 0 0 Empty
|
||||
/dev/hda4 0 - 0 0 Empty
|
||||
/dev/hda5 2 40799 40798 83 Linux native
|
||||
Successfully wrote the new partition table
|
||||
% sfdisk -l -V /dev/hda
|
||||
|
||||
Disk /dev/hda: 12 heads, 34 sectors, 1024 cylinders
|
||||
Units = cylinders of 208896 bytes, blocks of 1024 bytes, counting from 0
|
||||
|
||||
Device Boot Start End #cyls #blocks Id System
|
||||
/dev/hda1 0+ 99 100- 20399+ 5 Extended
|
||||
/dev/hda2 100 199 100 20400 83 Linux native
|
||||
/dev/hda3 0 - 0 0 0 Empty
|
||||
/dev/hda4 0 - 0 0 0 Empty
|
||||
/dev/hda5 0+ 99 100- 20399 83 Linux native
|
||||
/dev/hda: OK
|
||||
-----------------------------------------------------------------------
|
||||
This is a good way of making changes: dump the current status
|
||||
to file, edit the file, and feed it to sfdisk.
|
||||
Preserving the file on some other disk could be useful:
|
||||
if ever the MBR gets thrashed it can be used to restore
|
||||
the old situation.
|
||||
@@ -0,0 +1,24 @@
|
||||
.TH LPFLUSH 1 "July, 1993"
|
||||
|
||||
.SH NAME
|
||||
lpflush \- clears the /dev/lp buffer
|
||||
|
||||
.SH SYNOPSIS
|
||||
lpflush
|
||||
|
||||
.SH DESCRIPTION
|
||||
.I lpflush
|
||||
will discard all data stored in the
|
||||
.I /dev/lp
|
||||
buffer. It can be used to
|
||||
abort printing when things are going very wrong. Of course,
|
||||
.I lpflush
|
||||
won't clear the data stored in the printer's internal buffer, but this
|
||||
one is usually small enough. You may need to send a reset string to the
|
||||
printer, especially if you're printing graphics.
|
||||
|
||||
.SH SEE ALSO
|
||||
lp(4)
|
||||
|
||||
.SH AUTHOR
|
||||
Thierry Bousch (bousch@suntopo.matups.fr)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,43 @@
|
||||
|
||||
|
||||
|
||||
MTAB(5) FILE FORMATS MTAB(5)
|
||||
|
||||
|
||||
|
||||
NAME
|
||||
mtab - mounted file system table
|
||||
|
||||
SYNOPSIS
|
||||
/etc/mtab
|
||||
|
||||
#include <mntent.h>
|
||||
|
||||
DESCRIPTION
|
||||
mtab resides in the /etc directory, and contains a table of
|
||||
filesystems currently mounted by the mount(8) command.
|
||||
umount removes entries from this file.
|
||||
|
||||
The file contains a line of information for each mounted
|
||||
filesystem, structurally identical to the contents of
|
||||
/etc/fstab, described in fstab(5). There are a number of
|
||||
lines of the form:
|
||||
|
||||
_f_s_n_a_m_e _d_i_r _t_y_p_e _o_p_t_s _f_r_e_q _p_a_s_s_n_o
|
||||
|
||||
for example:
|
||||
|
||||
/dev/xy0a / 4.2 rw,noquota 1 2
|
||||
samba:/usr/packages /nfs/packages nfs ro 0 0
|
||||
|
||||
For now, this file contains only information about mounted
|
||||
NFS file systems.
|
||||
The file is accessed by programs using getmntent(3), and by
|
||||
the system administrator using a text editor.
|
||||
|
||||
FILES
|
||||
/etc/mtab
|
||||
|
||||
SEE ALSO
|
||||
getmntent(3), fstab(5), mount(8)
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
.TH ifconfig 8 MintNet
|
||||
.SH NAME
|
||||
ifconfig \- network interface configuration
|
||||
.SH SYNOPSIS
|
||||
.B "ifconfig [-a|-v] [-f <filename>] [interface options]"
|
||||
.SH DESCRIPTION
|
||||
.I Ifconfig
|
||||
is used to set and show the addresses, flags and options
|
||||
of network interfaces.
|
||||
.PP
|
||||
When
|
||||
.I ifconfig
|
||||
is invoked without arguments,
|
||||
it shows a table of all running network interfaces, their addresses
|
||||
and flags in a human readable form.
|
||||
The option
|
||||
.B "-a"
|
||||
forces
|
||||
.I ifconfig
|
||||
to display all interfaces in the system, no
|
||||
matter if they are running or not. The option
|
||||
.B "-f <filename>"
|
||||
passes driver specific options to
|
||||
.I ifconfig
|
||||
. You will find descriptions for these specific options in the
|
||||
README files of every driver that supports this.
|
||||
.PP
|
||||
When a single argument (the name of a network interface) is given,
|
||||
.I ifconfig
|
||||
just shows the status of this interface.
|
||||
.PP
|
||||
.I ifconfig
|
||||
sets flags and addresses of the interface named as the first
|
||||
argument when additional options are given.
|
||||
.SH OPTIONS
|
||||
.TP 15
|
||||
.SM interface
|
||||
The name of the interface to deal with.
|
||||
.BR lo0 ,
|
||||
and
|
||||
.B sl0
|
||||
are valid names for the loopback interface and the SLIP interface
|
||||
(channel 0) respectively.
|
||||
.TP
|
||||
.SM "addr \fBinetaddr\fP"
|
||||
This option causes
|
||||
.I ifconfig
|
||||
to set the local IP address of the interface to
|
||||
.BR inetaddr .
|
||||
This is the address your machine can be reached at over this interface.
|
||||
.B inetaddr
|
||||
can be in standard IP address dot notation or can be a symbolic name
|
||||
which is resolved into an IP address.
|
||||
NOTE that you must not use a symbolic name when setting up the loopback
|
||||
interface, because symbolic names cannot be resolved before the loopback
|
||||
interface is set up.
|
||||
.TP
|
||||
.SM "dstaddr \fBinetaddr\fP"
|
||||
Set the point to point destination address of the interface to
|
||||
.BR inetaddr ,
|
||||
which
|
||||
can be an IP address or a symbolic name.
|
||||
This option will only work on point to point interfaces, like the
|
||||
.B sl?
|
||||
ones.
|
||||
.TP
|
||||
.SM "broadaddr \fBaa.bb.cc.dd\fP"
|
||||
Set the broadcast address of the interface to
|
||||
.BR "aa.bb.cc.dd" .
|
||||
This defaults to the net broadcast address of the attached network, but
|
||||
can be set to any valid IP address.
|
||||
This option will only work on interfaces that support broadcasting, like
|
||||
the
|
||||
.B lo0
|
||||
interface.
|
||||
.TP
|
||||
.SM "netmask \fBaa.bb.cc.dd\fP"
|
||||
Set the subnet mask of the interface to
|
||||
.BR "aa.bb.cc.dd" .
|
||||
This is by default the class A, B or C netmask of the local address
|
||||
of the interface set with the
|
||||
.B "addr"
|
||||
option.
|
||||
It can be used to split a large network into many small subnetworks.
|
||||
.TP
|
||||
.SM up
|
||||
This sets the UP flag on the interface. This is used to activate the
|
||||
interface.
|
||||
.TP
|
||||
.SM down
|
||||
This clears the UP flags on the interface. This is used to shut down
|
||||
the interface.
|
||||
.TP
|
||||
.SM [-]arp
|
||||
(De)activate usage of the ARP (address resolution protocol) protocol
|
||||
for resolving IP addresses into hardware addresses.
|
||||
.TP
|
||||
.SM [-]trailers
|
||||
(De)activate usage of trailer encapsulation for this interface.
|
||||
.TP
|
||||
.SM [-]debug
|
||||
(De)activate debugging for this interface. Debugging is currently
|
||||
a no-op.
|
||||
.TP
|
||||
.SM mtu NN
|
||||
Set the mtu (maximum transmission unit) of the interface to NN bytes.
|
||||
Better make it large enough as long as fragmentation is not implemented.
|
||||
.TP
|
||||
.SM metric NN
|
||||
Set the metric of the interface to NN. This value is currently not used.
|
||||
.TP
|
||||
.SM [-]linkNN
|
||||
This option sets (clears) the bit with number NN in the link level flag
|
||||
word of the interface.
|
||||
The flag word is 16 bits wide, so [-]link0 through [-]link15 are valid.
|
||||
Bit 0 is the least significant, bit 15 the most significant bit.
|
||||
.br
|
||||
Link level flags are interface type specific. Thats why
|
||||
.I ifconfig
|
||||
only uses bit numbers instead of meaningful names for them.
|
||||
Currently only SLIP interfaces support link level flags.
|
||||
Bit 3 turns auto compression on: if set and a VJ compressed SLIP
|
||||
frame is received the interface enables compression for outgoing frames.
|
||||
Bit 4 is the compression bit: if set VJ header compression is enabled.
|
||||
.SH AUTHOR
|
||||
Kay Roemer <roemer@rbi.informatik.uni-frankfurt.de>
|
||||
Torsten Lang <Torsten@Lang.net>
|
||||
.SH SEE ALSO
|
||||
.IR route(8).
|
||||
@@ -0,0 +1,113 @@
|
||||
|
||||
|
||||
|
||||
MOUNT(8) MAINTENANCE COMMANDS MOUNT(8)
|
||||
|
||||
|
||||
|
||||
NAME
|
||||
mount, umount - mount and unmount file systems
|
||||
|
||||
SYNOPSIS
|
||||
/usr/etc/mount [ -fnrv ] [ -t _t_y_p_e ] [ -o _o_p_t_i_o_n_s ] _f_i_l_e_s_y_s_-
|
||||
_t_e_m _d_i_r_e_c_t_o_r_y
|
||||
/usr/etc/umount [ -v ] _f_i_l_e_s_y_s_t_e_m|_d_i_r_e_c_t_o_r_y ...
|
||||
|
||||
DESCRIPTION
|
||||
mount attaches a named _f_i_l_e_s_y_s_t_e_m to the file system hierar-
|
||||
chy at the pathname location _d_i_r_e_c_t_o_r_y, which must already
|
||||
exist. If _d_i_r_e_c_t_o_r_y has any contents prior to the mount
|
||||
operation, these remain hidden until the _f_i_l_e_s_y_s_t_e_m is once
|
||||
again unmounted. If _f_i_l_e_s_y_s_t_e_m is of the form
|
||||
_h_o_s_t:_p_a_t_h_n_a_m_e, it is assumed to be an NFS file system (type
|
||||
nfs).
|
||||
|
||||
umount unmounts a currently mounted file system, which can
|
||||
be specified either as a _d_i_r_e_c_t_o_r_y or a _f_i_l_e_s_y_s_t_e_m.
|
||||
|
||||
mount and umount maintain a table of mounted file systems in
|
||||
/etc/mtab, described in fstab(5). If invoked without an
|
||||
argument, mount displays the contents of this table.
|
||||
|
||||
OPTIONS
|
||||
mount
|
||||
-f Fake an /etc/mtab entry, but do not actually mount any
|
||||
file systems.
|
||||
|
||||
-n Mount the file system without making an entry in
|
||||
/etc/mtab.
|
||||
|
||||
-v Verbose. Display a message indicating each file system
|
||||
being mounted.
|
||||
|
||||
-r Mount the specified file system read-only, even if the
|
||||
entry in /etc/fstab specifies that it is to be mounted
|
||||
read-write.
|
||||
|
||||
Physically write-protected and magnetic-tape file sys-
|
||||
tems must be mounted read-only. Otherwise errors occur
|
||||
when the system attempts to update access times, even
|
||||
if no write operation is attempted.
|
||||
|
||||
-o _o_p_t_i_o_n_s
|
||||
Specify file system _o_p_t_i_o_n_s, a comma-separated list of
|
||||
words from the list below. Some options are valid for
|
||||
all file system types, while others apply to a specific
|
||||
type only.
|
||||
|
||||
_o_p_t_i_o_n_s valid on _a_l_l file systems:
|
||||
|
||||
rw|ro Read/write or read-only.
|
||||
suid|nosuid Setuid execution allowed or disal-
|
||||
lowed.
|
||||
|
||||
The default is `rw,suid'.
|
||||
|
||||
_o_p_t_i_o_n_s specific to nfs (NFS) file systems:
|
||||
|
||||
rsize=_n Set the read buffer size to _n bytes.
|
||||
wsize=_n Set the write buffer size to _n
|
||||
bytes.
|
||||
timeo=_n Set the NFS timeout to _n tenths of a
|
||||
second.
|
||||
retrans=_n The number of NFS retransmissions.
|
||||
port=_n The server IP port number.
|
||||
acregmin=_n Hold cached attributes for at least
|
||||
_n seconds after file modification.
|
||||
acregmax=_n Hold cached attributes for no more
|
||||
than _n seconds after file modifica-
|
||||
tion.
|
||||
acdirmin=_n Hold cached attributes for at least
|
||||
_n seconds after directory update.
|
||||
acdirmax=_n Hold cached attributes for no more
|
||||
than _n seconds after directory
|
||||
update.
|
||||
actimeo=_n Set _m_i_n and _m_a_x times for regular
|
||||
files and directories to _n seconds.
|
||||
|
||||
actimeo has no default; it sets acregmin, acreg-
|
||||
max, acdirmin and acdirmax
|
||||
|
||||
Defaults for rsize and wsize are set internally by
|
||||
the system kernel.
|
||||
|
||||
umount
|
||||
-v Verbose. Display a message indicating each file system
|
||||
being unmounted.
|
||||
|
||||
EXAMPLES
|
||||
To mount a remote file system:
|
||||
mount serv:/usr/src /usr/src
|
||||
To mount a remote file system read-only:
|
||||
mount -o ro serv:/usr/src /usr/src
|
||||
|
||||
FILES
|
||||
/etc/mtab table of mounted file systems
|
||||
|
||||
SEE ALSO
|
||||
mkdir(2V), open(2V), fstab(5), mtab(5), automount(8),
|
||||
mountd(8C), nfsd(8)
|
||||
|
||||
BUGS
|
||||
As for now, it is only possible to mount a remote file system in
|
||||
/nfs.
|
||||
@@ -0,0 +1,140 @@
|
||||
.TH netstat 8 MiNT-Net
|
||||
.SH NAME
|
||||
netstat \- show active network connections
|
||||
.SH SYNOPSIS
|
||||
.B "netstat [-f domain]"
|
||||
.SH DESCRIPTION
|
||||
.I Netstat
|
||||
is used to display infomation about active communication
|
||||
endpoints in either the
|
||||
.B unix
|
||||
or
|
||||
.B inet
|
||||
communication domain or both of them.
|
||||
If invoked without arguments it shows only
|
||||
.B unix
|
||||
domain sockets.
|
||||
You can specify the domain to deal with with the -f option.
|
||||
.sp
|
||||
For the unix domain the output of netstat consists of one line for
|
||||
each socket in the system,
|
||||
which contains the following entries:
|
||||
.TP 15
|
||||
.SM "Proto"
|
||||
The protocol used by the socket, this can be one of:
|
||||
.RS 15
|
||||
.TP 15
|
||||
.SM "unix"
|
||||
This is the one and only protocol for unix sockets.
|
||||
.TP
|
||||
.SM "unknown"
|
||||
The protocol is unknown, should never happen.
|
||||
.RE
|
||||
.TP 15
|
||||
.SM "Flags"
|
||||
These are the flags set on the socket. The output for this entry
|
||||
consists of a space-separated list of tree-letter flag values.
|
||||
Possible flags are:
|
||||
.RS 15
|
||||
.TP 15
|
||||
.SM "ACC"
|
||||
The socket is listening for incoming connections.
|
||||
This applies only to stream sockets.
|
||||
.TP
|
||||
.SM "RCV"
|
||||
The socket is shut down for receiving after a call to
|
||||
.IR shutdown (3),
|
||||
ie the socket cannot receive any messages.
|
||||
.TP
|
||||
.SM "SND"
|
||||
The socket is shut down for sending after a call to
|
||||
.IR shutdown (3),
|
||||
ie it is impossible to send messages on the socket.
|
||||
.TP
|
||||
.SM "MRK"
|
||||
If out-of-band data is handled inline, "receiving is at mark", ie
|
||||
all data before the out of band data has been read.
|
||||
.RE
|
||||
.TP 15
|
||||
.SM "State"
|
||||
This field is the internal state of the socket,
|
||||
the following values are possible:
|
||||
.RS 15
|
||||
.TP 15
|
||||
.SM "VIRGIN"
|
||||
The socket has just been created,
|
||||
but has not been assigned a communication domain and type.
|
||||
.TP
|
||||
.SM "UNCONNECTED"
|
||||
The socket is not connected to a peer.
|
||||
.TP
|
||||
.SM "CONNECTING"
|
||||
The socket is about to connect to another one.
|
||||
.TP
|
||||
.SM "CONNECTED"
|
||||
The socket is connected to another one.
|
||||
.TP
|
||||
.SM "DISONNECTING"
|
||||
The socket is about to finish the connection to its peer.
|
||||
.TP
|
||||
.SM "DISCONNECTED"
|
||||
The socket has finished a connection and is again unconnected.
|
||||
.TP
|
||||
.SM "UNKNOWN"
|
||||
This should never happen.
|
||||
.RE
|
||||
.TP 15
|
||||
.SM "Type"
|
||||
This is the communication style the socket uses.
|
||||
Possible values are:
|
||||
.RS 15
|
||||
.TP 15
|
||||
.SM "STREAM"
|
||||
The socket uses connection-oriented byte stream communication,
|
||||
just like pipes do.
|
||||
.TP
|
||||
.SM "DGRAM"
|
||||
The socket uses connectionless, unrelyable,
|
||||
datagram oriented communication.
|
||||
.TP
|
||||
.SM "RAW"
|
||||
This is a raw socket.
|
||||
.TP
|
||||
.SM "RDM"
|
||||
Just like
|
||||
.SM "DGRAM\c"
|
||||
, except that you can rely on the packets to be delivered successfully.
|
||||
.TP
|
||||
.SM "SEQPACKET"
|
||||
This is like
|
||||
.SM "RDM\c"
|
||||
, except that the receiver is guaranteed to get the packets in the
|
||||
same order the sender sends them.
|
||||
.TP
|
||||
.SM "UNKNOWN"
|
||||
This type should never happen.
|
||||
.RE
|
||||
.TP 15
|
||||
.SM "Recv-Q"
|
||||
The size of the next unread message for datagram oriented sockets,
|
||||
and the number of unread bytes for stream oriented ones.
|
||||
.TP
|
||||
.SM "Address"
|
||||
The local address of the socket, if
|
||||
.IR bind (3)
|
||||
was done on it.
|
||||
This is a filename for the unix domain.
|
||||
.SH OPTIONS
|
||||
.TP 15
|
||||
-f domain
|
||||
Display information for active sockets in domain
|
||||
.IR domain ,
|
||||
overriding the default domain.
|
||||
.SH FILES
|
||||
.TP 15
|
||||
/dev/unix
|
||||
Unix domain information
|
||||
.SH BUGS
|
||||
Only unix domain implemented.
|
||||
.SH AUTHOR
|
||||
Kay Roemer <roemer@hera.rbi.informatik.uni-frankfurt.de>
|
||||
@@ -0,0 +1,76 @@
|
||||
.TH route 8 MintNet
|
||||
.SH NAME
|
||||
route \- display and modify system routing table
|
||||
.SH SYNOPSIS
|
||||
.B "route [-v]"
|
||||
.br
|
||||
.B "route add dstaddr interface [metric NN] [gw gateway]"
|
||||
.br
|
||||
.B "route del dstaddr"
|
||||
.SH DESCRIPTION
|
||||
.I Route
|
||||
is used to display and modify MintNet's routing table. You can add
|
||||
an delete routes.
|
||||
The whole routing table of the system is displayed (in the format
|
||||
.I netstat
|
||||
uses when invoked with the
|
||||
.B -rn
|
||||
option)
|
||||
when
|
||||
.I route
|
||||
is invoked without arguments.
|
||||
.SH OPTIONS
|
||||
.TP 15
|
||||
.SM "add \fBdstaddr\fP"
|
||||
This option causes route to add a new route to the systems routing table
|
||||
for the destination address
|
||||
.BR dstaddr ,
|
||||
which can be given in standard dot notation or can be a symbolic name which
|
||||
is resolved into an IP address.
|
||||
A special case for
|
||||
.B dstaddr
|
||||
is the name
|
||||
.BR default .
|
||||
This name causes
|
||||
.I route
|
||||
to add a default route (used when no other route matches the destination
|
||||
address of a packet). This special destination address can only be used
|
||||
in conjunction with the
|
||||
.B gw
|
||||
option.
|
||||
.B dstaddr
|
||||
can be either the address of a network (thats the case when the host portion
|
||||
of the given IP address is zero) or the address of a host (when the host
|
||||
portion of the given IP address is non zero).
|
||||
Based on the type of the address
|
||||
.B route
|
||||
will add a route to a network or a route to a host.
|
||||
.TP
|
||||
.SM "metric NN"
|
||||
This option can only be used with the
|
||||
.B add
|
||||
command and sets the distance metric for the route to the specified
|
||||
destination address. The distance metric is a measurement for how good
|
||||
the route is. The metric is the number of `hops' (that is the number of
|
||||
edges on the route when you imagine the network as a graph with the
|
||||
hosts at the vertices) between the source and the destination. The metric
|
||||
value is only useful for gateway routes.
|
||||
.TP
|
||||
.SM "gw \fBaddr\fP"
|
||||
This option can only be used with the
|
||||
.B add
|
||||
command and tells
|
||||
.B route
|
||||
that this route goes over a gateway host which forwards packets
|
||||
to the destination address of the route for you.
|
||||
.B addr
|
||||
is the address of the gateway and must be the address of a host.
|
||||
.TP
|
||||
.SM interface
|
||||
This is the name of the network interface over which outgoing packets
|
||||
to the specified destination address should be sent.
|
||||
.SH AUTHOR
|
||||
Kay Roemer <roemer@rbi.informatik.uni-frankfurt.de>
|
||||
.SH SEE ALSO
|
||||
.IR ifconfig (8),
|
||||
.IR netstat (8).
|
||||
@@ -0,0 +1,497 @@
|
||||
.\" Copyright 1995 Andries E. Brouwer (aeb@cwi.nl)
|
||||
.\" May be distributed under the GNU General Public License
|
||||
.\" The `DOS 6.x Warning' was taken from the old fdisk.8, which says
|
||||
.\" -- Copyright 1992, 1993 Rickard E. Faith (faith@cs.unc.edu)
|
||||
.\" -- May be distributed under the GNU General Public License
|
||||
.\" The `DRDOS Warning' was taken from a net post by Stephen Tweedie.
|
||||
.\"
|
||||
.TH SFDISK 8 "1 September 1995" "Linux 1.3.23" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
sfdisk \- Partition table manipulator for Linux
|
||||
.SH SYNOPSIS
|
||||
.BR sfdisk " [options] device"
|
||||
.br
|
||||
.BR "sfdisk \-s " [partition]
|
||||
.SH DESCRIPTION
|
||||
.B sfdisk
|
||||
has four (main) uses: list the size of a partition, list the partitions
|
||||
on a device, check the partitions on a device, and - very dangerous -
|
||||
repartition a device.
|
||||
|
||||
.SS "List Sizes"
|
||||
.BI "sfdisk \-s " partition
|
||||
gives the size of
|
||||
.I partition
|
||||
in blocks. This may be useful in connection with programs like
|
||||
.B mkswap
|
||||
or so. Here
|
||||
.I partition
|
||||
is usually something like
|
||||
.I /dev/hda1
|
||||
or
|
||||
.IR /dev/sdb12 ,
|
||||
but may also be an entire disk, like
|
||||
.IR /dev/xda .
|
||||
.br
|
||||
.RS
|
||||
.nf
|
||||
.if t .ft CW
|
||||
% sfdisk \-s /dev/hda9
|
||||
81599
|
||||
%
|
||||
.if t .ft R
|
||||
.fi
|
||||
.RE
|
||||
If the partition argument is omitted,
|
||||
.B sfdisk
|
||||
will list the sizes of all disks, and the total:
|
||||
.br
|
||||
.RS
|
||||
.nf
|
||||
.if t .ft CW
|
||||
% sfdisk \-s
|
||||
/dev/hda: 208896
|
||||
/dev/hdb: 1025136
|
||||
/dev/hdc: 1031063
|
||||
/dev/sda: 8877895
|
||||
/dev/sdb: 1758927
|
||||
total: 12901917 blocks
|
||||
%
|
||||
.if t .ft R
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.SS "List Partitions"
|
||||
The second type of invocation:
|
||||
.BI "sfdisk \-l " "[options] device"
|
||||
will list the partitions on this device.
|
||||
If the device argument is omitted, the partitions on all hard disks
|
||||
are listed.
|
||||
.br
|
||||
.nf
|
||||
.if t .ft CW
|
||||
% sfdisk \-l /dev/hdc
|
||||
|
||||
Disk /dev/hdc: 16 heads, 63 sectors, 2045 cylinders
|
||||
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0
|
||||
|
||||
Device Boot Start End #cyls #blocks Id System
|
||||
/dev/hdc1 0+ 406 407\- 205096+ 83 Linux native
|
||||
/dev/hdc2 407 813 407 205128 83 Linux native
|
||||
/dev/hdc3 814 2044 1231 620424 83 Linux native
|
||||
/dev/hdc4 0 \- 0 0 0 Empty
|
||||
%
|
||||
.if t .ft R
|
||||
.fi
|
||||
The trailing \- and + signs indicate that rounding has taken place,
|
||||
and that the actual value is slightly less (more).
|
||||
To see the exact values, ask for a listing with sectors as unit.
|
||||
|
||||
.SS "Check partitions"
|
||||
The third type of invocation:
|
||||
.BI "sfdisk \-V " device
|
||||
will apply various consistency checks to the partition tables on
|
||||
.IR device .
|
||||
It prints `OK' or complains. The \-V option can be used together
|
||||
with \-l. In a shell script one might use
|
||||
.BI "sfdisk \-V \-q " device
|
||||
which only returns a status.
|
||||
|
||||
.SS "Create partitions"
|
||||
The fourth type of invocation:
|
||||
.BI "sfdisk " device
|
||||
will cause
|
||||
.B sfdisk
|
||||
to read the specification for the desired partitioning of
|
||||
.I device
|
||||
from its standard input, and then to change the partition tables
|
||||
on that disk. Thus, it is possible to use
|
||||
.B sfdisk
|
||||
from a shell script. When
|
||||
.B sfdisk
|
||||
determines that its standard input is a terminal, it will be
|
||||
conversational; otherwise it will abort on any error.
|
||||
.LP
|
||||
BE EXTREMELY CAREFUL - ONE TYPING MISTAKE AND ALL YOUR DATA IS LOST
|
||||
.LP
|
||||
As a precaution, one can save the sectors changed by
|
||||
.BR sfdisk :
|
||||
.RS
|
||||
.nf
|
||||
.if t .ft CW
|
||||
% sfdisk /dev/hdd \-O hdd-partition-sectors.save
|
||||
%
|
||||
.if t .ft R
|
||||
.fi
|
||||
.RE
|
||||
.LP
|
||||
Then, if you discover that you did something stupid before anything
|
||||
else has been written to disk, it may be possible to recover
|
||||
the old situation with
|
||||
.RS
|
||||
.nf
|
||||
.if t .ft CW
|
||||
% sfdisk /dev/hdd \-I hdd-partition-sectors.save
|
||||
%
|
||||
.if t .ft R
|
||||
.fi
|
||||
.RE
|
||||
|
||||
There are many options.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BR \-v " or " \-\-version
|
||||
Print version number of
|
||||
.B sfdisk
|
||||
and exit immediately.
|
||||
.TP
|
||||
.BR \-? " or " \-\-help
|
||||
Print a usage message and exit immediately.
|
||||
.TP
|
||||
.BR \-T " or " \-\-list-types
|
||||
Print the recognized types (system Id's).
|
||||
.TP
|
||||
.BR \-s " or " \-\-show\-size
|
||||
List the size of a partition.
|
||||
.TP
|
||||
.BR \-g " or " \-\-show\-geometry
|
||||
List the kernel's idea of the geometry of the indicated disk(s).
|
||||
.TP
|
||||
.BR \-l " or " \-\-list
|
||||
List the partitions of a device.
|
||||
.TP
|
||||
.BR \-d
|
||||
Dump the partitions of a device in a format useful as input
|
||||
to sfdisk. For example,
|
||||
.br
|
||||
.nf
|
||||
.if t .ft CW
|
||||
% sfdisk -d /dev/hda > hda.out
|
||||
% sfdisk /dev/hda < hda.out
|
||||
.if t .ft R
|
||||
.fi
|
||||
will correct the bad last extended partition that the OS/2
|
||||
sfdisk creates.
|
||||
.TP
|
||||
.BR \-V " or " \-\-verify
|
||||
Test whether partitions seem correct. (See above.)
|
||||
.TP
|
||||
.BR \-i " or " \-\-increment
|
||||
Number cylinders etc. starting from 1 instead of 0.
|
||||
.TP
|
||||
.BI \-N " number"
|
||||
Change only the single partition indicated. For example:
|
||||
.br
|
||||
.nf
|
||||
.if t .ft CW
|
||||
% sfdisk /dev/hdb \-N5
|
||||
,,,*
|
||||
%
|
||||
.if t .ft R
|
||||
.fi
|
||||
will make the fifth partition on /dev/hdb bootable (`active')
|
||||
and change nothing else. (Probably this fifth partition
|
||||
is called /dev/hdb5, but you are free to call it something else,
|
||||
like `/my_equipment/disks/2/5' or so).
|
||||
.TP
|
||||
.BI \-A " number"
|
||||
Make the indicated partition(s) active, and all others inactive.
|
||||
.TP
|
||||
.BI \-c " or " \-\-id " number [Id]"
|
||||
If no Id argument given: print the partition Id of the indicated
|
||||
partition. If an Id argument is present: change the type (Id) of
|
||||
the indicated partition to the given value.
|
||||
This option has the two very long forms \-\-print\-id and \-\-change\-id.
|
||||
For example:
|
||||
.br
|
||||
.nf
|
||||
.if t .ft CW
|
||||
% sfdisk --print-id /dev/hdb 5
|
||||
6
|
||||
% sfdisk --change-id /dev/hdb 5 83
|
||||
OK
|
||||
.if t .ft R
|
||||
.fi
|
||||
first reports that /dev/hdb5 has Id 6, and then changes that into 83.
|
||||
.TP
|
||||
.BR \-uS " or " \-uB " or " \-uC " or " \-uM
|
||||
Accept or report in units of sectors (blocks, cylinders, megabytes,
|
||||
respectively). The default is cylinders, at least when the geometry
|
||||
is known.
|
||||
.TP
|
||||
.BR \-x " or " \-\-show\-extended
|
||||
Also list non-primary extended partitions on output,
|
||||
and expect descriptors for them on input.
|
||||
.TP
|
||||
.BI \-C " cylinders"
|
||||
Specify the number of cylinders, possibly overriding what the kernel thinks.
|
||||
.TP
|
||||
.BI \-H " heads"
|
||||
Specify the number of heads, possibly overriding what the kernel thinks.
|
||||
.TP
|
||||
.BI \-S " sectors"
|
||||
Specify the number of sectors, possibly overriding what the kernel thinks.
|
||||
.TP
|
||||
.BR \-f " or " \-\-force
|
||||
Do what I say, even if it is stupid.
|
||||
.TP
|
||||
.BR \-q " or " \-\-quiet
|
||||
Suppress warning messages.
|
||||
.TP
|
||||
.BR \-L " or " \-\-Linux
|
||||
Do not complain about things irrelevant for Linux.
|
||||
.TP
|
||||
.BR \-D " or " \-\-DOS
|
||||
For DOS-compatibility: waste a little space.
|
||||
(More precisely: if a partition cannot contain sector 0,
|
||||
e.g. because that is the MBR of the device, or contains
|
||||
the partition table of an extended partition, then
|
||||
.B sfdisk
|
||||
would make it start the next sector. However, when this
|
||||
option is given it skips to the start of the next track,
|
||||
wasting for example 33 sectors (in case of 34 sectors/track),
|
||||
just like certain versions of DOS do.)
|
||||
Certain Disk Managers and boot loaders (such as OSBS, but not
|
||||
LILO or the OS/2 Boot Manager) also live in this empty space,
|
||||
so maybe you want this option if you use one.
|
||||
.TP
|
||||
.BR \-\-IBM " or " \-\-leave\-last
|
||||
Certain IBM diagnostic programs assume that they can use the
|
||||
last cylinder on a disk for disk-testing purposes. If you think
|
||||
you might ever run such programs, use this option to tell
|
||||
.B sfdisk
|
||||
that it should not allocate the last cylinder.
|
||||
Sometimes the last cylinder contains a bad sector table.
|
||||
.TP
|
||||
.B \-n
|
||||
Go through all the motions, but do not actually write to disk.
|
||||
.TP
|
||||
.B \-R
|
||||
Only execute the BLKRRPART ioctl (to make the kernel re-read
|
||||
the partition table). This can be useful for checking in advance
|
||||
that the final BLKRRPART will be successful, and also when you
|
||||
changed the partition table `by hand' (e.g., using dd from a backup).
|
||||
If the kernel complains (`device busy for revalidation (usage = 2)')
|
||||
then something still uses the device, and you still have to unmount
|
||||
some file system, or say swapoff to some swap partition.
|
||||
.TP
|
||||
.B \-\-no\-reread
|
||||
When starting a repartitioning of a disk, sfdisk checks that this disk
|
||||
is not mounted, or in use as a swap device, and refuses to continue
|
||||
if it is. This option suppresses the test. (On the other hand, the \-f
|
||||
option would force sfdisk to continue even when this test fails.)
|
||||
.TP
|
||||
.BI \-O " file"
|
||||
Just before writing the new partition, output the sectors
|
||||
that are going to be overwritten to
|
||||
.I file
|
||||
(where hopefully
|
||||
.I file
|
||||
resides on another disk, or on a floppy).
|
||||
.TP
|
||||
.BI \-I " file"
|
||||
After destroying your filesystems with an unfortunate
|
||||
.B sfdisk
|
||||
command, you would have been able to restore the old situation
|
||||
if only you had preserved it using the \-O flag.
|
||||
|
||||
.SH THEORY
|
||||
Block 0 of a disk (the Master Boot Record) contains among
|
||||
other things four partition descriptors. The partitions
|
||||
described here are called
|
||||
.I primary
|
||||
partitions.
|
||||
.LP
|
||||
A partition descriptor has 6 fields:
|
||||
.br
|
||||
.nf
|
||||
.RS
|
||||
struct partition {
|
||||
unsigned char bootable; /* 0 or 0x80 */
|
||||
hsc begin_hsc;
|
||||
unsigned char id;
|
||||
hsc end_hsc;
|
||||
unsigned int starting_sector;
|
||||
unsigned int nr_of_sectors;
|
||||
}
|
||||
.RE
|
||||
.fi
|
||||
.LP
|
||||
The two hsc fields indicate head, sector and cylinder of the
|
||||
begin and the end of the partition. Since each hsc field only
|
||||
takes 3 bytes, only 24 bits are available, which does not
|
||||
suffice for big disks (say > 8GB). In fact, due to the wasteful
|
||||
representation (that uses a byte for the number of heads, which
|
||||
is typically 16), problems already start with 0.5GB.
|
||||
However Linux does not use these fields, and problems can arise
|
||||
only at boot time, before Linux has been started. For more
|
||||
details, see the
|
||||
.B lilo
|
||||
documentation.
|
||||
.LP
|
||||
Each partition has a type, its `Id', and if this type is 5
|
||||
.IR "" "(`" "extended partition" "')"
|
||||
the starting sector of the partition
|
||||
again contains 4 partition descriptors. MSDOS only uses the
|
||||
first two of these: the first one an actual data partition,
|
||||
and the second one again an extended partition (or empty).
|
||||
In this way one gets a chain of extended partitions.
|
||||
Other operating systems have slightly different conventions.
|
||||
Linux also accepts type 85 as equivalent to 5 - this can be
|
||||
useful if one wants to have extended partitions under Linux past
|
||||
the 1024 cylinder boundary, without DOS FDISK hanging.
|
||||
(If there is no good reason, you should just use 5, which is
|
||||
understood by other systems.)
|
||||
.LP
|
||||
Partitions that are not primary or extended are called
|
||||
.IR logical .
|
||||
Often, one cannot boot from logical partitions (because the
|
||||
process of finding them is more involved than just looking
|
||||
at the MBR).
|
||||
Note that of an extended partition only the Id and the start
|
||||
are used. There are various conventions about what to write
|
||||
in the other fields. One should not try to use extended partitions
|
||||
for data storage or swap.
|
||||
|
||||
.SH "INPUT FORMAT"
|
||||
.B sfdisk
|
||||
reads lines of the form
|
||||
.br
|
||||
.RS
|
||||
<start> <size> <id> <bootable> <c,h,s> <c,h,s>
|
||||
.RE
|
||||
where each line fills one partition descriptor.
|
||||
.LP
|
||||
Fields are separated by whitespace, or comma or semicolon possibly
|
||||
followed by whitespace; initial and trailing whitespace is ignored.
|
||||
Numbers can be octal, decimal or hexadecimal, decimal is default.
|
||||
When a field is absent or empty, a default value is used.
|
||||
.LP
|
||||
The <c,h,s> parts can (and probably should) be omitted -
|
||||
.B sfdisk
|
||||
computes them from <start> and <size> and the disk geometry
|
||||
as given by the kernel or specified using the \-H, \-S, \-C flags.
|
||||
.LP
|
||||
Bootable is specified as [*|\-], with as default not-bootable.
|
||||
(The value of this field is irrelevant for Linux - when Linux
|
||||
runs it has been booted already - but might play a role for
|
||||
certain boot loaders and for other operating systems.
|
||||
For example, when there are several primary DOS partitions,
|
||||
DOS assigns C: to the first among these that is bootable.)
|
||||
.LP
|
||||
Id is given in hex, without the 0x prefix, or is [E|S|L|X], where
|
||||
L (LINUX_NATIVE (83)) is the default, S is LINUX_SWAP (82), E
|
||||
is EXTENDED_PARTITION (5), and X is LINUX_EXTENDED (85).
|
||||
.LP
|
||||
The default value of start is the first nonassigned sector/cylinder/...
|
||||
.LP
|
||||
The default value of size is as much as possible (until next
|
||||
partition or end-of-disk).
|
||||
.LP
|
||||
However, for the four partitions inside an extended partition,
|
||||
the defaults are: Linux partition, Extended partition, Empty, Empty.
|
||||
.LP
|
||||
But when the \-N option (change a single partition only) is given,
|
||||
the default for each field is its previous value.
|
||||
|
||||
.SH EXAMPLE
|
||||
The command
|
||||
.RS
|
||||
.nf
|
||||
.if t .ft CW
|
||||
sfdisk /dev/hdc << EOF
|
||||
0,407
|
||||
,407
|
||||
;
|
||||
;
|
||||
EOF
|
||||
.if t .ft R
|
||||
.fi
|
||||
.RE
|
||||
will partition /dev/hdc just as indicated above.
|
||||
|
||||
With the \-x option, the number of input lines must be a multiple of 4:
|
||||
you have to list the two empty partitions that you never want
|
||||
using two blank lines. Without the \-x option, you give one line
|
||||
for the partitions inside a extended partition, instead of four,
|
||||
and terminate with end-of-file (^D).
|
||||
(And
|
||||
.B sfdisk
|
||||
will assume that your input line represents the first of four,
|
||||
that the second one is extended, and the 3rd and 4th are empty.)
|
||||
|
||||
.SH "DOS 6.x WARNING"
|
||||
|
||||
The DOS 6.x FORMAT command looks for some information in the first
|
||||
sector of the data area of the partition, and treats this information
|
||||
as more reliable than the information in the partition table. DOS
|
||||
FORMAT expects DOS FDISK to clear the first 512 bytes of the data area
|
||||
of a partition whenever a size change occurs. DOS FORMAT will look at
|
||||
this extra information even if the /U flag is given -- we consider
|
||||
this a bug in DOS FORMAT and DOS FDISK.
|
||||
.LP
|
||||
The bottom line is that if you use sfdisk to change the size of a
|
||||
DOS partition table entry, then you must also use
|
||||
.B dd
|
||||
to zero the first 512 bytes of that partition before using DOS FORMAT to
|
||||
format the partition. For example, if you were using sfdisk to make a DOS
|
||||
partition table entry for /dev/hda1, then (after exiting sfdisk and
|
||||
rebooting Linux so that the partition table information is valid) you
|
||||
would use the command "dd if=/dev/zero of=/dev/hda1 bs=512 count=1" to zero
|
||||
the first 512 bytes of the partition.
|
||||
.B BE EXTREMELY CAREFUL
|
||||
if you use the
|
||||
.B dd
|
||||
command, since a small typo can make all of the data on your disk useless.
|
||||
|
||||
For best results, you should always use an OS-specific partition table
|
||||
program. For example, you should make DOS partitions with the DOS FDISK
|
||||
program and Linux partitions with the Linux sfdisk program.
|
||||
|
||||
.SH "DRDOS WARNINGS"
|
||||
|
||||
Stephen Tweedie reported (930515): `Most reports of superblock
|
||||
corruption turn out to be due to bad partitioning, with one filesystem
|
||||
overrunning the start of the next and corrupting its superblock.
|
||||
I have even had this problem with the supposedly-reliable DRDOS. This
|
||||
was quite possibly due to DRDOS-6.0's FDISK command. Unless I created
|
||||
a blank track or cylinder between the DRDOS partition and the
|
||||
immediately following one, DRDOS would happily stamp all over the
|
||||
start of the next partition. Mind you, as long as I keep a little
|
||||
free disk space after any DRDOS partition, I don't have any other
|
||||
problems with the two coexisting on the one drive.'
|
||||
|
||||
A. V. Le Blanc writes in README.esfdisk: `Dr. DOS 5.0 and 6.0 has been
|
||||
reported to have problems cooperating with Linux, and with this version
|
||||
of efdisk in particular. This efdisk sets the system type
|
||||
to hexadecimal 81. Dr. DOS seems to confuse
|
||||
this with hexadecimal 1, a DOS code. If you use Dr. DOS, use the
|
||||
efdisk command 't' to change the system code of any Linux partitions
|
||||
to some number less than hexadecimal 80; I suggest 41 and 42 for
|
||||
the moment.'
|
||||
|
||||
A. V. Le Blanc writes in his README.fdisk: `DR-DOS 5.0 and 6.0
|
||||
are reported to have difficulties with partition ID codes of 80 or more.
|
||||
The Linux `fdisk' used to set the system type
|
||||
of new partitions to hexadecimal 81. DR-DOS seems to confuse this with
|
||||
hexadecimal 1, a DOS code. The values 82 for swap and 83 for file
|
||||
systems should not cause problems with DR-DOS. If they do, you may use
|
||||
the `fdisk' command `t' to change the system code of any Linux
|
||||
partitions to some number less than hexadecimal 80; I suggest 42 and 43
|
||||
for the moment.'
|
||||
|
||||
In fact, it seems that only 4 bits are significant for the DRDOS FDISK,
|
||||
so that for example 11 and 21 are listed as DOS 2.0. However, DRDOS
|
||||
itself seems to use the full byte. I have not been able to reproduce
|
||||
any corruption with DRDOS or its fdisk.
|
||||
|
||||
.SH BUGS
|
||||
A corresponding interactive
|
||||
.B cfdisk
|
||||
(with curses interface) is still lacking.
|
||||
.LP
|
||||
There are too many options.
|
||||
|
||||
.SH AUTHOR
|
||||
A. E. Brouwer (aeb@cwi.nl)
|
||||
Binary file not shown.
Reference in New Issue
Block a user