This is a first test (alpha) release of an fdisk program for partioning drives using Amiga-RigidDiskBlocks. Be careful! It is easy to destroy your whole data with one touch! Usage: fdisk [device] device default to /dev/hda, enter similiar as desired. You will get a prompt, where you may enter the following commands: q,x will quit without doing anything else s shows your current partition setup p enters a submenue for changing most interesting parts of a parttion l change low cylinder h change high cylinder p change bootpriority b toggle bootable flag m toggle mount flag d change dostype c change number of bootblock (0 for none) d delete a partition n create a new partition w write RDB to disk Sorry for the poor "user-interface", could someone please do some improvement. Look at the todo-section if you feel inspired. Feel free to ask me anything about RDB how and why. I you want to recompile it, two caveats: Have a link "amiga" to the amiga-os system includes. They aren't here for copyright reasons, but can be easily obtained from several Fred Fish CD-Roms (I got them there) or an ftp-site mounted a CD containing them. Replace one absolute path to .../scsi_ioctl.h with yours (possibly starting with /usr/src/linux/...) (This file should IMHO move to .../linux/include/linux.) Don't flame me for bugs, you've been warned about and ask to improve them. For the Dostype-Choice, I have a (tested) proposal: Cite from 'The Amiga Guru Book' from Ralph Babel, Page 561: de_DosType - The DOS type determines a disk's block structure; $444F5300 ('DOS\0')identifies the old filesystem (default), $444F5301 ('DOS\1') the FastFileSystem, and $444F5302 ('DOS\2') and $444F5303 ('DOS\3') the new "international" versions thereof. It is used as the default DOS type by Format, as the 2.0 ROM filesystem is able to handle different formats (see section 17.1.50). The filesystem-private DOS-type identifier as stored in block 0 of a partition determines the actual block structure (see section 15.3.9). For DosEnvec structures that are part of the RDB, de_DosType is also used to indicate the type of partition data, e.g under Amiga-UNIX ( :-) ): UNI\0 - classic AT&T System-V filesystem UNI\1 - UNIX boot "filesystem" (dummy entry for Amiga OS's boot menu) UNI\2 - Berkeley filesystem for System V RESV - reserved (e.g. swap space) Under 2.0, FileSystem.resource entries exist for DOS\1, DOS\2, DOS\3 and UNI\1 (i.e all bootable "filesystems" other than DOS\0, which is always considered to be available as boot filesystem). As different revisions of Commodore's filesystems can handle different sets of partition formats, it is unclear wether de_DosType is used as an alias for the filesystem code to be used (e.g. during autobooting) or as an indicator as to which format the partition is in. Neither of these interpretations is fully consistent with the current usage and existing filesystems and may therefore cause problems. What follows from this for now is: set the DosType of all your Linux partitions to RESV and Flags to noboot,nomount. So they will not appear in the boot menu nor show up anyhow under Amiga OS. set the DosType to RESV and Flags to noboot,mount if you want to share a partition (e.g swap) between Linux and AmigaDos without an appropriate filesystem (e.g. for use with VMM). This gives only the device name without a volume node -> no annoying "Not a Dos disk" icon. set the DosType to UNI\1, Flags to boot,mount (priority as desired) and BootBlocks to 2 of your Linux root partition for use of Amiga-LILO. So the partion will show up in the bootmenu but dissappear silently when booting AmigaDos from another partition. todo: more user friendly input (libcurses) sanity check for paritions (Hi,LoCyl ...) sanity check for RDBs (RDBBlocks ...) everything allocated dynamically use variable blocksize (currently fixed 512) add a feature to read in an ms-dos partition-sector and build an RDB from it. (Should be compatibly reside on the same disk, as the RDB may start anywhere within the first 16 blocks.) Joerg Dorchain, dorchain@cip50.cscip.uni-sb.de