From owner-freebsd-stable Tue Jun 20 15:50:40 2000 Delivered-To: freebsd-stable@freebsd.org Received: from sr14.nsw-remote.bigpond.net.au (sr14.nsw-remote.bigpond.net.au [24.192.3.29]) by hub.freebsd.org (Postfix) with ESMTP id 65E7337B6A8 for ; Tue, 20 Jun 2000 15:50:31 -0700 (PDT) (envelope-from a.reilly@lake.com.au) Received: from areilly.bpc-users.org (CPE-144-132-171-71.nsw.bigpond.net.au [144.132.171.71]) by sr14.nsw-remote.bigpond.net.au (Pro-8.9.3/8.9.3) with SMTP id IAA07741 for ; Wed, 21 Jun 2000 08:50:22 +1000 (EST) Received: (qmail 57196 invoked by uid 1000); 20 Jun 2000 22:50:20 -0000 From: "Andrew Reilly" Date: Wed, 21 Jun 2000 08:50:20 +1000 To: Ryan Turner Cc: freebsd-stable@freebsd.org Subject: Re: 2048 byte media Message-ID: <20000621085020.A52630@gurney.reilly.home> References: <20000614084825.A51585@gurney.reilly.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from ryan@workstation.dhs.org on Wed, Jun 14, 2000 at 12:28:29AM -0400 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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: The data for partition 3 is: The data for partition 4 is: 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