ufs/extended partition interference

Marty Leisner (leisner@sdsp.mc.xerox.com)
Wed, 16 Apr 1997 15:56:37 PDT


I put in this patch to tell the difference between
dos extended partitions and freebsd partitions.

It turns out if we're running both DOS extended and freebsd
slices, and we have mounted file systems from fstab in the dos slice,
we have a great deal of problems if they move around... (i.e. the /etc/fstab
gets awfully confused)

I advocate some type of strategy where bsd partions have fixed minor
devices...
(Maybe 10 starts the extended partitions and 20 the freebsd partitions)

System commander also sometimes increases the partition codes by
0x10 (I don't know why).

Freebsd has no problem booting since it obviously looks at the magic, not only
the partition ID.

Its wrt 2.1.34.

--- genhd.c 1997/04/14 12:32:14 1.1
+++ genhd.c 1997/04/15 03:20:59
@@ -396,7 +396,7 @@
continue;
add_partition(hd, minor, first_sector+START_SECT(p), NR_SECTS(p));
if (is_extended_partition(p)) {
- printk(" <");
+ printk(" <DOS: ");
/*
* If we are rereading the partition table, we need
* to set the size of the partition so that we will
@@ -413,8 +413,8 @@
hd->part[minor].nr_sects = 2;
}
#ifdef CONFIG_BSD_DISKLABEL
- if (SYS_IND(p) == BSD_PARTITION) {
- printk(" <");
+ if (SYS_IND(p) == BSD_PARTITION || SYS_IND(p) == 0xb5) {
+ printk(" <BSD: ");
bsd_disklabel_partition(hd, MKDEV(hd->major, minor));
printk(" >");
}

marty leisner@sdsp.mc.xerox.com
Don't confuse education with schooling.
Milton Friedman to Yogi Berra