From owner-freebsd-questions Sat Sep 12 11:23:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA28636 for freebsd-questions-outgoing; Sat, 12 Sep 1998 11:23:32 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from garnet.dgms.com (client-151-204-207-98.bellatlantic.net [151.204.207.98]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA28452 for ; Sat, 12 Sep 1998 11:22:50 -0700 (PDT) (envelope-from gaa@dgms.com) Received: from dgms.com (localhost [127.0.0.1]) by garnet.dgms.com (8.8.8/8.8.8) with ESMTP id OAA12851 for ; Sat, 12 Sep 1998 14:21:18 -0400 (EDT) (envelope-from gaa@dgms.com) Message-ID: <35FABB9D.D401D956@dgms.com> Date: Sat, 12 Sep 1998 14:21:17 -0400 From: Gary Algier X-Mailer: Mozilla 4.04 [en] (X11; I; FreeBSD 2.2.7-STABLE i386) MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: I can't disklabel a disk slice. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have been struggling with disklabel in an attempt to disklabel a new slice. I can get it to disklabel a whole disk, but not a slice: ------------------------------------------------------------------------ [whole disk -- this is a zip disk BTW] # dd if=/dev/zero of=/dev/rsd1 count=2 2+0 records in 2+0 records out 1024 bytes transferred in 0.040394 secs (25350 bytes/sec) # disklabel -Brw sd1 auto # disklabel sd1 # /dev/rsd1c: type: unknown disk: label: flags: bytes/sector: 512 sectors/track: 32 tracks/cylinder: 64 sectors/cylinder: 2048 cylinders: 96 sectors/unit: 196608 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 196608 0 unused 0 0 # (Cyl. 0 - 95) ------------------------------------------------------------------------ [slice -- same disk after zeroing and fdisking] # fdisk sd1 ******* Working on device /dev/rsd1 ******* parameters extracted from in-core disklabel are: cylinders=96 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=96 heads=64 sectors/track=32 (2048 blks/cyl) Media sector size is 512 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 1, size 98303 (47 Meg), flag 0 beg: cyl 0/ sector 2/ head 0; end: cyl 47/ sector 32/ head 63 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 98304, size 98304 (48 Meg), flag 80 (active) beg: cyl 48/ sector 1/ head 0; end: cyl 95/ sector 32/ head 63 # disklabel -Brw sd1s4 auto disklabel: ioctl DIOCGDINFO: Invalid argument # disklabel -Brw sd1s1 auto disklabel: ioctl DIOCGDINFO: Invalid argument ------------------------------------------------------------------------ What is wrong? I have tried all "n" combinations of options to disklabel but it seems as if the kernel won't let me disklabel a slice. Once it has been done (vi /stand/sysinstall) it can be edited with "disklabel -e", but that does me no good -- I can't scriptify sysinstall. Also, if one does get it disklabeled and then the label becomes invalid (I moved a partition on my hard disk with Partition-It) even disklabel -e can't write the label (I tried to edit the values to make the moved partition correct again). Is there a bug? Am I missing some "magic" option to force it? How come sysinstall can do it but disklabel can't? -- Gary Algier, WB2FWZ gary.algier@dgms.com +1 609 608 2758 DGM&S Telecom, 1025 Briggs Rd, Mt. Laurel, NJ 08054 Fax:+1 609 866 8850 Paul Petzoldt on the renaming of Mount Washington: "I Call it the New England Booby Trap. We see Ph.D.'s from private schools taking kids up there in shorts. People die like flies up there!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message