grub: mounting ext2fs on GNU/Hurd partitions.
Hi!
I found it somewhat irritating that grub refused to mount my Hurd
partition unless I set the partition type to Linux native. The following
patch will allow ext2 filesystems on GNU/Hurd partitions (type 0x63) as
well. Maybe the whole sanity check regarding partition types should be
dropped?
Regards,
Daniel. (Am I really the first who sent such a patch???)
---[snip]---
diff -urN grub-0.5.91/shared_src/fsys_ext2fs.c grub-0.5.91-dk1/shared_src/fsys_ext2fs.c
--- grub-0.5.91/shared_src/fsys_ext2fs.c Mon Mar 15 03:08:08 1999
+++ grub-0.5.91-dk1/shared_src/fsys_ext2fs.c Fri Jul 9 19:42:15 1999
@@ -254,7 +254,8 @@
int retval = 1;
if ((((current_drive & 0x80) || (current_slice != 0))
- && (current_slice != PC_SLICE_TYPE_EXT2FS)
+ && (current_slice != PC_SLICE_TYPE_LINUX_NATIVE)
+ && (current_slice != PC_SLICE_TYPE_GNU_HURD)
&& (current_slice != (PC_SLICE_TYPE_BSD | (FS_OTHER << 8))))
|| part_length < (SBLOCK + (sizeof (struct ext2_super_block) / DEV_BSIZE))
|| !devread (SBLOCK, 0, sizeof (struct ext2_super_block),
diff -urN grub-0.5.91/shared_src/pc_slice.h grub-0.5.91-dk1/shared_src/pc_slice.h
--- grub-0.5.91/shared_src/pc_slice.h Sun Feb 28 19:37:41 1999
+++ grub-0.5.91-dk1/shared_src/pc_slice.h Fri Jul 9 19:49:44 1999
@@ -102,7 +102,8 @@
#define PC_SLICE_TYPE_FAT16_LT32M 4
#define PC_SLICE_TYPE_EXTENDED 5
#define PC_SLICE_TYPE_FAT16_GT32M 6
-#define PC_SLICE_TYPE_EXT2FS 0x83
+#define PC_SLICE_TYPE_GNU_HURD 0x63
+#define PC_SLICE_TYPE_LINUX_NATIVE 0x83
/* this next one is special, as it uses it's own partitioning scheme
to subdivide the PC partition from there */
Reply to: