Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2000 08:50:20 +1000
From:      "Andrew Reilly" <a.reilly@lake.com.au>
To:        Ryan Turner <ryan@workstation.dhs.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: 2048 byte media
Message-ID:  <20000621085020.A52630@gurney.reilly.home>
In-Reply-To: <Pine.BSF.4.21.0006140021400.684-100000@workstation.dhs.org>; from ryan@workstation.dhs.org on Wed, Jun 14, 2000 at 12:28:29AM -0400
References:  <20000614084825.A51585@gurney.reilly.home> <Pine.BSF.4.21.0006140021400.684-100000@workstation.dhs.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 14, 2000 at 12:28:29AM -0400, Ryan Turner wrote:
> Thanks for the information.  It looks like I am trying to do the same
> thing as you with a Fujitsu 640M MO drive.  I am still having a little
> bit of trouble getting it to work.  I have been using FreeBSD for a while
> but have never had to deal with removeable media before this (always
> used /stand/sysinstall).  I was hoping you could tell me what steps you
> took to get it working.  I have added the disktab entrys you suggested but
> have been unable to get fdisk/disklabel to work.

I don't actually have an unformatted disk handy at the moment,
but I believe that the process is something like:

Use fdisk to create a partition that fills the whole disk, and
mark it active.  

fdisk -I da2

fdisk da2 then says:

******* Working on device /dev/da2 *******
parameters extracted from in-core disklabel are:
cylinders=151 heads=64 sectors/track=32 (2048 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=151 heads=64 sectors/track=32 (2048 blks/cyl)

Media sector size is 2048
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
    start 32, size 309216 (603 Meg), flag 80 (active)
        beg: cyl 0/ sector 1/ head 1;
        end: cyl 150/ sector 32/ head 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

Then use disklabel to put a FreeBSD partition on it.  I haven't
figured out any incantation of disklabel that allows it to use
the auto option, but using one of the disktab entries from the
previous mail seems to work:

disklabel -w -r da2 R640

now disklabel da2 says:

# /dev/da2c:
type: SCSI
disk: R640
label: 
flags: removeable
bytes/sector: 2048
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 150
sectors/unit: 309216
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

3 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c:   309216        0    unused     2048  8192         # (Cyl.  0 - 150*)

Then you put a file system on it with

newfs /dev/da2c

Warning: Block size restricts cylinders per group to 10.
Warning: 8320 sector(s) in last cylinder unallocated
/dev/da2c:      1236864 sectors in 76 cylinders of 1 tracks, 16384 sectors
        603.9MB in 8 cyl groups (10 c/g, 80.00MB/g, 9536 i/g)
super-block backups (for fsck -b #) at:
 32, 163872, 327712, 491552, 655392, 819232, 983072, 1146912

Then you can mount it, and do with it what you will:

mount /dev/da2c /mnt

df says:

/dev/da2c      1217500        4  1120096     0%    /mnt

If anyone knows how to make disklabel behave more nicely, or
knows of a "better" way to do this, I'd love to know, of course.

-- 
Andrew


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




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