Linux Newbie help
 help / color / mirror / Atom feed
* Mounting BSD-labeled slices in Linux
@ 2004-04-20 10:37 erif
  2004-04-20 11:43 ` Steven Smith
  0 siblings, 1 reply; 8+ messages in thread
From: erif @ 2004-04-20 10:37 UTC (permalink / raw)
  To: linux-newbie

Hi,

I've got a computer multibooting Slackware 9.1 (Linux 2.4.24), FreeBSD and
DragonFly.
What I want to do is to mount one or two of my FreeBSD/DragonFly-slices in
Slackware.
/dev/hda1 corresponds to FreeBSDs /dev/ad0s1.
What does Linux call, for example, /dev/ad0s1a?

--
Fredrik Eriksson
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mounting BSD-labeled slices in Linux
  2004-04-20 10:37 Mounting BSD-labeled slices in Linux erif
@ 2004-04-20 11:43 ` Steven Smith
  2004-04-20 12:13   ` erif
  0 siblings, 1 reply; 8+ messages in thread
From: Steven Smith @ 2004-04-20 11:43 UTC (permalink / raw)
  To: erif; +Cc: linux-newbie

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

> /dev/hda1 corresponds to FreeBSDs /dev/ad0s1.
> What does Linux call, for example, /dev/ad0s1a?

Usually, Linux just shoves stuff in BSD-style slice tables on the end
of the partition table.  In my case, ad0s4a is hda11, ad0s4b hda12,
and so on.

For recent 2.4 kernels, dmesg should have a line of the form:

 p4: <bsd: p11 p12 p13 p14 p15 p16 >

just after the mundane partition check, which should make it fairly
obvious.

Steven Smith.

[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mounting BSD-labeled slices in Linux
  2004-04-20 11:43 ` Steven Smith
@ 2004-04-20 12:13   ` erif
  2004-04-20 12:40     ` Steven Smith
  0 siblings, 1 reply; 8+ messages in thread
From: erif @ 2004-04-20 12:13 UTC (permalink / raw)
  To: Steven Smith; +Cc: linux-newbie

On Tue, Apr 20, 2004 at 12:43:21PM +0100, Steven Smith wrote:
> > /dev/hda1 corresponds to FreeBSDs /dev/ad0s1.
> > What does Linux call, for example, /dev/ad0s1a?
> 
> Usually, Linux just shoves stuff in BSD-style slice tables on the end
> of the partition table.  In my case, ad0s4a is hda11, ad0s4b hda12,
> and so on.
> 
> For recent 2.4 kernels, dmesg should have a line of the form:
> 
>  p4: <bsd: p11 p12 p13 p14 p15 p16 >


Thanks!

Yes, this is the FreeBSD-slice

 hda1: <bsd: hda10 hda11 hda12 hda13 >
 
and this is the DragonFly-slice

 hda2: <bsd: hda14 hda15 hda16 hda17 >

..strange numbering, shouldn't it look like this?
 hda2: <bsd: hda20 hda21 hda22 hda23 >


One thing I found particularly interesting is that _both_ /dev/hda2 and
/dev/hda14 seem to represent /dev/ad0s2a, and I can even mount them both at
the same time!
=/


--
Fredrik Eriksson


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mounting BSD-labeled slices in Linux
  2004-04-20 12:13   ` erif
@ 2004-04-20 12:40     ` Steven Smith
  2004-04-20 13:05       ` erif
  0 siblings, 1 reply; 8+ messages in thread
From: Steven Smith @ 2004-04-20 12:40 UTC (permalink / raw)
  To: erif; +Cc: Steven Smith, linux-newbie

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

> > > /dev/hda1 corresponds to FreeBSDs /dev/ad0s1.
> > > What does Linux call, for example, /dev/ad0s1a?
> > For recent 2.4 kernels, dmesg should have a line of the form:
> > 
> >  p4: <bsd: p11 p12 p13 p14 p15 p16 >
>  hda1: <bsd: hda10 hda11 hda12 hda13 >
>  
> and this is the DragonFly-slice
> 
>  hda2: <bsd: hda14 hda15 hda16 hda17 >
> 
> ..strange numbering, shouldn't it look like this?
>  hda2: <bsd: hda20 hda21 hda22 hda23 >
Nope.  The algorithm Linux uses for reading partition tables etc. is
roughly as follows (from memory):

counter = 0
unexamined_partitions = {entire_disk}
while there are unexamined partitions:
	Pick a partition from the unexamined partitions set
	Assign that partition the number currently in counter
	Look at the partition, and, if it contains any sub-partitions,
		put those in the set of unexamined partitions
	increment counter

What you've seen isn't entirely inconsistent with that, if you have
five logical partitions under the primary for hda4.

> One thing I found particularly interesting is that _both_ /dev/hda2 and
> /dev/hda14 seem to represent /dev/ad0s2a, and I can even mount them both at
> the same time!
This strikes me as an incredibly bad idea.  Definitely don't mount
hda2 read/write. :)

Steven.

[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mounting BSD-labeled slices in Linux
  2004-04-20 12:40     ` Steven Smith
@ 2004-04-20 13:05       ` erif
  2004-04-20 18:10         ` John T. Williams
  2004-04-20 19:18         ` Steven Smith
  0 siblings, 2 replies; 8+ messages in thread
From: erif @ 2004-04-20 13:05 UTC (permalink / raw)
  To: linux-newbie

On Tue, Apr 20, 2004 at 01:40:22PM +0100, Steven Smith wrote:
> What you've seen isn't entirely inconsistent with that, if you have
> five logical partitions under the primary for hda4.

Ah.. Yes, I do. =)


> > One thing I found particularly interesting is that _both_ /dev/hda2 and
> > /dev/hda14 seem to represent /dev/ad0s2a, and I can even mount them both at
> > the same time!
> This strikes me as an incredibly bad idea.  Definitely don't mount
> hda2 read/write. :)

Just out of curiosity, I mounted /dev/hda1 too. =)
Shouldn't something prevent me from doing this, or at least warn me?

--
Fredrik Eriksson

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mounting BSD-labeled slices in Linux
  2004-04-20 13:05       ` erif
@ 2004-04-20 18:10         ` John T. Williams
  2004-04-20 19:11           ` erif
  2004-04-20 19:18         ` Steven Smith
  1 sibling, 1 reply; 8+ messages in thread
From: John T. Williams @ 2004-04-20 18:10 UTC (permalink / raw)
  To: erif; +Cc: linux-newbie

Generally speaking, linux relies on its users to not do things unless
they know what they are doing.  If you don't believe me try logging in
as root and typing "rm -rf /usr".(in case you don't know, that will
foobar your system and likely force you to re-install from the
beginning)  


On Tue, 2004-04-20 at 09:05, erif wrote:
> On Tue, Apr 20, 2004 at 01:40:22PM +0100, Steven Smith wrote:
> > What you've seen isn't entirely inconsistent with that, if you have
> > five logical partitions under the primary for hda4.
> 
> Ah.. Yes, I do. =)
> 
> 
> > > One thing I found particularly interesting is that _both_ /dev/hda2 and
> > > /dev/hda14 seem to represent /dev/ad0s2a, and I can even mount them both at
> > > the same time!
> > This strikes me as an incredibly bad idea.  Definitely don't mount
> > hda2 read/write. :)
> 
> Just out of curiosity, I mounted /dev/hda1 too. =)
> Shouldn't something prevent me from doing this, or at least warn me?
> 
> --
> Fredrik Eriksson
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mounting BSD-labeled slices in Linux
  2004-04-20 18:10         ` John T. Williams
@ 2004-04-20 19:11           ` erif
  0 siblings, 0 replies; 8+ messages in thread
From: erif @ 2004-04-20 19:11 UTC (permalink / raw)
  To: John T. Williams; +Cc: linux-newbie

On Tue, Apr 20, 2004 at 02:10:21PM -0400, John T. Williams wrote:
> Generally speaking, linux relies on its users to not do things unless
> they know what they are doing.  If you don't believe me try logging in
> as root and typing "rm -rf /usr".(in case you don't know, that will
> foobar your system and likely force you to re-install from the
> beginning)  

I'm a linux-newbie, not a unix-newbie. =)
But I still consider it strange to be able to mount "the same device" 
(practically) to two different mount points. 
Even though you are an experienced user/administrator, shit still happens.
This is probably a flavour-thingy, it is not permitted i FreeBSD.

--
Fredrik Eriksson
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mounting BSD-labeled slices in Linux
  2004-04-20 13:05       ` erif
  2004-04-20 18:10         ` John T. Williams
@ 2004-04-20 19:18         ` Steven Smith
  1 sibling, 0 replies; 8+ messages in thread
From: Steven Smith @ 2004-04-20 19:18 UTC (permalink / raw)
  To: erif; +Cc: linux-newbie

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

> > > One thing I found particularly interesting is that _both_ /dev/hda2 and
> > > /dev/hda14 seem to represent /dev/ad0s2a, and I can even mount them both at
> > > the same time!
> > This strikes me as an incredibly bad idea.  Definitely don't mount
> > hda2 read/write. :)
> Just out of curiosity, I mounted /dev/hda1 too. =)
> Shouldn't something prevent me from doing this, or at least warn me?
You can certainly make a real argument that it's a bug, but if you
make sure that both mounts are read-only it's potentially useful when
combined with a bunch of chroots.

Only potentially, though.

Steven.

[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-04-20 19:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-20 10:37 Mounting BSD-labeled slices in Linux erif
2004-04-20 11:43 ` Steven Smith
2004-04-20 12:13   ` erif
2004-04-20 12:40     ` Steven Smith
2004-04-20 13:05       ` erif
2004-04-20 18:10         ` John T. Williams
2004-04-20 19:11           ` erif
2004-04-20 19:18         ` Steven Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox