bsdlabel editing to create a single partition

illoai at gmail.com illoai at gmail.com
Sun Apr 22 02:58:13 UTC 2007


On 21/04/07, L Goodwin <xrayv19 at yahoo.com> wrote:
> I want to dedicate the entire disk to a single FreeBSD partition ("da1s1a"), and
>  am a little confused about editing partitions via "bsdlabel -e <slicename>".
>
> Prior to editing, it looks like this:
> ----------------------------------------------------------------------------------------
> # /dev/da1s1:
> 8 partitions:
> #  size           offset    fstype     [fsize bsize bps/cpg]
> a: 17908300       16    unused    0    0
> c: 17908316         0    unused    0    0    # "raw" part, don't edit
> ----------------------------------------------------------------------------------------
>
> I gather that I should change the following field values for "c:":
>     fstype: 4.2BSD
>     fsize: 2048
>     bsize: 16384
>
> Questions:
> 1) Do I change the "size" value for "a:" or leave at current size?

NO

>  2) Do I leave the "c:" line alone (in place) and if YES does
> its "size" and "offset" values need to be edited?

Leave it alone.

>
> If someone could show me what it should look like when done, I'd appreciate it.
>
> When I leave the "c:" entry in place, I get /dev/da1s1a and /dev/da1s1c in /dev/.
> Should I delete the "c:" entry? Here's what I have now:
> ----------------------------------------------------------------------------------------
>  # /dev/da1s1:
>  8 partitions:
>  #  size           offset    fstype     [fsize bsize bps/cpg]
>  a: 17908300       16    4.2BSD    2048    16384
>  c: 17908316         0    unused    0          0    # "raw" part, don't edit
>  ----------------------------------------------------------------------------------------
>

Don't edit the bsdlabel at all, just:
# newfs -U /dev/da1s1a
and it will automatically fill out the fsize, bsize, and bps/cpg
fields.  You can then add a line to fstab, mount it, fill it with
text files containing the word "corn" ever and over.

c: should nearly never be touched, and definitely never in
the course of simply setting up a disk for use.

-- 
--


More information about the freebsd-questions mailing list