Date: Mon, 22 Jan 1996 21:37:46 +0100 (MET) From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-current@FreeBSD.org (FreeBSD-current users) Subject: Re: cvs commit: src/sbin/disklabel disklabel.8 disklabel.c Message-ID: <199601222037.VAA06866@uriah.heep.sax.de> In-Reply-To: <199601221658.DAA08250@godzilla.zeta.org.au> from "Bruce Evans" at Jan 23, 96 03:58:31 am
next in thread | previous in thread | raw e-mail | index | archive | help
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. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601222037.VAA06866>