Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Sep 2000 06:39:34 +0400 (MSD)
From:      "Aleksandr A.Babaylov" <babolo@links.ru>
To:        intmktg@CAM.ORG (Marc Tardif)
Cc:        babolo@links.ru, freebsd-hackers@FreeBSD.ORG, freebsd-fs@FreeBSD.ORG
Subject:   Re: device naming convention
Message-ID:  <200009170239.GAA18264@aaz.links.ru>
In-Reply-To: <Pine.LNX.4.10.10009162049500.9098-100000@Gloria.CAM.ORG> from "Marc Tardif" at "Sep 16, 0 09:11:27 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Marc Tardif writes:
> [ snip ]
> > > 1. What are wd0[a-h] used for?
> > For wd0sN[a-h] where N is number of first slice recognized
> > as FreeBSD slice
> > 
> If I understand correctly, wd0[a-h] will be the same as wd0s3[a-h] in a
> situation where DOS is on first slice, Linux on second and FreeBSD on
> third, right? But what if the fourth slice is also FreeBSD? In such a
> case, I'll assume you meant "booted slice" instead of "first slice", where
> the slice selected when booting will be referred to by the OS as wd0[a-h]
> which would translate to "current slice". Confirmation of my assumption
> would be appreciated.
As far as I remember not booted, but first
May be it is version dependant?

> > > 2. If wd0s1 is my first slice, why isn't it named wd0s0?
> > wd0s0 == wd0
> > wd0s0a == wd0a
> I somehow doubt that. Considering wd0s* goes from 1 to 4 inclusively, I
> would tend to believe the first slice is wd0s1.
Bits in minor with slice number can be from 0 to 31 (5 bits).
0 is for wd0s0 == wd0
And lok at /dev/MAKEDEV

> [ snip ]
> > > Assuming /dev/wd0s2 contains a few blocks, ie /dev/wd0s1
> > > doesn't span to the end of disk:
> > > 4. If I want to use /dev/wd0s2 as a raw slice for reading
> > >    and writing, what are the steps to follow?
> > You can't write several blocks near /dev/wd0s2 beginning.
> > Use /dev/wd0 with proper address
> That is rather risky. Wouldn't it be safer to have a device name I could
> dedicate to some purpose. In such a case, I could chown the device to an
> appropriate username and group. Furthermore, I could avoid the unfortunate
> mistake of overwriting my current FreeBSD fs in case I get the addresses
> wrong.

My tests in this area are old enough, may be up to 3.1

It depends on whether /dev/wd0s2 has a FreeBSD label or not.
If pure MSDOS slice, it is not write protected, and in times
I had some M$ slices I restored it by dd.
Any slices that recognized with labels (not only FreeBSD labels,
but FreeBSD take not care about whos labels are) have
some write protected block so you can't restore, for example,
boot loader by simlpe dd. In such a case you need use
for example dd of=/dev/wd0 seek=(shift of slice from disk begin)

> > > 4a. Do I need to format the partition as any type? If so
> > >     is there a recommended type (perhaps one which won't
> > >     be recognised by the bootloader would be preferable)?
> > It depends on usage. And remember - kernel looks up every
> > slice to find FreeBSD label - even if you mark it 0 (unused)
> How does it depend on usage? Are some formats preferable for some specific
> usage (consider I'll only be using the raw interface to the device)?
Partition you mean is M$ partition? (slice in FBSD) or partition
in FBSD slice?
You are NOT restricted by FBSD slices to have ufs in.
But if use some slice without ufs be aware from occasionaly
create some pattern that FBSD think as label.
May be just not use slice begin.
If you mean FBSD partition, the first of them hase write protected
blocks.
I was not tested another.
The same - just not use partition's begin.
IMHO 8K, but I am not hard in this.

-- 
@BABOLO      http://links.ru/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009170239.GAA18264>