From nobody@FreeBSD.org  Fri May 11 07:14:29 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id BF2CD37B506
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 May 2001 07:14:28 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f4BEESJ97402;
	Fri, 11 May 2001 07:14:28 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200105111414.f4BEESJ97402@freefall.freebsd.org>
Date: Fri, 11 May 2001 07:14:28 -0700 (PDT)
From: rubens_ramos@yahoo.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: Cannot mount linux extended (logical) partitions
X-Send-Pr-Version: www-1.0

>Number:         27269
>Category:       kern
>Synopsis:       Cannot mount linux extended (logical) partitions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 11 07:20:01 PDT 2001
>Closed-Date:    Wed Jan 31 05:32:23 GMT 2007
>Last-Modified:  Wed Jan 31 05:32:23 GMT 2007
>Originator:     Rubens Ramos
>Release:        4.2
>Organization:
None
>Environment:
FreeBSD hal9000.home.net 4.2-RELEASE FreeBSD 4.2-RELEASE #17: Fri May 11 22:11:42 CST 2001     root@hal9000.home.net:/usr/src/sys/compile/MYKERNEL  i386
>Description:
FreeBSD can mount only MSDOS (and Windows) extended partitions. I am
sending the patch to add this feature, since the linux extended partitions
AFAIK work the same way as the MSDOS ones...

With this, one is able to mount /dev/ad0s[5,6,7..]

>How-To-Repeat:
use linux to create an extended ext2fs partition.
try to mount it in FreeBSD:

mount -t ext2fs /dev/ad0s<n> /mnt

It will reply: "device not configured"
>Fix:
begin 644 diskmbr
M26YD97@Z('-Y<R]K97)N+W-U8G)?9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7!E(#T]($Q)3E!465!?15A414Y$140@?'P*("`)
M"2`@("!S<"T^9'-?='EP92`]/2!$3U-05%E07T585$5.1$5$6"D*("`)"0EM
M8G)?97AT96YD960H8G`M/F)?9&5V+"!L<"P@<W-P+`H@(`D)"0D@("`@('-P
M+3YD<U]O9F9S970L('-P+3YD<U]S:7IE+"!S<"T^9'-?;V9F<V5T+`HJ*BHJ
M*BHJ*BHJ*BHJ*BH**BHJ(#0S-"PT,SD@*BHJ*@HM+2T@-#,V+#0T,B`M+2TM
M"B`@"0D@("`@)B8@9'`M/F1P7W-T87)T(#T](#`@)B8@9'`M/F1P7W-I>F4@
M/3T@,"D*("`)"0EC;VYT:6YU93L*("`)"6EF("AD<"T^9'!?='EP(#T]($1/
M4U!465!?15A414Y$140@?'P**R`)"0ED<"T^9'!?='EP(#T]($Q)3E!465!?
M15A414Y$140@?'P*("`)"2`@("!D<"T^9'!?='EP(#T]($1/4U!465!?15A4
G14Y$1418*2!["B`@"0D)<W1A=&EC(&-H87(@8G5F6S,R73L*("`*
`
end

>Release-Note:
>Audit-Trail:

From: Paul Herman <pherman@frenchfries.net>
To: <rubens_ramos@yahoo.com>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>
Subject: Re: kern/27269: Cannot mount linux extended (logical) partitions
Date: Fri, 11 May 2001 16:42:25 +0200 (CEST)

 On Fri, 11 May 2001 rubens_ramos@yahoo.com wrote:
 
 > >How-To-Repeat:
 > use linux to create an extended ext2fs partition.
 > try to mount it in FreeBSD:
 >
 > mount -t ext2fs /dev/ad0s<n> /mnt
 >
 > It will reply: "device not configured"
 
 Hi Rubens,
 
 I can't repeat this on 4.3-STABLE:
 
 bash-2.04# umount /RedHat
 bash-2.04# mount -t ext2fs /dev/ad0s5 /RedHat
 bash-2.04# mount -t ext2fs
 /dev/ad0s6 on /Slackware (ext2fs, local)
 /dev/ad0s5 on /RedHat (ext2fs, local)
 
 I've had no problems since I can remember (4.0, maybe even 3.x).  I
 don't know what might be causing problems for you.  Do you have EXT2FS
 in your kernel (before AND after you apply your patch)?
 
 -Paul.
 

From: Rubens Ramos <rubens_ramos@yahoo.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/27269: Cannot mount linux extended (logical) partitions
Date: Sun, 13 May 2001 16:32:03 -0700 (PDT)

 --- Paul Herman <pherman@frenchfries.net> wrote:
 > Date: Sun, 13 May 2001 08:59:22 +0200 (CEST)
 > From: Paul Herman <pherman@frenchfries.net>
 > To: Rubens Ramos <rubens_ramos@yahoo.com>
 > Subject: Re: kern/27269: Cannot mount linux extended
 > (logical) partitions
 > 
 > On Sat, 12 May 2001, Rubens Ramos wrote:
 > 
 > > > I can't repeat this on 4.3-STABLE:
 > > >
 > > > bash-2.04# umount /RedHat
 > > > bash-2.04# mount -t ext2fs /dev/ad0s5 /RedHat
 > > > bash-2.04# mount -t ext2fs
 > > > /dev/ad0s6 on /Slackware (ext2fs, local)
 > > > /dev/ad0s5 on /RedHat (ext2fs, local)
 > > What happens if you try
 > >
 > > fdisk /dev/ad0
 > >
 > > DOes it give you the extended linux partition
 > > code? (0x85 - sysid 133)
 > > Maybe it works for you because you are using
 > > DOS extended partitions (or Win98).
 > > They work pretty much the same way...
 > 
 > Ah, now I see what you were getting at with your
 > patch.  Yeah, FreeBSD
 > most certainly doesn't know what to do with linux
 > extended partitions.
 > To tell the truth, this is the first time I've seen
 > somebody use them.
 > 
 > -Paul.
 > 
 
 =====
 
 ----
 Rubens Ramos Fernandes Junior
 rubens_ramos@yahoo.com
 ----
 
 
 
 __________________________________________________
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.yahoo.com/

From: Rubens Ramos <rubens_ramos@yahoo.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/27269: Cannot mount linux extended (logical) partitions
Date: Sun, 13 May 2001 16:33:45 -0700 (PDT)

 --- Paul Herman <pherman@frenchfries.net> wrote:
 > Date: Sun, 13 May 2001 11:01:13 +0200 (CEST)
 > From: Paul Herman <pherman@frenchfries.net>
 > To: Rubens Ramos <rubens_ramos@yahoo.com>
 > Subject: Re: kern/27269: Cannot mount linux extended
 > (logical) partitions
 > 
 > On Sun, 13 May 2001, Rubens Ramos wrote:
 > 
 > > If I am not mistaken I did the partitioning
 > myself, using linux
 > > fdisk.
 > 
 > ...and chose type 0x85 for the extended partition.
 > 
 > > Maybe all of the other people on earth created
 > their partitions
 > > using msdos fdisk.
 > 
 > I think most of them just chose type 0x05.
 > 
 > Well, if your patch works, I see no reason why it
 > shouldn't be
 > included.
 > 
 > -Paul.
 > 
 
 =====
 
 ----
 Rubens Ramos Fernandes Junior
 rubens_ramos@yahoo.com
 ----
 
 
 
 __________________________________________________
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.yahoo.com/

From: Bruce Evans <bde@zeta.org.au>
To: Rubens Ramos <rubens_ramos@yahoo.com>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/27269: Cannot mount linux extended (logical) partitions
Date: Mon, 14 May 2001 22:04:33 +1000 (EST)

 On Sun, 13 May 2001, Rubens Ramos wrote:
 >  --- Paul Herman <pherman@frenchfries.net> wrote:
 >  > On Sat, 12 May 2001, Rubens Ramos wrote:
 >  > > What happens if you try
 >  > >
 >  > > fdisk /dev/ad0
 >  > >
 >  > > DOes it give you the extended linux partition
 >  > > code? (0x85 - sysid 133)
 >  > > Maybe it works for you because you are using
 >  > > DOS extended partitions (or Win98).
 >  > > They work pretty much the same way...
 >  > 
 >  > Ah, now I see what you were getting at with your
 >  > patch.  Yeah, FreeBSD
 >  > most certainly doesn't know what to do with linux
 >  > extended partitions.
 >  > To tell the truth, this is the first time I've seen
 >  > somebody use them.
 
 This misfeature has been in Linux since at least linux-2.0.29.tar.gz
 (Feb 21 1997).  Using it mainly hides the Linux partitions from other
 OS's and older OS's that don't know about it.  This is not something
 you should do when you want to mount Linux partitions in other OS's.
 
 Bruce
 

From: Rubens Ramos <rubens_ramos@yahoo.com>
To: Bruce Evans <bde@zeta.org.au>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/27269: Cannot mount linux extended (logical) partitions
Date: Mon, 14 May 2001 16:20:28 -0700 (PDT)

 I will totally agree with you if you could point me
 to some place in the handbook/FAQ/any BSD docs
 that explain this to the average user (or at
 least how to fix it). The Linux+FreeBSD Howto
 only says: "It is not possible to mount extended
 linux partitions under FreeBSD". It looks like a
 FreeBSD bug to me...
 
 It is very difficult for someone that does not
 know exactly what "partition" means to figure
 that out - if it is an inconsistency in linux,
 I think that the handbook/FAQ/whatever, should
 have an explanation about that. (Because if this
 is a problem in Linux, it is unlikely that it is
 going to be explained in linux documentation ;-)
 
 Maybe some people on newsgroups had the same problem,
 and were told (as I was) that it should work with
 no problems at all, and just could not solve it.
 Then they just end up re-partitioning their disks
 and for some reason it works "by magic" (they
 use a different partition ID).
 
 Cheers
 
 --- Bruce Evans <bde@zeta.org.au> wrote:
 > On Sun, 13 May 2001, Rubens Ramos wrote:
 > >  --- Paul Herman <pherman@frenchfries.net> wrote:
 > >  > On Sat, 12 May 2001, Rubens Ramos wrote:
 > >  > > What happens if you try
 > >  > >
 > >  > > fdisk /dev/ad0
 > >  > >
 > >  > > DOes it give you the extended linux partition
 > >  > > code? (0x85 - sysid 133)
 > >  > > Maybe it works for you because you are using
 > >  > > DOS extended partitions (or Win98).
 > >  > > They work pretty much the same way...
 > >  > 
 > >  > Ah, now I see what you were getting at with
 > your
 > >  > patch.  Yeah, FreeBSD
 > >  > most certainly doesn't know what to do with
 > linux
 > >  > extended partitions.
 > >  > To tell the truth, this is the first time I've
 > seen
 > >  > somebody use them.
 > 
 > This misfeature has been in Linux since at least
 > linux-2.0.29.tar.gz
 > (Feb 21 1997).  Using it mainly hides the Linux
 > partitions from other
 > OS's and older OS's that don't know about it.  This
 > is not something
 > you should do when you want to mount Linux
 > partitions in other OS's.
 > 
 > Bruce
 > 
 
 
 =====
 
 ----
 Rubens Ramos Fernandes Junior
 rubens_ramos@yahoo.com
 ----
 
 
 
 __________________________________________________
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.yahoo.com/
State-Changed-From-To: open->closed 
State-Changed-By: rodrigc 
State-Changed-When: Wed Jan 31 05:31:26 UTC 2007 
State-Changed-Why:  
Now that FreeBSD has moved to GEOM, this patch doesn't apply 
any more. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=27269 
>Unformatted:
