Re: Linux doesn't recognize BSD disklabel...

From: Andries Brouwer (aeb@veritas.com)
Date: Mon May 01 2000 - 20:00:04 EST


On Mon, May 01, 2000 at 06:07:34PM -0400, Lars Kellogg-Stedman wrote:

: I have a system that is dual booting Linux and FreeBSD. The linux kernel
: *does* have BSD disklabel support build into the kernel (yes, I'm sure
: about this), but it fails to recognize the BSD installation.
:
: The system disk is partitioned like this:
:
: hda1: dos partition for System Commander
: hda2: FreeBSD (type = b5)
: <bsd swap>
: <bsd />
: hda3: extended partition
: hda5: linux swap
: hda6: linux /
:
: I've also run into problems getting LILO to boot BSD (which will
: eventually be crucial because I need to be able to switch between OSs
: remotely. However, this isn't a kernel issue, so I only mention it
: parenthetically).
:
: Is there any way to force the kernel to read /dev/hda2 as a BSD
: disklabel? Or is there any way to diagnose the problem?

Your problem is that System Commander changes the partition type
a5 of FreeBSD into b5. So, you might wish to adapt the code

#ifdef CONFIG_BSD_DISKLABEL
                if (SYS_IND(p) == BSD_PARTITION ||
             SYS_IND(p) == NETBSD_PARTITION ||
             SYS_IND(p) == OPENBSD_PARTITION)
                        bsd_disklabel_partition(hd, minor, SYS_IND(p));
#endif

in fs/partitions/msdos.c, or perhaps change the definition of
BSD_PARTITION (in include/linux/genhd.h) from 0xa5 into 0xb5.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:09 EST