From owner-freebsd-current Mon Jan 22 12:56:19 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA12818 for current-outgoing; Mon, 22 Jan 1996 12:56:19 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA12807 for ; Mon, 22 Jan 1996 12:56:10 -0800 (PST) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id VAA08052 for ; Mon, 22 Jan 1996 21:55:40 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id VAA09031 for freebsd-current@FreeBSD.org; Mon, 22 Jan 1996 21:55:40 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.7.3/8.6.9) id VAA06866 for freebsd-current@FreeBSD.org; Mon, 22 Jan 1996 21:37:46 +0100 (MET) From: J Wunsch Message-Id: <199601222037.VAA06866@uriah.heep.sax.de> Subject: Re: cvs commit: src/sbin/disklabel disklabel.8 disklabel.c To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Mon, 22 Jan 1996 21:37:46 +0100 (MET) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199601221658.DAA08250@godzilla.zeta.org.au> from "Bruce Evans" at Jan 23, 96 03:58:31 am X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-current@FreeBSD.org Precedence: bulk As Bruce Evans wrote: > > > The magic sequence is: > > > > disklabel -r -w sdX auto > > disklabel -e sdX > > This seems to only work on dangerously dedicated disks, and labelling > those is easy using standard features: > > disklabel /dev/rsdX | > sed -e s'/interleave: 0$/interleave: 1/' \ > -e s'/rpm: 0$/rpm: 3600/' \ > -e s'/^[1-7] partitions/8 partitions/' | > disklabel -r -R sdX /dev/stdin > disklabel -e sdX > > This gives the same label as auto for the same drives that auto works on. Of course. But ``disklabel ... auto'' is way more convenient if it comes to Usenet support. I've simply been tired from singing the same prayer over and over again... Well, i'm aware that i've stolen the word "auto" from the possible name space of /etc/disktab :), but i think the added value justifies this. > It gives the same bogus values for the interleave and the rpm and the > same maximal number of partitions. Deliberately. I don't think we support more than 8 partitions, and the bogus rpm and interleave values are not used that much anyways (since newfs uses a bogus geometry by default). People who are eager to modify it will be able doing so in the following disklabel -e, it's just that a label is required that will be acceptable to be written to the disk. > Neither aproach works so well for slices. I decided not to implement > dummy labels for slices, so that the success of DIOCGDINFO tells whether > the slice is really labeled. This was probably a mistake. Yup, i have only been able to test it on a non-sliced disk (due to the lack of a sliced one around me :), i was silently hoping that DIOCGDINFO would return the bogus label for a slice too -- it does even for a CDROM. ;-) I've rather hacked this since it was a ``Frequently Requested Item'', not since it's the cleanest solution i could ever think of. I'm still in the hope that somebody feels challenged enough to wrap a nice tool around libdisk for adding a new disk with a better user-interaction. disklabel ... auto is only intended for people who do already know how to use disklabel(8), just to save them the dirty work. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)