Mounting BSD-labeled slices in Linux
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 2 lines
/dev/hda1corresponds 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.
Quoted 10 lines · Steven Smith
Quoted 2 lines
/dev/hda1corresponds 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
/dev/hda1corresponds 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 >
Quoted 8 lines
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 = 0unexamined_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.
Quoted 3 lines
One thing I found particularly interesting is that _both_
/dev/hda2and/dev/hda14seem 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.
Quoted 2 lines · Steven Smith
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. =)
Quoted 5 lines
Quoted 3 lines
One thing I found particularly interesting is that _both_
/dev/hda2and/dev/hda14seem 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
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)
Quoted 16 lines · erif
Quoted 2 lines · Steven Smith
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. =)
Quoted 5 lines
Quoted 3 lines
One thing I found particularly interesting is that _both_
/dev/hda2and/dev/hda14seem 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/hda1too. =) Shouldn't something prevent me from doing this, or at least warn me?
Quoted 8 lines
--
Fredrik Eriksson-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 5 lines · John T. Williams
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
One thing I found particularly interesting is that _both_
/dev/hda2and/dev/hda14seem 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/hda1too. =) 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.