Hello, Klaus!

Thank you for your work on the Minix support in the GNU GRUB!

You write in a comment that only minixfs version 1 is supported.
mkfs.minix from util-linux 2.9n creates minixfs marked as 0x138F
(MINIX_SUPER_MAGIC2)

If I understand correctly, it is also minixfs version 1 (not 2), but
with filenames up to 30 characters.

If such filesystems will not be supported in the next releaseog GRUB, I
expect many bugreports about broken minixfs support.

I have patched GRUB so that it accepts MINIX_SUPER_MAGIC2 as a supported
magic number. The patch is attached.

I haven't encountered any problems with such filesystems (I tested only
diskettes). Long filenames are truncated to 14 characters (which is not a
big deal for GRUB).

Menu loading is Ok. minix_stage1_5 is also Ok.

Probably it is safe to enable support for MINIX_SUPER_MAGIC2 without
further changes.
If yes, the Changelog entry:

        stage2/fsys_minix.c: enabled support for modified minixfs
        version 1 (maximum length of filenames 30)

Of course, the cleanest solution would be to distinguish between 
different flavours of the minixfs, but I believe it's not worth the
trouble.

Pavel Roskin
Index: stage2/fsys_minix.c
===================================================================
RCS file: /gd/gnu/anoncvsroot/grub/stage2/fsys_minix.c,v
retrieving revision 1.1
diff -u -r1.1 fsys_minix.c
--- fsys_minix.c        1999/08/26 09:42:57     1.1
+++ fsys_minix.c        1999/08/28 11:51:20
@@ -171,7 +171,8 @@
                        (sizeof (struct minix_super_block) / DEV_BSIZE))
       || ! devread (SBLOCK, 0, sizeof (struct minix_super_block),
                    (char *) SUPERBLOCK)
-      || SUPERBLOCK->s_magic != MINIX_SUPER_MAGIC)
+      || ((SUPERBLOCK->s_magic != MINIX_SUPER_MAGIC)
+       && (SUPERBLOCK->s_magic != MINIX_SUPER_MAGIC2)))
     retval = 0;
 
   return retval;

Reply via email to