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