Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!swidir.switch.ch!scsing.switch.ch!news.belwue.de!fu-berlin.de!zrz.TU-Berlin.DE!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!bonnie.heep!not-for-mail From: j@bonnie.heep.sax.de (J Wunsch) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Adding second disk drive Date: 1 Sep 1995 12:28:00 +0200 Organization: Private U**x site, Dresden. Lines: 69 Message-ID: <426n7g$elr@bonnie.tcd-dresden.de> References: <GILHAM.95Aug29180829@lily.csl.sri.com> Reply-To: joerg_wunsch@uriah.heep.sax.de NNTP-Posting-Host: 192.109.108.139 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Fred Gilham <gilham@lily.csl.sri.com> wrote: >I`ve added a Seagate 4gb hawk drive to the system and struggled with >it this afternoon to get it labeled so I could newfs it. I get >various error messages, such as > >Aug 29 17:40:03 phlox /kernel: sd1: raw partition size != slice size >Aug 29 17:40:03 phlox /kernel: sd1: start 32, end 8385898, size 8385867 >Aug 29 17:40:03 phlox /kernel: sd1c: start 32, end 8380931, size 8380900 The ``raw partition size != slice size'' is a benign warning telling you that you're wasting some sectors at the end of your disk slice. This is since you've probably based your `c' partition on the C*H*S number of sectors, while the disk itself has some sectors in excess of this (i.e., a modern ZBR disk doesn't fit right into the C/H/S picture). You can use the remaining sectors by sticking ``su#8385899'' into your disktab entry. You can also safely start the FreeBSD slice at sector 0 (instead of 32) if your disk is never about to see anything else than FreeBSD in this life. >and an error from newfs about the calculated sectors/cylender not >matching the disk label. But things seem to work. This is since Poul-Henning Kamp found by playing with many disks that using the pretented geometry of the disk will yield worse results than using something that pretends a rather high sectors/cylinder count. That's why he's been hardcoding the s/c default to 4096. This is wrong for ``true disks'', e.g. for magneto-optical media. One has to correct this manually there by overriding the builtin default via the -t and -u options. Btw., for many modern disks, newfsing with ``-d0'' will give you better performance. >What I'd like is a description of the process of getting from a >pristine disk, untouched by DOS or anything else, to a disk that >FreeBSD can mount. This used to work for me: o ignore fdisk, it's of no use for a truly dedicated disk o setup your disktab entry, start the `c' partition at block 0, covering the entire disk; use su# to include all sectors of a SCSI disk o disklabel -B -r -w sd<n> <mydiskname> o newfs your partitions This procedure will make the disk absolutely uncooperative with other operating systems, but this is what you've been asking for. It will fake an fdisk table using the old-style ``50000 blocks for FreeBSD'' values, never mind. Booting will work as long as any BIOS thinks about the disk containing at least 15 sectors per track :), since the BIOS is simply only needed to read those very first 15 sectors off the disk. This scheme is expected to work for all SCSI disks, and i believe it would also work for the majority of IDE disks. It will, of course, fail for any magic tricks like disk manager BIOS extensions etc. -- cheers, J"org private: joerg_wunsch@uriah.heep.sax.de http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)