From owner-freebsd-current Sun Apr 30 01:57:09 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id BAA13003 for current-outgoing; Sun, 30 Apr 1995 01:57:09 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id BAA12989 for ; Sun, 30 Apr 1995 01:56:46 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id SAA19956; Sun, 30 Apr 1995 18:53:49 +1000 Date: Sun, 30 Apr 1995 18:53:49 +1000 From: Bruce Evans Message-Id: <199504300853.SAA19956@godzilla.zeta.org.au> To: current@FreeBSD.org, pete@pelican.com Subject: Re: fdisk+disklabel, etc Sender: current-owner@FreeBSD.org Precedence: bulk >I'm having a bear of a time getting a disk labelled - whatever I do, >disklabel won't label the disk. This is a quantum 540 scsi with >1057758 sectors. This doesn't factor into anything which will fit >into dos (or bios)'s idea of cyl-hd-record. Just use the BIOS geometry for H and S and use (total_sectors/H/S) for the number of cylinders in case fdisk actually checks it. >We need a decent way to >1. Get the slice manager to buy ONLY beginning/size and totally ignore > the bios data. It already does, except it looks at the ending C/H/S values in the partition table for the purpose of creating a dummy label mainly for fdisks's benefit and to print annoying warnings. There should be no problems if you've entered suitably fudged values in fdisk. >2. Fake out the size so it can be bigger than cyl*hd*sec as long as the > real drive size isn't exceeded. This mostly works. I think there are only non-fatal bugs in newfs. >I also have to allocate a 1-cyl dos partition for all time to get the >slice table accepted at boot time, no matter what - if I delete it and >write the bsd slice as the whole disk then things fail when I try to >disklabel. (actually, now, the fail when I try to disklabel anyhow, >independent of the fbsd size. This is with disklabel aimed at: >sd1 >/dev/rsd1 >/dev/rsd1c >/dev/rsd1s4 >/dev/rsd1s4c.) >Mostly it complains that the a partition extends past the end of unit, >even though the beg is 0 and size matches that in the slice table. >The last complained about no such file. >We need a GOOD writeup on this; I know it can be done. I think you are trying to do too much. Using the whole disk should work as documented in disklabel.8: 1) start with a BLANK disk (e.g., with zeros in the first 8K). 2) disklabel -B -r -w sd1 any-old-junk-label-in-etc-disktab 3) disklabel -e sd1 #edit label to match reality You can skip step 3) if the label in 2) is correct. I often use the completely bogus label `floppy'. Bruce