On Thu, Jan 21, 2010 at 10:43 PM, Song Li <lis...@stanford.edu> wrote:
> On Fri, Jan 22, 2010 at 6:44 AM, Bret S. Lambert <bret.lamb...@gmail.com>
> wrote:
>> On Fri, Jan 22, 2010 at 05:42:25AM +0100, Song Li wrote:

> "fdisk sd0" is not a problem to me now either after I've seen Aaron's
> comments on fdisk. The problem on mount still exists though:
>
> What seems a little counter intuitive to me is: I would see sd0 as a
> shortcut of /dev/sd0 for fdisk, but "fdisk /dev/sd0" does not work.

sd0 is not the whole disk. It indicates "scsi disk device 0." There
are other partitions on the whole device ("c"), that get referenced.

As stated in disklabel(5)'s CAVEATS, by convention, scsi disk device
0, partition "c" would be the whole drive by convention.


> In addition, the fact that we need "mount /dev/sd0i /mnt/usb" and the
> slice letter 'i' seems weird to me. I can now see the possible
> rationale behind: OpenBSD assigns slice letters for *all* devices
> together in sequence, while  other OS may just start it over for a
> different device. OpenBSD may have a reason for this design but that's
> what confused me, esp., after the change of device name from ad to wd,
> and the alias of /dev/rwd0c for wd0, etc.

You could makefs on /dev/sd0c instead. Nothing really forces you to
create other slices (or partitions) on the device.

>> The naming convention is device driver name, device number, partition
>> letter (e.g., mount /dev/sd1e /mnt/foo). And as far as I know, it's
>> been like that since the BSDs were in diapers, so I'm not sure why
>> it's coming as a surprise.

FreeBSD went a little differently a while back - with FreeBSD 5, I believe.

> I happen to have FreeBSD 6.4 in hand. The following commands work as
> expected:
>
> fdisk ad4
> fdisk /dev/ad4
> fdisk da0
> fdisk /dev/da0
> mount /dev/ad4s4 /mnt/openbsd
> mount -t msdosfs /dev/da0s1 /mnt/usb

Don't confuse FreeBSD and OpenBSD. While they're alike in history,
they're otherwise quite different.

> and the following commands do not work:
> mount ad4s4 /mnt/openbsd
> mount -t msdosfs da0s1 /mnt/usb

"I'm trying out this new operating system, I'm surprised it doesn't
behave like these other ones."

You're expecting OpenBSD to follow the conventions of other people.
It's a little more primitive in some respects, but it does what I
expect with very little surprise. When I get a jar of peanut butter, I
don't expect there to be jelly in with it. If there is, I'd be
surprised in a bad way.

> The works and not-works all seem reasonable to me, while those on
> OpenBSD are different.

OpenBSD is OpenBSD. Expecting it to be anything else, or follow the
conventions of FreeBSD, is kind of silly.


> Since the first line of the output for each command shows the device,
> I thought it's quite self-explanary. But I can see now how it may lead
> to confusion. Sorry, should have made them more clear.

As a rule, when providing the output of a command, it helps to give
the input to the command as well. This includes flags, options, and
input files.

Reply via email to