table of contents
MAC-FDISK(8) | Apple Disk Partitioning Manual | MAC-FDISK(8) |
NAME¶
mac-fdisk - Apple partition table editor for LinuxSYNOPSIS¶
mac-fdisk [ -h | --help ] [ -v | --version ] [ -l | --list device ... ]DESCRIPTION¶
mac-fdisk is a command line type program which partitions disks using the standard Apple disk partitioning scheme described in "Inside Macintosh: Devices". The device is usually one of the following:/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/hda /dev/hdb
/dev/sda is the first hard disk on the SCSI bus (i.e. the one with the lowest id), /dev/sdb is the second hard disk, and so on. The partition is a device name followed by a partition number. The partition number is the index (starting from one) of the partition map entry in the partition map (and the partition map itself occupies the first entry). For example, /dev/sda2 is the partition described by the second entry in the partiton map on /dev/sda.
OPTIONS¶
- -v | --version
- Prints version number of the mac-fdisk program.
- -h | --help
- Prints a list of available commands for the mac-fdisk program.
- -l | --list
- Lists the partition tables for the specified device(s). With no device(s) given, lists all SCSI and IDE devices found in the system.
- -r | --readonly
- Prevents mac-fdisk from writing to the device.
Editing Partition Tables¶
An argument which is simply the name of a device indicates that mac-fdisk should edit the partition table of that device. Once started, mac-fdisk presents an interactive command prompt to edit the partition table. The partition editing commands are:h list available commands p print (list) the current edited partition table status P print ordered by base address i initialize the partition map s change size of partition map b create new 800K Apple_Bootstrap partition (used by yaboot) c create new standard Linux type partition C create new partition, specifying the partition type d delete a partition r reorder partition entry w write the partition table to disk q quit
Commands which take arguments prompt for each argument in turn. You can also type the arguments separated by spaces and those prompts will be skipped. The i and w commands will prompt for confirmation. None of the editing you do will actually affect the state of the disk you are partitioning until the w command is issued. Then the map in its edited state will be permanently written to the disk.
Command (? for help): p /dev/sdb # type name length base ( size ) system /dev/sdb1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map /dev/sdb2 Apple_Driver43 Macintosh 54 @ 64 ( 27.0k) Driver 4.3 /dev/sdb3 Apple_Driver43 Macintosh 74 @ 118 ( 37.0k) Driver 4.3 /dev/sdb4 Apple_Driver_IOKit Macintosh 512 @ 192 (256.0k) Unknown /dev/sdb5 Apple_Patches Patch Partition 512 @ 704 (256.0k) Unknown /dev/sdb6 Apple_HFS untitled 3072000 @ 1216 ( 1.5G) HFS /dev/sdb7 Apple_HFS untitled 2 333026 @ 3073216 (162.6M) HFS /dev/sdb8 Apple_Free Extra 10 @ 3406242 ( 5.0k) Free space Block size=512, Number of Blocks=3406252 DeviceType=0x0, DeviceId=0x0 Drivers- 1: @ 64 for 22, type=0x1 2: @ 118 for 36, type=0xffff
1) The base address of the start of the partition.
You can specify a number in blocks (most likely reading from the
existing partition map) or you can also type a partition number
followed by the letter 'p' to indicate that the new partition
should take the place of that existing free space partition.
2) The length of the partition.
Again, you can specify a number in blocks or type a partition
number followed by the letter 'p' to indicate use of the entire
partition. You can also type a number followed by 'k', 'm', or
'g' to indicate the size in kilobytes, megabytes, or gigabytes
respectively. (These are powers of 1024, of course, not powers
of 1000.)
3) The name of the partition.
This can be a single word without quotes, or a string surrounded
by single or double quotes. It is best to name any swap partition
you create `swap'; other partition names are up to you. The names
are not visible to Linux.
BUGS¶
Some people believe there should really be just one disk partitioning utility.SEE ALSO¶
fdisk(8), mkswap(8), mkfs(8)AUTHOR¶
Eryk Vershen (eryk@apple.com), man page revised by Chris Tillman (tillman@azstarnet.com)1 December 2001 | Debian |