add directory Linux-0.12
This commit is contained in:
BIN
Linux-0.12/INSTALL/partition-programs/edpart.arc
Normal file
BIN
Linux-0.12/INSTALL/partition-programs/edpart.arc
Normal file
Binary file not shown.
31
Linux-0.12/INSTALL/partition-programs/edpart.doc
Normal file
31
Linux-0.12/INSTALL/partition-programs/edpart.doc
Normal file
@@ -0,0 +1,31 @@
|
||||
Edpart.exe is a disk partition editor capable of managing up to four
|
||||
partitions on PC/XT and AT hard disks. It specifically says "no
|
||||
copyright", so I figured someone else might like to use it rather than
|
||||
doing fdisk/diskfix pairs to create partitions.
|
||||
|
||||
There's no instruction file and no real on-line help, so here's a
|
||||
summary:
|
||||
|
||||
EDPART.EXE maintains up to four hard disk partitions on either of two
|
||||
hard drives. If it sees more than one hard drive, it will ask which
|
||||
one to edit.
|
||||
|
||||
The commands are:
|
||||
|
||||
CREATE Create hard disk partitions
|
||||
DELETE Delete hard disk partitions
|
||||
STATUS Bootable partitions may have the following status:
|
||||
ACTIVE This partition is the boot partition
|
||||
READ/WRITE R/W, not the boot partition
|
||||
Non-bootable partitions (``extensions'') may be any of:
|
||||
READ/WRITE
|
||||
READ-ONLY
|
||||
INACCESSIBLE
|
||||
TYPE There are four types; for Minix purposes, either "extension"
|
||||
type will do to my knowledge.
|
||||
DOS(4) Bootable For DOS 3.x
|
||||
DOS(4) Extension
|
||||
DOS(1) Bootable For DOS 2.x
|
||||
DOS(1) Extension
|
||||
The "Bootable" partitions are recognized by MS-DOS directly,
|
||||
so I don't advise using either of them for Minix.
|
||||
BIN
Linux-0.12/INSTALL/partition-programs/pdisk.arc
Normal file
BIN
Linux-0.12/INSTALL/partition-programs/pdisk.arc
Normal file
Binary file not shown.
79
Linux-0.12/INSTALL/partition-programs/pdisk.doc
Normal file
79
Linux-0.12/INSTALL/partition-programs/pdisk.doc
Normal file
@@ -0,0 +1,79 @@
|
||||
This stuff is mostly self explanatory, but:
|
||||
part takes one optional argument, which is the disk number with
|
||||
which to start (either 0 or 1. 0 is default).
|
||||
|
||||
286pd1.sys and 286pd2.sys are for driving partitions on your first
|
||||
and second disks, respectively. They will only work on 80186 or higher
|
||||
processors. For 8086/8088 computers, use pdisk1.sys, pdisk2.sys. They
|
||||
are just a *wee* bit slower....
|
||||
|
||||
fdins is for use when you're short of free space in "low menory" --
|
||||
i.e. free interrupt vectors. fdintins, on the other hand, doesn't
|
||||
use up any application space memory. In either case, these programs
|
||||
don't do *anything* directly -- you run them in order to create a
|
||||
.COM program that does the dirty work. You get TBL1.com, TBL2.com,
|
||||
TBL1INT.com, or TBL2INT.com, depending on whether you run fdins,
|
||||
fdintins and specifiy disk 1 or 2 (== 0 or 1).
|
||||
|
||||
pformat is for when you want to be particularly destructive with your
|
||||
new partition. You run "pformat <drive>:" where <drive> must be a
|
||||
valid pdisk. It's good for marking newly developed bad sectors,
|
||||
I guess. Be careful.
|
||||
|
||||
According to tests I ran with the PC Magazine benchmark program, disk access
|
||||
to a pdisk is actually faster than the normal DOS driver (i.e. C: or a DOS
|
||||
3.3/4.x extended DOS partition). (This may only be true using the 286 version,
|
||||
and may be affected by your usage. The main point is that you certainly do
|
||||
not take a performance *cut* by using my program.)
|
||||
|
||||
I am not including most of the COPYING file that comes with stuff from the
|
||||
Free Software Foundation (Richard Stallman, et al.) because I don't know
|
||||
if I'm allowed, but that's what I intend for this software. Specifically,
|
||||
you can *give* away as many copies of this software as you like. You can
|
||||
charge a *reasonable* handling fee. You can even incorporate parts of it
|
||||
into other projects, as long as you distribute at least the source you got
|
||||
from pdisk. I don't want money or contributions, I want plaudits. I hope
|
||||
this software is helpful to you.
|
||||
|
||||
When you find the inevitable bug (there are *none* in the driver, but I
|
||||
don't absolutely swear for the partitioning program), please try to
|
||||
fix it yourself and let me know the solution. Failing that, drop me a
|
||||
line describing the situation exactly, especially including DOS version and
|
||||
all hardware, including fixed disk and controller type. I don;t promise
|
||||
to do anything about it, but I might.
|
||||
|
||||
One thing I recommend from experience: my boot code will only work on some
|
||||
IBM compatibles. It is best to use the manafacturer's (or generic) MSDOS
|
||||
fdisk to set up the initial partition, then use "format c: /s" to set up
|
||||
your bootable DOS partition. If you can get this working right with pdisk,
|
||||
that would be nice.
|
||||
|
||||
have fun. Scott E. Garfinkle
|
||||
smsdpg!seg@uunet.uu.net
|
||||
|
||||
<The following is taken from Project Gnu's AWK distribution, the COPYING
|
||||
File. I hope I'm not violating their copyright, or anything.
|
||||
>
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
BECAUSE PDISK IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY NO
|
||||
WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
|
||||
WHEN OTHERWISE STATED IN WRITING, SCOTT GARFINKLE
|
||||
AND/OR OTHER PARTIES PROVIDE PDISK "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF PDISK IS WITH YOU. SHOULD PDISK PROVE DEFECTIVE, YOU
|
||||
ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL SCOTT GARFINKLE
|
||||
AND/OR ANY OTHER PARTY
|
||||
WHO MAY MODIFY AND REDISTRIBUTE PDISK AS PERMITTED ABOVE, BE LIABLE TO
|
||||
YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER
|
||||
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
||||
INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
|
||||
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A
|
||||
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) PDISK, EVEN
|
||||
IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR
|
||||
ANY CLAIM BY ANY OTHER PARTY.
|
||||
182
Linux-0.12/INSTALL/rawrite.c
Normal file
182
Linux-0.12/INSTALL/rawrite.c
Normal file
@@ -0,0 +1,182 @@
|
||||
/*
|
||||
rawrite.c Write a binary image to a 360K diskette.
|
||||
By Mark Becker
|
||||
|
||||
Usage:
|
||||
MS-DOS prompt> RAWRITE
|
||||
|
||||
And follow the prompts.
|
||||
|
||||
History
|
||||
-------
|
||||
|
||||
1.0 - Initial release
|
||||
1.1 - Beta test (fixing bugs) 4/5/91
|
||||
Some BIOS's don't like full-track writes.
|
||||
1.101 - Last beta release. 4/8/91
|
||||
Fixed BIOS full-track write by only
|
||||
writing 3 sectors at a time.
|
||||
1.2 - Final code and documentation clean-ups. 4/9/91
|
||||
*/
|
||||
#include <alloc.h>
|
||||
#include <bios.h>
|
||||
#include <ctype.h>
|
||||
#include <dir.h>
|
||||
#include <dos.h>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define FALSE 0
|
||||
#define TRUE (!FALSE)
|
||||
|
||||
#define SECTORSIZE 512
|
||||
|
||||
#define RESET 0
|
||||
#define LAST 1
|
||||
#define READ 2
|
||||
#define WRITE 3
|
||||
#define VERIFY 4
|
||||
#define FORMAT 5
|
||||
|
||||
int done;
|
||||
|
||||
/*
|
||||
Catch ^C and ^Break.
|
||||
*/
|
||||
int handler(void)
|
||||
{
|
||||
done = TRUE;
|
||||
return(0);
|
||||
}
|
||||
void msg(char (*s))
|
||||
{
|
||||
fprintf(stderr, "%s\n", s);
|
||||
_exit(1);
|
||||
}
|
||||
/*
|
||||
Identify the error code with a real error message.
|
||||
*/
|
||||
void Error(int (status))
|
||||
{
|
||||
switch (status) {
|
||||
case 0x00: msg("Operation Successful"); break;
|
||||
case 0x01: msg("Bad command"); break;
|
||||
case 0x02: msg("Address mark not found"); break;
|
||||
case 0x03: msg("Attempt to write on write-protected disk"); break;
|
||||
case 0x04: msg("Sector not found"); break;
|
||||
case 0x05: msg("Reset failed (hard disk)"); break;
|
||||
case 0x06: msg("Disk changed since last operation"); break;
|
||||
case 0x07: msg("Drive parameter activity failed"); break;
|
||||
case 0x08: msg("DMA overrun"); break;
|
||||
case 0x09: msg("Attempt to DMA across 64K boundary"); break;
|
||||
case 0x0A: msg("Bad sector detected"); break;
|
||||
case 0x0B: msg("Bad track detected"); break;
|
||||
case 0x0C: msg("Unsupported track"); break;
|
||||
case 0x10: msg("Bad CRC/ECC on disk read"); break;
|
||||
case 0x11: msg("CRC/ECC corrected data error"); break;
|
||||
case 0x20: msg("Controller has failed"); break;
|
||||
case 0x40: msg("Seek operation failed"); break;
|
||||
case 0x80: msg("Attachment failed to respond"); break;
|
||||
case 0xAA: msg("Drive not ready (hard disk only"); break;
|
||||
case 0xBB: msg("Undefined error occurred (hard disk only)"); break;
|
||||
case 0xCC: msg("Write fault occurred"); break;
|
||||
case 0xE0: msg("Status error"); break;
|
||||
case 0xFF: msg("Sense operation failed"); break;
|
||||
}
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
Identify what kind of diskette is installed in the specified drive.
|
||||
Return the number of sectors per track assumed as follows:
|
||||
9 - 360 K and 720 K 5.25".
|
||||
15 - 1.2 M HD 5.25".
|
||||
18 - 1.44 M 3.5".
|
||||
*/
|
||||
int nsects(int (drive))
|
||||
{
|
||||
static int nsect[] = {18, 15, 9};
|
||||
|
||||
char *buffer;
|
||||
int i, status;
|
||||
/*
|
||||
Read sector 1, head 0, track 0 to get the BIOS running.
|
||||
*/
|
||||
buffer = (char *)malloc(SECTORSIZE);
|
||||
biosdisk(RESET, drive, 0, 0, 0, 0, buffer);
|
||||
status = biosdisk(READ, drive, 0, 10, 1, 1, buffer);
|
||||
if (status == 0x06) /* Door signal change? */
|
||||
status = biosdisk(READ, drive, 0, 0, 1, 1, buffer);
|
||||
|
||||
for (i=0; i < sizeof(nsect)/sizeof(int); ++i) {
|
||||
biosdisk(RESET, drive, 0, 0, 0, 0, buffer);
|
||||
status = biosdisk(READ, drive, 0, 0, nsect[i], 1, buffer);
|
||||
if (status == 0x06)
|
||||
status = biosdisk(READ, drive, 0, 0, nsect[i], 1, buffer);
|
||||
if (status == 0x00) break;
|
||||
}
|
||||
if (i == sizeof(nsect)/sizeof(int)) {
|
||||
msg("Can't figure out how many sectors/track for this diskette.");
|
||||
}
|
||||
free(buffer);
|
||||
return(nsect[i]);
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
char fname[MAXPATH];
|
||||
char *buffer, *pbuf;
|
||||
int count, fdin, drive, head, track, status, spt, buflength, ns;
|
||||
|
||||
puts("RaWrite 1.2 - Write disk file to raw floppy diskette\n");
|
||||
ctrlbrk(handler);
|
||||
printf("Enter source file name: ");
|
||||
scanf("%s", fname);
|
||||
_fmode = O_BINARY;
|
||||
if ((fdin = open(fname, O_RDONLY)) <= 0) {
|
||||
perror(fname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("Enter destination drive: ");
|
||||
scanf("%s", fname);
|
||||
drive = fname[0];
|
||||
drive = (islower(drive) ? toupper(drive) : drive) - 'A';
|
||||
printf("Please insert a formatted diskette into ");
|
||||
printf("drive %c: and press -ENTER- :", drive + 'A');
|
||||
while (bioskey(1) == 0) ; /* Wait... */
|
||||
if ((bioskey(0) & 0x7F) == 3) exit(1); /* Check for ^C */
|
||||
putchar('\n');
|
||||
done = FALSE;
|
||||
/*
|
||||
* Determine number of sectors per track and allocate buffers.
|
||||
*/
|
||||
spt = nsects(drive);
|
||||
buflength = spt * SECTORSIZE;
|
||||
buffer = (char *)malloc(buflength);
|
||||
printf("Number of sectors per track for this disk is %d\n", spt);
|
||||
printf("Writing image to drive %c:. Press ^C to abort.\n", drive+'A');
|
||||
/*
|
||||
* Start writing data to diskette until there is no more data to write.
|
||||
*/
|
||||
head = track = 0;
|
||||
while ((count = read(fdin, buffer, buflength)) > 0 && !done) {
|
||||
pbuf = buffer;
|
||||
for (ns = 1; count > 0 && !done; ns+=3) {
|
||||
printf("Track: %02d Head: %2d Sector: %2d\r", track, head, ns);
|
||||
status = biosdisk(WRITE, drive, head, track, ns, 3, pbuf);
|
||||
|
||||
if (status != 0) Error(status);
|
||||
|
||||
count -= (3*SECTORSIZE);
|
||||
pbuf += (3*SECTORSIZE);
|
||||
}
|
||||
if ((head = (head + 1) & 1) == 0) ++track;
|
||||
}
|
||||
if (eof(fdin)) {
|
||||
printf("\nDone.\n");
|
||||
biosdisk(2, drive, 0, 0, 1, 1, buffer); /* Retract head */
|
||||
}
|
||||
} /* end main */
|
||||
86
Linux-0.12/INSTALL/rawrite.doc
Normal file
86
Linux-0.12/INSTALL/rawrite.doc
Normal file
@@ -0,0 +1,86 @@
|
||||
RaWrite 1.2
|
||||
-----------
|
||||
|
||||
Purpose
|
||||
-------
|
||||
|
||||
Write a disk image file to a 360K floppy disk.
|
||||
|
||||
|
||||
Equipment/Software Requirements
|
||||
-------------------------------
|
||||
|
||||
PC/XT/AT with a floppy disk drive capable of reading and writing a 360K
|
||||
diskette.
|
||||
|
||||
This program uses generic low-level BIOS diskette read/write functions. It
|
||||
should be portable to nearly every PC in existance. PS/2's should be able
|
||||
to run RawWrite but this has not been tested.
|
||||
|
||||
|
||||
CAVEAT
|
||||
------
|
||||
|
||||
This program will write ANY disk file to a floppy, overwriting any previous
|
||||
information that may have been present. If you wish to re-use a diskette
|
||||
under MS-DOS thats been written to by RawWrite then the disk will need to be
|
||||
reformatted; all MS-DOS specific information will have been erased.
|
||||
|
||||
|
||||
How to Compile
|
||||
--------------
|
||||
|
||||
TCC rawrite.c
|
||||
|
||||
The source code is specific to Borland International's Turbo C 2.01 and has
|
||||
been tested in all memory models.
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
C> RAWRITE
|
||||
|
||||
And follow the prompts. All arguments are case-insensitive.
|
||||
|
||||
A sample run is shown below. The disk file being written, in this example,
|
||||
is named DEMODISK and the destination - where the image is being written -
|
||||
is the B: drive.
|
||||
|
||||
This program may be aborted at any time by typing ^C.
|
||||
|
||||
|
||||
Sample Run
|
||||
----------
|
||||
|
||||
C> RAWRITE
|
||||
RaWrite 1.2 - Write disk file to raw floppy diskette
|
||||
|
||||
Enter source file name: DEMODISK
|
||||
Enter destination drive: B
|
||||
Please insert a formatted 360K diskette into drive B: and press -ENTER- :
|
||||
Writing image to drive B:
|
||||
|
||||
|
||||
Errors
|
||||
------
|
||||
|
||||
RaWrite attempts to determine if the diskette is a 360K, 720K, 1.2M, or
|
||||
1.44M diskette by reading specific sectors. If the inserted diskette is not
|
||||
one of the mentioned types, then RaWrite will abort with a short error
|
||||
message.
|
||||
|
||||
Errors such as write protect, door open, bad disk, bad sector, etc. cause a
|
||||
program abort with a short error message.
|
||||
|
||||
|
||||
History
|
||||
-------
|
||||
|
||||
1.0 - Initial release
|
||||
1.1 - Beta test (fixing bugs) 4/5/91
|
||||
Some BIOS's don't like full-track writes.
|
||||
1.101 - Last beta release. 4/8/91
|
||||
Fixed BIOS full-track write by only only
|
||||
writing 3 sectors at a time.
|
||||
1.2 - Final code and documentation clean-ups. 4/9/91
|
||||
BIN
Linux-0.12/INSTALL/rawrite.exe
Normal file
BIN
Linux-0.12/INSTALL/rawrite.exe
Normal file
Binary file not shown.
Reference in New Issue
Block a user