From tps@vr-web.de  Tue Apr 12 21:59:13 2005
Return-Path: <tps@vr-web.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7785416A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 12 Apr 2005 21:59:13 +0000 (GMT)
Received: from mx0.vr-web.de (mx0.vr-web.de [195.200.35.198])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6491943D2D
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 12 Apr 2005 21:59:12 +0000 (GMT)
	(envelope-from tps@vr-web.de)
Received: from mx0.vr-web.de (vrwf203.vrweb.de [::ffff:192.168.27.26])
  by mx0.vr-web.de with esmtp; Tue, 12 Apr 2005 23:59:10 +0200
  id 0005FE46.425C44AE.000042C0
Received: from hazel (pD9ECE02D.dip0.t-ipconnect.de [::ffff:217.236.224.45])
  (QVVUSDogUExBSU4gdHBzLCBUTFM6IFRMU3YxL1NTTHYzLDEyOGJpdHMsUkM0LU1ENQ==)
  by mx0.vr-web.de with esmtp; Tue, 12 Apr 2005 23:59:08 +0200
  id 000E3913.425C44AD.00004DFB
Message-Id: <200504122359.03799.tps@vr-web.de>
Date: Tue, 12 Apr 2005 23:58:55 +0200
From: Thomas Schweikle <tps@vr-web.de>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Partitioning and formating a new disk fails using sysinstall

>Number:         79840
>Category:       bin
>Synopsis:       sysinstall(8): Partitioning and formating a new disk fails using sysinstall
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-sysinstall
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 12 22:00:46 GMT 2005
>Closed-Date:    
>Last-Modified:  Tue Jul 13 13:37:19 UTC 2010
>Originator:     Thomas Schweikle
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
private
>Environment:
System: FreeBSD hazel.tps 5.4-STABLE FreeBSD 5.4-STABLE #31: Tue Apr=20
5 09:17:05 CEST 2005 screen@hazel.tps:/usr/obj/usr/src/sys/HAZEL=20
i386
	PII / 512MiByte RAM
	Adaptec SCSI
		HD1: 9GiByte
		HD2: 32GiByte
		HD3 (temporary): 9GiByte

>Description:
	walnut# dd if=3D/dev/zero of=3Ddev/da2 bs=3D1024 count=3D4
	walnut# /stand/sysinstall

	Goto "Configure"
	Goto "Fdisk"
	Select "da2"
	Key "A" - "Use Entire Disk"
	Key "W" - "Write Changes"
	Select "Yes" for "User Confirmation Requested"
	Select "BootMgr"
	Tab to "OK"
	Key "CR"
	Message "Wrote FDISK partition information out successfully."
	Key "CR"
	Key "Q"

	Goto "Label"
	Key "C"
	Partition Size: "384M"; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new"; Key "CR"
	Partition Size: "256M"; Key "CR"
	Partition Type: "SWAP"; Key "CR"
	Partition Size: "384M"; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new/tmp"; Key "CR"
	Partition Size: "384M"; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new/var"; Key "CR"
	Partition Size: "1G"; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new/home"; Key "CR"
	Partition Size: keep what is given; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new/usr"; Key "CR"
	Select "da2s1d"; Key "S"

	Now it is shown:
	Disk: da2       Partition name: da2s1   Free: 0 blocks (0MB)

	Part      Mount          Size Newfs
	----      -----          ---- -----
	da2s1d    /new          384MB UFS2   Y
	da2s1b    swap          256MB SWAP
	da2s1e    /new/tmp      384MB UFS2+S Y
	da2s1f    /new/var      384MB UFS2+S Y
	da2s1g    /new/home    1024MB UFS2+S Y
	da2s1h    /new/usr     3710MB UFS2+S Y

	Key "W"
	"User Confirmation Requested" - Select "Yes"; Key "CR"
	"Unable to add /dev/da2s1b as swap device: \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1d on /new : \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1g on /new/home : \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1e on /new/tmp : \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1h on /new/usr : \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1f on /new/var : \
	   No such file or directory"; Key "CR"
	Key "Q"
	Select "X Exit"; Key "CR"
	Select "X Exit Install"; Key "CR"

	Now have a look at what "ls" tells us:
	walnut# ll /
	total 60
	-r--r--r--   1 root  wheel  6192 Jan 31 10:18 COPYRIGHT
	drwxr-xr-x   2 root  wheel  1024 Apr  7 01:22 bin
	[...]
	drwxr-xr-x   6 root  wheel   512 Apr  7 23:06 new
	[...]
	walnut#
	The errors above are not because "/new" did not exist.

	What about "ls -la /dev/da2*":
	crw-r-----  1 root  operator    4,  14 Apr  8 20:07 /dev/da2
	crw-r-----  1 root  operator    4,  91 Apr  8 18:24 /dev/da2s1
	crw-r-----  1 root  operator    4,  92 Apr  8 18:24 /dev/da2s1c

	The same with a "DD" disk:
	walnut# dd if=3D/dev/zero of=3Ddev/da2 bs=3D1024 count=3D4
	walnut# /stand/sysinstall

	Goto "Configure"
	Goto "Fdisk"
	Select "da2"
	Key "A" - "Use Entire Disk"
	Key "F" - "'DD' Mode"
	"Do you want to do this with a true ..."; Select "No"; Key "CR"
	Key "W" - "Write Changes"
	Select "Yes" for "User Confirmation Requested"
	Message "Wrote FDISK partition information out successfully."
	Key "CR"
	Key "Q"

	Goto "Label"
	Key "C"
	Partition Size: "384M"; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new"; Key "CR"
	Partition Size: "256M"; Key "CR"
	Partition Type: "SWAP"; Key "CR"
	Partition Size: "384M"; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new/tmp"; Key "CR"
	Partition Size: "384M"; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new/var"; Key "CR"
	Partition Size: "1G"; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new/home"; Key "CR"
	Partition Size: keep what is given; Key "CR"
	Partition Type: "FS"; Key "CR"
	Mount Point: "/new/usr"; Key "CR"
	Select "da2s1d"; Key "S"

	Now it is shown:
	Disk: da2       Partition name: da2s1   Free: 0 blocks (0MB)

	Part      Mount          Size Newfs
	----      -----          ---- -----
	da2s1d    /new          384MB UFS2   Y
	da2s1b    swap          256MB SWAP
	da2s1e    /new/tmp      384MB UFS2+S Y
	da2s1f    /new/var      384MB UFS2+S Y
	da2s1g    /new/home    1024MB UFS2+S Y
	da2s1h    /new/usr     3710MB UFS2+S Y

	Key "W"
	"User Confirmation Requested" - Select "Yes"; Key "CR"
	"Unable to add /dev/da2s1b as swap device: \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1d on /new : \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1g on /new/home : \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1e on /new/tmp : \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1h on /new/usr : \
	   No such file or directory"; Key "CR"
	"Error mounting /dev/da2s1f on /new/var : \
	   No such file or directory"; Key "CR"
	Key "Q"
	Select "X Exit"; Key "CR"
	Select "X Exit Install"; Key "CR"

	Now have a look at what "ls" tells us:
	walnut# ll /
	total 60
	-r--r--r--   1 root  wheel  6192 Jan 31 10:18 COPYRIGHT
	drwxr-xr-x   2 root  wheel  1024 Apr  7 01:22 bin
	[...]
	drwxr-xr-x   6 root  wheel   512 Apr  7 23:06 new
	[...]
	walnut#
	The errors above are not because "/new" did not exist.

	What about "ls -la /dev/da2*":
	crw-r-----  1 root  operator    4,  14 Apr  8 20:07 /dev/da2
	crw-r-----  1 root  operator    4,  91 Apr  8 18:24 /dev/da2s1
	crw-r-----  1 root  operator    4,  92 Apr  8 18:24 /dev/da2s1c

>How-To-Repeat:
	start sysinstall, then follow the instructions above.

>Fix:
	Workaround: use fdisk/bsdlabel instead.

        walnut# dd if=3D/dev/zero of=3Ddev/da2 bs=3D1024 count=3D4
        walnut# fdisk -I -v /dev/da2
        ******* Working on device /dev/da2 *******
        fdisk: invalid fdisk partition table found
        parameters extracted from in-core disklabel are:
        cylinders=3D783 heads=3D255 sectors/track=3D63 (16065 blks/cyl)

        parameters to be used for BIOS calculations are:
        cylinders=3D783 heads=3D255 sectors/track=3D63 (16065 blks/cyl)

        Information from DOS bootblock is:
        1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
            start 63, size 12578832 (6142 Meg), flag 80 (active)
                beg: cyl 0/ head 1/ sector 1;
                end: cyl 782/ head 254/ sector 63
        2: <UNUSED>
        3: <UNUSED>
        4: <UNUSED>
        walnut# ls -la /dev/da2*
        crw-r----- 1 root  operator  4,  14 Apr  8 20:46 /dev/da2
        crw-r----- 1 root  operator  4, 101 Apr  8 18:24 /dev/da2s1
        crw-r----- 1 root  operator  4, 102 Apr  8 18:24 /dev/da2s1c

	OK so far. Take the part with bsdlabel. First create a file
	holding all partition information (I have named it "label.txt"):
        # /dev/da2:
        8 partitions:
        #        size   offset    fstype   [fsize bsize bps/cpg]
          a:     384M        *    4.2BSD
          b:     256M        *    swap
          d:     384M        *    4.2BSD
          e:     384M        *    4.2BSD
          f:       1G        *    4.2BSD
          g:        *        *    4.2BSD

	walnut# bsdlabel -B -R label.txt
        walnut# ls -la /dev/da2*
        crw-r-----  1 root operator  4,  14 Apr  8 20:46 /dev/da2
        crw-r-----  1 root operator  4, 101 Apr  8 18:24 /dev/da2s1
        crw-r-----  1 root operator  4, 118 Apr  8 18:26 /dev/da2s1a
        crw-r-----  1 root operator  4, 119 Apr  8 18:26 /dev/da2s1b
        crw-r-----  1 root operator  4, 102 Apr  8 18:24 /dev/da2s1c
        crw-r-----  1 root operator  4, 121 Apr  8 18:26 /dev/da2s1d
        crw-r-----  1 root operator  4, 122 Apr  8 18:26 /dev/da2s1e
        crw-r-----  1 root operator  4, 123 Apr  8 18:26 /dev/da2s1f
        crw-r-----  1 root operator  4, 124 Apr  8 18:26 /dev/da2s1g

        Now no errors creating the file systems and mounting:
        walnut# newfs -O2 /dev/da2s1a
        walnut# newfs -O2 -U /dev/da2s1d
        walnut# newfs -O2 -U /dev/da2s1e
        walnut# newfs -O2 -U /dev/da2s1f
        walnut# newfs -O2 -U /dev/da2s1g

        walnut# mount /dev/da2s1a /new
        walnut# mkdir /new/tmp; mount /dev/da2s1d /new/tmp
        walnut# mkdir /new/var; mount /dev/da2s1e /new/var
        walnut# mkdir /new/home; mount /dev/da2s1f /new/home
        walnut# mkdir /new/usr; mount /dev/da2s1g /new/usr

        walnut# mount
        [...]
        /dev/da2s1a on /new (ufs, local)
        /dev/da2s1d on /new/tmp (ufs, local, soft-updates)
        /dev/da2s1e on /new/var (ufs, local, soft-updates)
        /dev/da2s1f on /new/home (ufs, local, soft-updates)   =20
        /dev/da2s1g on /new/usr (ufs, local, soft-updates)   =20


--nextPart4155202.9uMENfhfao
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQBCXESnJuPdOes4UCQRAtzWAJ9Ocx0Heh77Mus1XWKgd/6E25FyDQCePlsV
tpEJASvrwzq3eou75u5DqPU=
=aGE2
-----END PGP SIGNATURE-----

--nextPart4155202.9uMENfhfao--
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: gavin 
State-Changed-When: Thu Jun 28 16:38:21 UTC 2007 
State-Changed-Why:  

To submitter:  Do you still see this problem on later versions of FreeBSD? 
I suspect this was fixed when sysinstall was taught about GEOM. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79840 

From: Thomas Schweikle <tps@vr-web.de>
To: bug-followup@FreeBSD.org, tps@vr-web.de
Cc:  
Subject: Re: i386/79840: sysinstall(8): Partitioning and formating a new disk
 fails using sysinstall
Date: Thu, 05 Jul 2007 08:10:05 +0200

 This is a MIME-formatted message.  If you see this text it means that your
 E-mail software does not support MIME-formatted messages.
 
 --=_vrwf203-15438-1183615840-0001-2
 Content-Type: text/plain; charset=ISO-8859-15
 Content-Transfer-Encoding: quoted-printable
 
 I do see this problem with 6.1, 6.2 I did not test --- maybe
 tomorrow. With 7.0 it seems gone.
 
 --=20
 Thomas
 
 
 --=_vrwf203-15438-1183615840-0001-2
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Transfer-Encoding: 7bit
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.5 (MingW32)
 Comment: GnuPT 2.9.2
 
 iD8DBQFGjItDJuPdOes4UCQRAjzRAJ9yuPv2EpktSFhW5Jq6oYAkLkFEIwCgmUqj
 BSIbznQrrz5rQY157x2z39s=
 =RHey
 -----END PGP SIGNATURE-----
 
 --=_vrwf203-15438-1183615840-0001-2--
 
State-Changed-From-To: feedback->open 
State-Changed-By: gavin 
State-Changed-When: Mon Jul 30 10:14:23 UTC 2007 
State-Changed-Why:  
Submitter provided feedback: this seems fixed in -HEAD but not 6.1. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79840 

From: Thomas Schweikle <tps@vr-web.de>
To: bug-followup@FreeBSD.org, tps@vr-web.de
Cc:  
Subject: Re: i386/79840: sysinstall(8): Partitioning and formating a new disk
 fails using sysinstall
Date: Wed, 29 Aug 2007 23:06:38 +0200

 This is a MIME-formatted message.  If you see this text it means that your
 E-mail software does not support MIME-formatted messages.
 
 --=_vrwf103-4065-1188421634-0001-2
 Content-Type: text/plain; charset=ISO-8859-15
 Content-Transfer-Encoding: quoted-printable
 
 I could test again with the latest system compiled for
 - FreeBSD 5.5
 - FreeBSD 6.1
 - FreeBSD 6.2
 - FreeBSD HEAD
 
 The problem exists with
 - FreeBSD 5.5
 - FreeBSD 6.1
 - FreeBSD 6.2
 
 The problem does not exist anymore with
 - FreeBSD HEAD
 
 All systems checked out at Aug., 27th 2007
 
 --=20
 Thomas
 
 
 --=_vrwf103-4065-1188421634-0001-2
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Transfer-Encoding: 7bit
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (MingW32)
 Comment: GnuPT 2.9.2
 
 iD8DBQFG1d/jJuPdOes4UCQRAjrEAJ4ripCIGGdxyaqn2w+teJpc32RwcQCffeSI
 4EezuAhikuuLlylaA6/vlLI=
 =HuFF
 -----END PGP SIGNATURE-----
 
 --=_vrwf103-4065-1188421634-0001-2--
 

From: =?ISO-8859-1?Q?Erik_Ran=E0?= <ranajas@hotmail.com>
To: bug-followup@FreeBSD.org, tps@vr-web.de
Cc:  
Subject: Re: i386/79840: sysinstall(8): Partitioning and formating a new disk
 fails using sysinstall
Date: Fri, 21 Nov 2008 23:03:17 +0100

 I got the same error several times on several diffrent machines.
 label in sysinstall is not working correctly.
 
 1 workaround to get it to work is to exit sysinstall och enter it again.
 -----
 Usally the label will only show the last disk that was handled last time?
 
 
 So except problem with label not beeing able to write the changes (mount 
 problem?)
 Label cache the last used disk and dont display other disks..
 
 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     
 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Apr 20 20:29:45 UTC 2009 
Responsible-Changed-Why:  
Canonicalize assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79840 
Responsible-Changed-From-To: freebsd-bugs->freebsd-sysinstall 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Tue Jul 13 13:37:18 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79840 
>Unformatted:
