Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!bellcore!faline!ulysses!gatech!mcdchg!usenet From: portier@dutesta.uucp (Robert Portier) Newsgroups: comp.unix Subject: AIX floppy file system layout question. Message-ID: <1647@mcdchg.UUCP> Date: Wed, 9-Sep-87 01:43:13 EDT Article-I.D.: mcdchg.1647 Posted: Wed Sep 9 01:43:13 1987 Date-Received: Fri, 11-Sep-87 01:01:41 EDT Sender: usenet@mcdchg.UUCP Organization: Delft University of Technology, Netherlands Lines: 74 Keywords: IBM PC-RT or is it IBM RT-PC. Approved: usenet@mcdchg.UUCP In comp.sys.ibm.pc.rt nobody replied. So I try again in other newsgroups: Hello out there, Does anyone know something about the layout of the (AIX) file system on the floppy of the IBM RT-PC? We are trying to implement a file system supporting indexed files on the (high density) floppy drive. According to the AIX OS Technical Reference the structure of the superblock is compatible with the file system of the IBM PC/IX. The format of the PC/IX-format file sytem superblock as given in the AIX Operating System Technical Reference (june 3 1986, page 4-76) is: typedef struct filsys { ushort s_isize; /* size in blocks of i-list */ daddr_t s_fsize; /* size in blocks of entire volume */ short s_nfree; /* number of address in s_free */ daddr_t s_free[NICFREE]; /* free block list */ short s_ninode; /* number of inodes in s_inode */ ino_t s_inode[NICINOD]; /* free I-node list */ char s_flock; /* lock during free list manipulation */ char s_ilock; /* lock during i-list manipulation */ char s_fmod; /* superblock modified flag */ char s_ronly; /* mounted read-only flag */ time_t s_time; /* last superblock update */ short s_dinfo[4]; /* device information */ daddr_t s_tfree; /* total free blocks */ ino_t s_tinode; /* total free i-nodes */ char s_fname[6]; /* file system name */ char s_fpack[6]; /* file system pack name */ long s_fill[13]; /* fill out to 512 bytes */ daddr_t s_swaplo; /* start of swap area */ daddr_t s_nswap; /* number of blocks of swap */ long s_magic; /* magic number of file system */ long s_type; /* file system type -cluster size */ }; #define s_m s_dinfo[0] /* modulo factor in superblock */ #define s_n s_dinfo[1] /* cylinder size in superblock */ #define s_bsize s_dinfo[2] /* block size for this file system */ Mapping block 1 of the floppy (which should be the superblock) on to the superblock structure given above and extracting information, gives us no more information than the file system name and file system pack name. Trying to extract other information from the structure results in *garbage*. (While mapping the superblock to the the structure, we have taken into account the 8 pad bytes which the compiler adds to the structure to align the 4-byte data types.) Typing the command 'od -dc /dev/fd0 0.' or 'od -dc /dev/rfd0 0.' has lead us to believe that some of the information that is usually present in the superblock, like the file system size and block size, are actually stored in the bootblock (block 0 on the floppy). Are we doing something wrong, or what? Can someone enlighten us. We appreciate any help. Robert & Apoorv. [non-relevent long quote elided. -mod] -- ########################################################################### Robert John Portier | UUCP: ..!mcvax!dutrun!dutesta!portier Delft University of Technology | Faculty of Electical Engineering | Department of Digital Systems | and Computer Architecture | The Netherlands |