Date: Fri, 7 Jul 2000 21:48:49 +0200 From: "Leonard den Ottolander" <leonardjo@hetnet.nl> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/19756: Inability to use linux extended partition (type 0x85) Message-ID: <39665041.10109.B8D16@localhost>
next in thread | raw e-mail | index | archive | help
>Number: 19756
>Category: kern
>Synopsis: Inability to use linux extended partition (type 0x85)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Jul 07 13:00:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Leonard den Ottolander
>Release: FreeBSD 4.0-RELEASE i386
>Organization:
>Environment:
>Description:
The kernel is yet unable to use the linux extended partition (type 0x85). The
linux extended partition is just a dos extended partition with a different
identifier, as not to confuse dos.
Implementing the use of the linux extended partition requires the partition
type to be known, and a check for its presence.
>How-To-Repeat:
>Fix:
Following is a diff of the original to a patched /sys/kern/subr_diskmbr.c:
*** subr_diskmbr.c.000 Fri Jan 28 11:22:07 2000
--- subr_diskmbr.c Mon Jun 26 19:42:55 2000
***************
*** 49,55 ****
--- 49,59 ----
#include <sys/disklabel.h>
#define DOSPTYP_EXTENDED 5
#define DOSPTYP_EXTENDEDX 15
+ #define DOSPTYP_LINUXEXTENDED 133
#define DOSPTYP_ONTRACK 84
+ #define IS_EXTENDED(p) \
+ ((p) == DOSPTYP_EXTENDED || (p) == DOSPTYP_EXTENDEDX \
+ || (p) == DOSPTYP_LINUXEXTENDED )
#include <sys/diskslice.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
***************
*** 343,350 ****
/* Handle extended partitions. */
sp -= NDOSPART;
for (dospart = 0; dospart < NDOSPART; dospart++, sp++)
! if (sp->ds_type == DOSPTYP_EXTENDED ||
! sp->ds_type == DOSPTYP_EXTENDEDX)
mbr_extended(bp->b_dev, lp, ssp,
sp->ds_offset, sp->ds_size, sp->ds_offset,
max_nsectors, max_ntracks, mbr_offset, 1);
--- 347,353 ----
/* Handle extended partitions. */
sp -= NDOSPART;
for (dospart = 0; dospart < NDOSPART; dospart++, sp++)
! if (IS_EXTENDED(sp->ds_type))
mbr_extended(bp->b_dev, lp, ssp,
sp->ds_offset, sp->ds_size, sp->ds_offset,
max_nsectors, max_ntracks, mbr_offset, 1);
***************
*** 433,440 ****
if (dp->dp_scyl == 0 && dp->dp_shd == 0 && dp->dp_ssect == 0
&& dp->dp_start == 0 && dp->dp_size == 0)
continue;
! if (dp->dp_typ == DOSPTYP_EXTENDED ||
! dp->dp_typ == DOSPTYP_EXTENDEDX) {
static char buf[32];
sname = dsname(dev, dkunit(dev), WHOLE_DISK_SLICE,
--- 436,442 ----
if (dp->dp_scyl == 0 && dp->dp_shd == 0 && dp->dp_ssect == 0
&& dp->dp_start == 0 && dp->dp_size == 0)
continue;
! if (IS_EXTENDED(dp->dp_typ)) {
static char buf[32];
sname = dsname(dev, dkunit(dev), WHOLE_DISK_SLICE,
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39665041.10109.B8D16>
