With the current CVS tree I can't read my several minix partitions on
the 386SX (the ones I used to test several versions of my embedded
system).

The reason for this is that they are type 0x81 and fsys_minix refuses
to deal with them. Since all minix fs's created under Linux are
marked 0x81 (that's what Linus told us), 0x81 must be accepted.

        Request for comments:

Personally, I'd better remove all checks about partition types
from the fsys_*.c files (like ffs_mount() and reiserfs_mount() that
have no such checks).  The partition type as stored in the partition
table is only a hint, not authoritative information. After I dropped
the 5MB dos partition from my first hard drive by calling mke2fs on
it, it remained type DOS12 in the partition table for years and I
didn't even remember. I don't want to be forced to enter fdisk
whenever I create a different filesystem on a partition, and I don't
want GRUB to force me to do that.

I disagree with the documentation, when it says that the partition
type represents the filesystem type. It doesn't. It represents
anything the user wants to see (and possibly what the OS wants to see).

The filesystem type is identified by its own magic number that is
within the partition. While it's true that some bad OS's only run on
dos partition tables and depend on that ID, real operating systems
don't. GRUB shouldn't force things to be "as broken as dos".

If Okuji accepts to remove such check before checking the magic
number, I'll proceed for both minix and ext2. FAT checks must remain
as FAT has no magic number (and the Linux kernel makes a hell of
ensuring it actually is a FAT partition -- sorry for having no other
kernel experience). If check removal is accepted, this patch must be
dropped, obviously.

/alessandro


Index: ChangeLog
===================================================================
RCS file: /cvs/grub/ChangeLog,v
retrieving revision 1.316
diff -u -d -u -r1.316 ChangeLog
--- ChangeLog   2000/09/08 21:30:16     1.316
+++ ChangeLog   2000/09/08 23:14:22
@@ -1,3 +1,8 @@
+2000-09-09  Alessandro Rubini  <[EMAIL PROTECTED]>
+
+       * stage2/fsys_minix.c (minix_mount): accept partition type 0x81
+       * stage2/pc_slice.h (PC_SLICE_TYPE_LINUXMINIX): name for type 0x81
+
 2000-09-09  OKUJI Yoshinori  <[EMAIL PROTECTED]>
 
        From Alessandro Rubini:
Index: stage2/fsys_minix.c
===================================================================
RCS file: /cvs/grub/stage2/fsys_minix.c,v
retrieving revision 1.4
diff -u -d -u -r1.4 fsys_minix.c
--- stage2/fsys_minix.c 1999/09/29 09:28:37     1.4
+++ stage2/fsys_minix.c 2000/09/08 23:14:23
@@ -162,6 +162,7 @@
 {
   if (((current_drive & 0x80 || current_slice != 0))
       && (current_slice != PC_SLICE_TYPE_MINIX)
+      && (current_slice != PC_SLICE_TYPE_LINUXMINIX)
       && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_OTHER))
     return 0;                  /* The partition is not of MINIX type */
   
Index: stage2/pc_slice.h
===================================================================
RCS file: /cvs/grub/stage2/pc_slice.h,v
retrieving revision 1.9
diff -u -d -u -r1.9 pc_slice.h
--- stage2/pc_slice.h   2000/05/13 04:13:00     1.9
+++ stage2/pc_slice.h   2000/09/08 23:14:23
@@ -110,6 +110,7 @@
 #define PC_SLICE_TYPE_FAT16_LBA                0xe
 #define PC_SLICE_TYPE_WIN95_EXTENDED   0xf
 #define PC_SLICE_TYPE_MINIX            0x80
+#define PC_SLICE_TYPE_LINUXMINIX       0x81
 #define PC_SLICE_TYPE_EXT2FS           0x83
 #define PC_SLICE_TYPE_LINUX_EXTENDED   0x85
 

Reply via email to