Mounting Minix v3 on Linux

 

NEW   Since  2.6.21-rc1  this patch is already merged into the sources

 
Patch for v2.4 kernels Patch for v2.6 < .17 kernels Patch for v2.6.17 kernels Patch for v2.6.18 kernels Patch for v2.6.19 kernels Patch for v2.6.20 kernels

 
Patched files for v2.4 kernels Patched files for v2.6 < .17 kernels

        Download and apply (if needed) the appropriate patch according to your version of Linux to update for Minix v3 filesystem support, while maintaining the preexistent v2 and v1 support. If your version is older than the last stabilized one (only concerns to the files to be patched for the oldest kernels << 2.4.32 or << 2.6.16) , the patch will fail to apply. In such a case, download the already patched files ( as tar.gz ), and replace the old ones in your Linux sources tree by the new ones.

      To apply the patch, copy the appropriate diff file into /usr/src/linux, change to that directory and run the test only option:

# patch -bp1 --dry-run   <   v3_2dotN.diff

      If the test was all right, then run:

# patch -bp1   <   v3_2dotN.diff

      The files will be patched, and a copy of the old versions will be saved with the suffix  ~  or orig.

      After that, you have to recompile the kernel with the options:

      CONFIG_MINIX_FS = m

      CONFIG_PARTITION_ADVANCED = y

      CONFIG_MINIX_SUBPARTITION = y

      After installing and rebooting your new kernel, a look at  /var/log/dmesg  will inform you about the devices hdN , hd(N+1) and hd(N+2) into which have been now identified the Minix v3 subpartitions cXdYpZs0, cXdYpZs1 and cXdYpZs2. You have to create 3 directories to mount them and proceed like this, for example:

# mount -t minix   /dev/hdN   /mnt/minix3

# mount -t minix   /dev/hd(N+1)   /mnt/minix3/home

# mount -t minix   /dev/hd(N+2)   /mnt/minix3/usr

       Allways umount in the reverse order. Allow time for the memory cache transfer to disk.

Internals of the patch:

       The modifications made to the preexistent code have been four:

       1.- The layout of the superblock variables is different in version 3. So, the structure minix3_super_block has been introduced.

       2.- Disable writings to s_state because it has been droped out from the superblock, and its former location is now used by another parameter.

       3.- Change the references to the constant BLOCK_SIZE to the variables s_blocksize or b_size, so allowing for multiple block sizes.

       4.- Introduce the new structure minix3_dir_entry to employ 60 characters long names in the new directory entries of 64 bytes.

Linux Kernel 2.4 Useful Patches collected by Willy Tarreau
e-mail 

NEW   Patch to fix backwards compatibility in  mkfs.c  of minix3 : 

 
Patch for stable 3.1.2a Patch for current

 

 Last modified February 22, 2007