Bug 27269

Summary: Cannot mount linux extended (logical) partitions
Product: Base System Reporter: rubens_ramos <rubens_ramos>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
diskmbr none

Description rubens_ramos 2001-05-11 15:20:01 UTC
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"
Comment 1 Paul Herman 2001-05-11 15:42:25 UTC
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.
Comment 2 rubens_ramos 2001-05-14 00:32:03 UTC
--- 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/
Comment 3 rubens_ramos 2001-05-14 00:33:45 UTC
--- 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/
Comment 4 Bruce Evans 2001-05-14 13:04:33 UTC
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
Comment 5 rubens_ramos 2001-05-15 00:20:28 UTC
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/
Comment 6 Craig Rodrigues freebsd_committer freebsd_triage 2007-01-31 05:31:26 UTC
State Changed
From-To: open->closed

Now that FreeBSD has moved to GEOM, this patch doesn't apply 
any more.