Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 1996 10:16:35 +0200 (MET DST)
From:      grog@lemis.de (Greg Lehey)
To:        gxu@engr.csulb.edu (Genquan Xu)
Cc:        questions@FreeBSD.org (FreeBSD Questions)
Subject:   Re: Disk Utilities(add new HDD)
Message-ID:  <199605140816.KAA05962@allegro.lemis.de>
In-Reply-To: <Pine.SGI.3.93.960513162826.27089C-100000@heart.engr.csulb.edu> from "Genquan Xu" at May 13, 96 04:41:37 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Genquan Xu writes:
>
>  Greg Lehey:
> 	Thank you for your help. 

You're welcome.

> I went to the last step to mount the
> disk, but I get the following message:
>    # mount /dev/rwd1c /u1
>    /dev/rwd1c on /u1: Block device required

Have a look at the discussion of block and character devices in
"Installing FreeBSD" (from Walnut Creek).  /dev/rwd1c is a character
device, and as the message says, you need a block device.  The
corresponding block device *would* be /dev/wd1c, but that's the whole
disk, not a file system.  What you want is typically something like
'mount /dev/wd1a', but from what you show below, that won't be enough.
Did you get hold of the document and read it?  What part didn't you
understand?

> I do not know how to deal with it, try sevral newfs switches, it still not
> work. It could be that I do something wrong? Following is the disklabel(I
> edited the disktab put an entry cp120(cornnor 120M IDE for a test)) and
> newfs display:
>  # /dev/rwd1c:
> type: ST506
> disk: cp120
> label:
> flags:
> bytes/sector: 512
> sectors/track: 39
> tracks/cylinder: 8
> sectors/cylinder: 312
> cylinders: 761
> sectors/unit: 237568
> rpm: 3600
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0           # milliseconds
> track-to-track seek: 0  # milliseconds
> drivedata: 0
>
> 8 partitions:
> #        size   offset    fstype   [fsize bsize bps/cpg]
>   a:   237568        0    unused        0     0         # (Cyl.    0 -761*)
>   b:   237568        0    unused        0     0         # (Cyl.    0 -761*)
>   c:   237568        0    4.2BSD      512  4096     0   # (Cyl.    0 -761*)
>   d:   237568        0    unused        0     0         # (Cyl.    0 -761*)
>   e:   237568        0    unused        0     0         # (Cyl.    0 -761*)
>   g:   237568        0    unused        0     0         # (Cyl.    0 -761*)
>   h:   237568        0    unused        0     0         # (Cyl.    0 -761*)

You shouldn't make partition c a file system.  /dev/[r]wd1c is the
whole disk, and can't be used for a file system.  If you really want
to use the whole disk for a file system, you still need to define an
additional partition, say, 'a'.  Change the line above to:

>   a:   237566        2    4.2BSD        0     0         # (Cyl.    0 -761*)
>   c:   237568        0    unused      512  4096     0   # (Cyl.    0 -761*)

In addition, you should remove the other partition definitions.  They
probably won't hurt if you leave them in, but it's untidy to have
overlapping partitions (with the exception of c), and it's a potential
time bomb.

I'm being cautious with starting partition a at offset 2: that way,
you can be sure that you don't overwrite the disk label and bootstrap
sectors.  It's possible that somebody will raise his hand and say
"Hey, you don't need to do that, the system does it automagically",
but I have never had absolute confirmation.

Then you do:

# newfs /dev/rwd1a
# mount /dev/wd1a /u1

Greg



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