Home | History | Annotate | only in /src/external/bsd/pdisk/dist
Up to higher level directory
NameDateSize
ATA_media.c23-Mar-201329.3K
ATA_media.h23-Mar-20131.4K
bitfield.c23-Mar-20132.3K
bitfield.h23-Mar-20131.9K
convert.c23-Mar-20134.8K
convert.h23-Mar-20131.5K
cvt_pt.c23-Mar-20133.8K
deblock_media.c23-Mar-20138.1K
deblock_media.h23-Mar-20131.2K
DoSCSICommand.c23-Mar-201319K
DoSCSICommand.h23-Mar-20133.2K
dpme.h23-Mar-20138K
dump.c23-Mar-201322K
dump.h23-Mar-20131.7K
errors.c23-Mar-20133.6K
errors.h23-Mar-20131.4K
file_media.c23-Mar-201312.2K
file_media.h23-Mar-20131.3K
hfs_misc.c23-Mar-20136.5K
hfs_misc.h23-Mar-2013381
HISTORY23-Mar-20132.5K
io.c10-Aug-20237.9K
io.h23-Mar-20131.7K
layout_dump.c23-Mar-20134.2K
layout_dump.h23-Mar-20131.5K
MacSCSICommand.h23-Mar-201316.4K
makefile23-Mar-20134K
media.c23-Mar-20133.4K
media.h23-Mar-20134.1K
partition_map.c20-Oct-201334.7K
partition_map.h23-Mar-20133.5K
pathname.c23-Mar-20135.4K
pathname.h23-Mar-20131.3K
pdisk.823-Mar-20136.4K
pdisk.c23-Mar-201326K
pdisk.h23-Mar-20131.2K
pdisk.html23-Mar-201314.4K
pdisk.mac.bin23-Mar-201362.5K
pdisk.mac.data/Today
pdisk.r23-Mar-20138.3K
README23-Mar-20136K
SCSI_media.c23-Mar-201323.5K
SCSI_media.h23-Mar-20131.5K
util.c23-Mar-20133.6K
util.h23-Mar-20131.4K
validate.c23-Mar-201310.3K
validate.h23-Mar-20131.2K
version.h23-Mar-20132.2K

README

      1 Product name:	pdisk
      2 Version:	0.8
      3 Ship date:	16 May 2000
      4 Company name:	n/a
      5 Author name:	Eryk Vershen
      6 
      7 Description:	A low-level Apple partition table editor for Linux.
      8 		A MacOS version exists for "standalone" use.
      9 
     10 What's New:	Clean up sources - fix naming, delete old email addresses
     11 		Added support for display of Mac volume names
     12 		Added cvt_pt target (for LinuxPPC team)
     13 		Fix block 0 display to show logical offset of drivers
     14 		Require confimation of quit without write
     15 		Fix iteration to not complain about missing devices
     16 		Warn when creating/writing a map with more than 15 entries
     17 		Make initial window larger in Mac version
     18 		Fix ATA support to scan buses correctly
     19 		Fix linux names (in MacOS) to work right when many devices
     20 		Change so WORM devices are considered 'CDs'
     21 
     22 Last time:	Added support for ATA/IDE disks without LBA capability
     23 		Fixed bug - create partition with unmodified size failed
     24 		Added support for new (DR3) MkLinux names - show MkLinux
     25 		name when displaying under another name and allow the
     26 		MkLinux name to be used on input.
     27 
     28 Requirements:	Linux PPC - just run the binary
     29 		MacOS - Distributed binaries for PowerPC or 68000
     30 			I haven't tried it except on 7.6.1 and 8.0
     31 
     32 Price:		Free
     33 
     34 Legalese:	
     35     Modifications copyright 2000 by Eryk Vershen
     36     
     37     Copyright 1996,1997,1998 by Apple Computer, Inc.
     38     All Rights Reserved 
     39 
     40     Permission to use, copy, modify, and distribute this software and 
     41     its documentation for any purpose and without fee is hereby granted, 
     42     provided that the above copyright notice appears in all copies and 
     43     that both the copyright notice and this permission notice appear in 
     44     supporting documentation. 
     45 
     46     APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 
     47     INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
     48     FOR A PARTICULAR PURPOSE. 
     49 
     50     IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 
     51     CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
     52     LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 
     53     NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 
     54     WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
     55 
     56 
     57 Contact Info:	You can send mail to the author. There is  no guarantee of
     58 		a response, but it is your best hope of getting a bug fixed
     59 		or a feature added.
     60 
     61 
     62 Other info:
     63 
     64 
     65 READ the html file or the man page.
     66 
     67 
     68 Finding out about apple partitioning
     69 ------------------------------------
     70 The best curently available documentation on the Apple disk partitioning scheme
     71 is "Technote 1189: The Monster Disk Drive Technote".  This release is not
     72 completely in sync with that technote.  Maybe next time.
     73 		
     74 
     75 Building the macintosh application
     76 ----------------------------------
     77 I have only built this under Code Warrior Pro.  The project file is included.
     78 Thanks to Martin Minow for the SCSI support code.
     79 
     80 
     81 Some notes on the apple partitioning
     82 ------------------------------------
     83 The apple disk partitioning scheme was developed in 1986. It attempted to
     84 be forward thinking as it was intended to handle drives of sizes up to several
     85 hundred megabytes.  There was a design document, but like most such documents
     86 it was neither complete nor unambiguous.
     87 
     88 While the original intent was to handle various block sizes, in practice
     89 most devices use a partitioning block size of 512 bytes.
     90 Since the various address fields are 32 bits unsigned this means the format
     91 can handle disks up to 2 Terabytes in size.  (32bits + 9 bits = 41 bits)
     92 Because the format was designed around SCSI, there is no knowledge of
     93 cylinders or heads, all block address are in absolute sector form.
     94 A correct map should describe every block on the disk except for block zero.
     95 
     96 An aside on CDROMs.  Most old apple CDROMs have incorrect data in block zero.
     97 Since the HFS file-system could only handle 512 byte blocks, apple drives had
     98 a special mode where they would do deblocking (i.e. converting 2k blocks
     99 into four 512byte blocks and accepting 512byte block addresses.)  The partition
    100 maps laid down on these disks are for the deblocked form.  In many cases the
    101 partition maps they contain have only the minimum number of fields correct.
    102 At least one CDROM I have seen doesn't even contain a partition map at all,
    103 but is simply an HFS volume.
    104 Bootable CD-ROMs have even stranger partition maps since two are laid down:
    105 one at 2K offsets and one at 512-byte offsets.  If you notice that these
    106 overlap then you begin to get an idea of how wierd these maps can be.
    107 Apple refers to this "technique" as ghost partitioning.
    108 
    109 The documentation in Inside Macintosh is only partially correct.
    110 The boot-arguments field was left out.  A/UX used the boot arguments field
    111 for something that was called the bzb (block zero block - don't ask me why).
    112 This structure evolved over the course of A/UX.  I have recapitulated this
    113 in the dpme.h header file.
    114 
    115 
    116 Making a disk with Apple & Intel partitioning
    117 ---------------------------------------------
    118 Don't cringe. I know it is an awful hack, but sometimes...
    119 While I don't recommend doing this, it can be useful.
    120 The procedure below is what we did.
    121 
    122 The intel map can contain NO MORE THAN FOUR PRIMARY PARTITIONS.
    123 You can't have any extended or logical partitions.  (Well, you might get it
    124 to work but I wouldn't want to try it.)  The disk will NOT BE INTEL BOOTABLE.
    125 
    126 1) Use pdisk to initialize an apple partition map.  Don't add any partitions
    127    yet, just write the map out and quit.
    128 
    129 2) Use fdisk to create the primary partitions.  Go into the expert 'x' menu
    130    in fdisk and print out the table with the sector addresses.  Write the
    131    start and lengths down some where.  Write the table out.
    132 
    133 3) Use pdisk again.  Shrink the partition map down, if necessary, so it
    134    does not overlap any intel partition.  Create an apple partition for each
    135    intel partition using the start and length value you got from fdisk.
    136    Write out the map and quit.
    137 
    138 At present file systems are not compatible between Linux & MkLinux, but you
    139 can tar stuff into these partitions and tar them out on another machine.
    140 
    141 
    142 
    143 Good luck,
    144 
    145 -eryk vershen
    146  software mechanic
    147  eryk (a] cfcl.com
    148