Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ptable(5) — RISC iX 1.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bbutil(8)

bblist(5)

PTABLE(5)  —  UNIX Programmer’s Manual

NAME

ptable − format of partition table structures

SYNOPSIS

#include <dev/partition.h>

DESCRIPTION

The partition table structure contains a list of the partitions on the st506 device. This list describes each of the filesystem partitions held on the disc. 

The structure of the partition table structure as given in the include file is:

/∗
 ∗This is the format of the (now variable) partition table
 ∗which is set up by the disc formatter.
 ∗/
 structpartition_table{
unsignedpart_magic;/∗  Magic number  ∗/
struct{
unsigned  longpart_start;/∗  Abs cylinder number  ∗/
unsigned  longpart_size;/∗  No of cyls  ∗/
unsigned  intpart_flags;/∗  Status  ∗/
charpart_desc[16];/∗  Descriptive text  ∗/
}  part_tab[8];
};
 #definePART_MAGIC0x70617274
 /∗
 ∗Standard partition numbers.
 ∗/
 #definePART_ROOT0
#definePART_SWAP1
#definePART_BOOT6
#definePART_ALL7
 /∗
 ∗Status flags
 ∗/
 #definePART_STAT_CHANGE0x80000000/∗  Has been changed  ∗/
#definePART_STAT_NUNIX  0x40000000/∗  UNIX not allowed  ∗/
#definePART_STAT_NARTHUR0x20000000/∗  Arthur not allowed  ∗/
 /∗
 ∗Location of word giving ADFS partition size in cylinders.
 ∗/
 #defineADFS_GEOM_SECTOR 0xC00
 structadfs_geom_sector{
charspare1[0x1B8];
unsigned  shortlowcurrentcyl;
unsigned  shortprecompcyl;
unsigned  longparkaddress;
unsigned  charl2_secsize;
unsigned  charsecspertrack;
unsigned  charheads;
charspare2[0x1D0-0x1C3];
longdiscsize;
charspare3[0x1FC-0x1D4];
longadfs_part_size_loc;
};
 #defineADFS_PART_CYLS(X) (((X) >> 8) & 0x0000ffff)
#defineADFS_PART_FMT(X) ((X) & 0x0000000f)
 /∗
 ∗This format (type 1).
 ∗/
 #defineADFS_PART_FMT_TYPE1 1
 /∗
 ∗Error codes ORed into return code.
 ∗/
 #definePART_FORMAT_ERROR 1
#definePART_OVERLAP_ERROR 2

The partition table and bad block list are contained in the same RISC iX system cylinder. This cylinder also provides the replacement sectors for the bad blocks. The location of this cylinder is held in the ‘adfs_part_size_loc’ field in the ‘adfs_geom_sector’. This gives the size of the ADFS partition in cylinders. The RISC iX system cylinder is the last cylinder of the ADFS partition. 

Two copies of each structure are held in the system cylinder for security. 

sector 01st partition table copy
sector 12nd partition table copy
sector 21st bad block list copy
sector 31st bad block list copy
sector 42nd bad block list copy
sector 52nd bad block list copy
sector 6start of bad block replacement sectors

SEE ALSO

bbutil(8), bblist(5)

4.2 Berkeley Distribution  —  Revision 1.3 of 11/01/89

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026