i386/79840: Partitioning and formating a new disk fails using
sysinstall
Thomas Schweikle
tps at vr-web.de
Tue Apr 12 15:00:47 PDT 2005
>Number: 79840
>Category: i386
>Synopsis: Partitioning and formating a new disk fails using=20
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-i386
>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:
>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 at 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:
>Unformatted:
--nextPart4155202.9uMENfhfao
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-send-pr-version: 3.113
X-GNATS-Notify:=20
Since send-pr is broken, claiming to have a categorie 'i386', but=20
telling if I set the categorie to 'i386' this category doesn't=20
exist, I'll send this bug report without using send-pr.
sysinstall
More information about the freebsd-i386
mailing list