Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Feb 2005 15:14:44 +0100 (CET)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-stable@FreeBSD.ORG, Scot Hetzel <swhetzel@gmail.com>
Subject:   Re: Strange disk problems make the system lock up
Message-ID:  <200502181414.j1IEEiIW072989@lurza.secnetix.de>
In-Reply-To: <790a9fff05021711184a5e3e9e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Scot Hetzel <swhetzel@gmail.com> wrote:
 > In FreeBSD, the disk is broken down into slices and partitions.  A
 > slice is equivalent to a DOS partition, but can be broken down into 8
 > partitions (a-h).
 > The "c" partition is reserved because it is used to define the entire disk.

It's not reserved, it's rather a convention.  Also, there
is the convention that "a" is the root filesystem, "b" is
the swap partition, and "d" is the entire disk.  None of
those conventions are enforced.  The only thing which is
hardwired is that the default kernel will always try to
boot from the "a" partition, so if you make a bootable
disk, then the root filesystem should be on "a".

If you have a removable disk or other medium on which you
only need a single filesystem (an dit doesn't have to be
bootable), nothing prevents you from newfs'ing the "c"
partition and mounting it.  I've done that before.

-ROOT-# dd if=/dev/zero of=disk bs=1m count=20
20+0 records in
20+0 records out
20971520 bytes transferred in 0.389265 secs (53874653 bytes/sec)
-ROOT-# vnconfig -s labels -c /dev/vn0 disk
-ROOT-# disklabel -w -B vn0 auto
-ROOT-# disklabel vn0 | sed 1,/part/d
#        size   offset    fstype   [fsize bsize bps/cpg]
  c:    40960        0    unused        0     0         # (Cyl.    0 - 19)
-ROOT-# newfs /dev/vn0c
Warning: Block size restricts cylinders per group to 105.
/dev/vn0c:      40960 sectors in 10 cylinders of 1 tracks, 4096 sectors
        20.0MB in 1 cyl groups (105 c/g, 210.00MB/g, 2560 i/g)
super-block backups (for fsck -b #) at:
 32
-ROOT-# mount /dev/vn0c /mnt
-ROOT-# df -k /mnt
Filesystem 1K-blocks Used Avail Capacity  Mounted on
/dev/vn0c      20110    2 18500     0%    /mnt

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

Python is executable pseudocode.  Perl is executable line noise.



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