Date: Sat, 12 Sep 1998 14:21:17 -0400 From: Gary Algier <gaa@dgms.com> To: freebsd-questions@FreeBSD.ORG Subject: I can't disklabel a disk slice. Message-ID: <35FABB9D.D401D956@dgms.com>
next in thread | raw e-mail | index | archive | help
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: <UNUSED> The data for partition 3 is: <UNUSED> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35FABB9D.D401D956>