From root@camelot.com  Sat Mar 18 22:10:39 2000
Return-Path: <root@camelot.com>
Received: from galahad.camelot.com (Galahad.Camelot.com [192.55.203.135])
	by hub.freebsd.org (Postfix) with ESMTP id B800937B6A6
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 18 Mar 2000 22:10:29 -0800 (PST)
	(envelope-from root@camelot.com)
Received: by galahad.camelot.com (Postfix, from userid 0)
	id 7717612C30; Sun, 19 Mar 2000 01:10:24 -0500 (EST)
Message-Id: <20000319061024.7717612C30@galahad.camelot.com>
Date: Sun, 19 Mar 2000 01:10:24 -0500 (EST)
From: cjohnson@camelot.com
Sender: root@camelot.com
Reply-To: cjohnson@camelot.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: <Synopsis of the problem (one line)>
X-Send-Pr-Version: 3.2

>Number:         17483
>Category:       kern
>Synopsis:       Cannot run disklabel on virgin disk
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 18 22:20:00 PST 2000
>Closed-Date:    Tue Jun 5 14:29:43 PDT 2001
>Last-Modified:  Tue Jun 05 14:35:06 PDT 2001
>Originator:     Christopher T. Johnson
>Release:        FreeBSD 4.0-RELEASE
>Organization:
Paladin Software
>Environment:
	FreeBSD 4.0-RELEASE and prior.  P233 SMP (Fails with UP as well)
	Pure SCSI system.

<QUANTUM FIREBALL ST4.3S 0F0C>     at scbus0 target 0 lun 0 (pass0,da0)
<EXABYTE EXB-8200 251K>            at scbus0 target 4 lun 0 (pass1,sa0)
<TOSHIBA CD-ROM XM-5701TA 0167>    at scbus0 target 5 lun 0 (pass2,cd0)
<IMS CDD2000/00 1.26>              at scbus0 target 6 lun 0 (pass3,cd1)
<FUJITSU M2954Q-512 0177>          at scbus1 target 0 lun 0 (pass4,da1)
<SEAGATE ST39140W 1281>            at scbus1 target 1 lun 0 (pass5,da2)
<SEAGATE ST43400N 1022>            at scbus1 target 2 lun 0 (pass6,da3)
<SEAGATE ST43400N 1028>            at scbus1 target 3 lun 0 (pass7,da4)
<QUANTUM FIREBALL_TM2110S 300X>    at scbus1 target 5 lun 0 (pass8,da5)
<SEAGATE ST43400N 1028>            at scbus1 target 6 lun 0 (pass9,da6)


>Description:
The Fujitsu just came back from repair.  It had no partition, no labels
no nothing.  Used camcontrol cmd -n da -u 3 -v -t 7200 -c "4 0 0 0 0 0"
To prep the drive as it seemed to have some media errors.

After that ran "fdisk -e" Which reported that -e still exists but the
man page says "fdisk -I" is what I want now.  (Thank you for the change,
I destroyed my slice table once trying to edit it with fdisk -e)  Ran
fdisk -I and the results were:

The data for partition 1 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
    start 63, size 8498322 (4149 Meg), flag 80 (active)
        beg: cyl 0/ sector 1/ head 1;
        end: cyl 528/ sector 63/ head 254

This looks good, so I try to write a disklabel:
su-2.03# disklabel -w -r da1s1 auto
disklabel: ioctl DIOCGDINFO: Invalid argument
disklabel: auto: unknown disk type

and:
su-2.03# disklabel -w -r da1 auto
disklabel: No space left on device

I've never been able to get disklabel to work on a virgin disk...

>How-To-Repeat:

See description

>Fix:
work around is to use a current version of sysinstall.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Tue Jun 5 14:29:43 PDT 2001 
State-Changed-Why:  

This was fixed just after 4.2-RELEASE. disklabel should now be 
able to initialise slices as well as raw disks. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17483 
>Unformatted:
