Bug#22056: The kernel does not recognise the WIN95_EXTENDED partition type (fwd)

Herbert Xu (herbert@gondor.apana.org.au)
Sun, 3 May 1998 23:04:52 +1000 (EST)


Please cc 22056-forwarded@bugs.debian.org, gouget@metaintegration.net and me
when replying. Thanks.

----- Forwarded message from Francois Gouget -----

Package: kernel-source-2.0.33
Version: kernel-source-2 2.0.33-7

On disks with more than 1023 cylinders, for example 9GB disks, the
extended partitions that Windows 95 creates have the id 0x0f. Microsoft
probably introduced this partition type for the same reasons
LINUX_EXTENDED (0x85) was introduced.
On such a computer the lack of kernel and fdisk/cfdisk support for
this type of partition makes it impossible to install Linux without
first destroying the Win95 Extended partition. Thus the kernel included
on the installation disks should also be modified.
The format of WIN95_EXTENDED is the same as that of the regular
Extended partition and thus modifying the kernel to recognize it is
simple.
I include below the patch that I used to get my kernel to recognize my
extended partition. See also the related fdisk, cfdisk bug report
21779. I will also put these patches on my Web site, see
http://www.mygale.org/~fgouget/apps/

diff -Naur kernel-source-2.0.33/drivers/block/genhd.c
kernel-source-2.0.33.new/drivers/block/genhd.c
--- kernel-source-2.0.33/drivers/block/genhd.c Mon Aug 4 11:45:55
1997
+++ kernel-source-2.0.33.new/drivers/block/genhd.c Thu Apr 30
22:35:54 1998
@@ -102,6 +102,7 @@
static inline int is_extended_partition(struct partition *p)
{
return (SYS_IND(p) == DOS_EXTENDED_PARTITION ||
+ SYS_IND(p) == WIN95_EXTENDED_PARTITION ||
SYS_IND(p) == LINUX_EXTENDED_PARTITION);
}

diff -Naur kernel-source-2.0.33/include/linux/genhd.h
kernel-source-2.0.33.new/include/linux/genhd.h
--- kernel-source-2.0.33/include/linux/genhd.h Fri Apr 17 20:17:32
1998
+++ kernel-source-2.0.33.new/include/linux/genhd.h Thu Apr 30
22:36:38 1998
@@ -24,6 +24,7 @@
/* These two have identical behaviour; use the second one if DOS fdisk
gets
confused about extended/logical partitions starting past cylinder
1023. */
#define DOS_EXTENDED_PARTITION 5
+#define WIN95_EXTENDED_PARTITION 0x0f
#define LINUX_EXTENDED_PARTITION 0x85

#define DM6_PARTITION 0x54 /* has DDO: use xlated geom &
offset */

--
Francois Gouget
fgouget@mygale.org -- http://www.mygale.org/~fgouget/

----- End of forwarded message from Francois Gouget -----

-- 
Debian GNU/Linux 1.3 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu