Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Oct 2010 13:52:06 -0700
From:      Randi Harper <randi@freebsd.org>
To:        freebsd-sysinstall@freebsd.org, Devin Teske <dteske@vicor.com>
Subject:   Fwd: [patch] cpioVerbose=medium breaks sysinstall(8) during install of FreeBSD-8.x/CURRENT (all platforms/media)
Message-ID:  <AANLkTi=_Vcc9cUSG2Zo2=g3UpvW4jMrtDLDgnBoMh1qF@mail.gmail.com>
In-Reply-To: <1288377694.17949.10.camel@localhost.localdomain>
References:  <1288377694.17949.10.camel@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm going to get on this in the next few days as I have some pending
commits from gcooper to take care of as well. Still in the middle of
unpacking. The boxes containing my computers have not even been
touched yet. ;)

-- randi




---------- Forwarded message ----------
From: Devin Teske <dteske@vicor.com>
Date: Fri, Oct 29, 2010 at 11:41 AM
Subject: [patch] cpioVerbose=3Dmedium breaks sysinstall(8) during
install of FreeBSD-8.x/CURRENT (all platforms/media)
To: FreeBSD-gnats-submit@freebsd.org
Cc: Randi Harper <randi@freebsd.org>, Devin Teske <dteske@vicor.com>


X-send-pr-version: 3.113
X-GNATS-Notify:


>Submitter-Id: =A0current-users
>Originator: =A0 =A0Devin Teske <dteske@vicor.com>
>Organization: =A0VICOR
>Confidential: =A0no <FreeBSD PRs are public data>
>Synopsis: =A0 =A0 =A0[patch] cpioVerbose=3Dmedium breaks sysinstall(8) dur=
ing install of FreeBSD-8.x/CURRENT (all platforms/media)
>Severity: =A0 =A0 =A0serious
>Priority: =A0 =A0 =A0low
>Category: =A0 =A0 =A0bin
>Class: =A0 =A0 =A0 =A0 sw-bug
>Release: =A0 =A0 =A0 FreeBSD 8.1-RELEASE i386
>Environment:
System: FreeBSD push810.linux.vicor.com 8.1-RELEASE FreeBSD 8.1-RELEASE
#0: Mon Jul 19 02:55:53 UTC 2010
root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

Occurs on all archs:
alpha/amd64/arm/i386/ia64/mips/pc98/ppc/sparc64/sun4v

Occurs on all platforms:
Walnut Creek CD/DVD, FreeBSD Mall CD/DVD, USB, and from installed
distribution.

Occurs on tags:
=A0 RELENG_8_BP
=A0 RELENG_8_0_BP
=A0 RELENG_8_0
=A0 RELENG_8_0_0_RELEASE
=A0 RELENG_8_1_BP
=A0 RELENG_8_1
=A0 RELENG_8_1_0_RELEASE
=A0 RELENG_8
=A0 MAIN
=A0 HEAD

First occurred:
=A0 Mon May 26 17:15:34 2008 UTC (2 years, 5 months ago)
=A0 when src/usr.bin/cpio/* was committed to MAIN by kientzle
=A0 with comment:

=A0 =A0 =A0Initial commit of bsddcpio 0.9.11b

=A0 =A0 =A0A new implementation of cpio that uses libarchive as it's back-e=
nd
=A0 =A0 =A0archiving/dearchiving infrastructure. =A0Includes test harness;
=A0 =A0 =A0"make check" in the bsdcpio directory to build and run the test
=A0 =A0 =A0harness.

>Description:
When installing FreeBSD, either (a) as scripted installation using
install.cfg, environment variables, or command-line arguments to
sysinstall(8) or (b) as a manual installation using ncurses(3)-based
menus, if the cpioVerbose feature is set to "medium", the installation
fails with the following errors (after performing newfs(8), upon
attempting to extract the first binary distribution-set [base]):

1. "Copy returned error status of 1!"

See: http://druidbsd.sf.net/images/cpioVerbose_medium_ttyv0_error1.png

2. "installInitial: Couldn't clone the boot floppy onto the root file
system. Aborting!"

See: http://druidbsd.sf.net/images/cpioVerbose_medium_ttyv0_error2.png
NOTE: These errors (#1 and #2) occur one after the other.

3. (on the debug console):
=A0 DEBUG: Executing command `find -x /stand | cpio -V -pdum /mnt'
=A0 Brief Usage:
=A0 =A0 List: =A0 =A0cpio -it < archive
=A0 =A0 Extract: cpio -i < archive
=A0 =A0 Create: =A0cpio -o < filenames > archive
=A0 =A0 Help: =A0 =A0cpio --help
=A0 DEBUG: Command `find -x /stand | cpio -V -pdum /mnt' returns status of =
1

See: http://druidbsd.sf.net/images/cpioVerbose_medium_ttyv1_error.png
NOTE: When installing from CD/DVD release, this output is visible by
=A0 =A0 =A0pressing Alt+F4 to bring up the debug console. Also note that mu=
ch
=A0 =A0 =A0of the information displayed in the above image requires debug=
=3DYES
=A0 =A0 =A0to be set for sysinstall(8) (either as an environment variable, =
as
=A0 =A0 =A0a command-line argument, or in install.cfg).

>From this point-on, you must restart the installation process as you are
returned to the main install menu of sysinstall(8) after acknowledging
errors #1 and #2 above.

The problem is entirely that cpio(1) was replaced with a new version
that does not accept the `-V' (or `--dot') flag. Historically, previous
releases used GNU cpio(1) (in contrib) whereas FreeBSD-8.x uses BSD cpio
(1) which is not forward-compatible with the GNU flags.

In the error visible on the debug console, we see that passing of `-V'
for when cpioVerbose=3Dmedium results in BSD cpio(1) producing a short
usage-statement followed by an exit with error status 1.

>How-To-Repeat:
Start your installation process of installing a new FreeBSD system. Feel
free to use any FreeBSD-8.x disc/media.

1. At the main menu of sysinstall(8), choose the option entitled:
=A0 "Options =A0 =A0 =A0 =A0View/Set various installation options"
2. Use the UP/DOWN cursor keys to highlight the "Extract Detail" option
3. Press SPACE until `medium' is shown
4. Press Q to exit the Options-Editor
5. Perform the rest of your install as usual
6. After newfs(8) is performed, just as sysinstall(8) attempts to
=A0 extract the first binary distribution-set (using cpio(1)), the
=A0 installation will error-out with the above errors.

>Fix:
Below is a unified patch for three files:
=A0 usr.sbin/sysinstall/help/shortcuts.hlp,v 1.13 (RELENG_8_1)
=A0 usr.sbin/sysinstall/media.c,v 1.127.2.2.4.1 (RELENG_8_1)
=A0 usr.sbin/sysinstall/sysinstall.8,v 1.81.2.3.2.1 (RELENG_8_1)

The below patch removes the `medium' option (passes `-V' to cpio(1)) for
the cpioVerbose setting, making the only two options now `high' (passes
`-v' flag to cpio(1)) or `low' (does not pass `-v' to cpio(1)).

--- usr.sbin/sysinstall/help/shortcuts.hlp.orig 2007-06-25
09:37:17.000000000 -0700
+++ usr.sbin/sysinstall/help/shortcuts.hlp =A0 =A0 =A02010-10-26
15:37:45.000000000 -0700
@@ -13,7 +13,7 @@ blanktime =A0 =A0 =A0 =A0 =A0 =A0 =A0 Screen blank tim
=A0bootManager =A0 =A0 =A0 =A0 =A0 =A0 Select boot manager: booteasy, stand=
ard or none
=A0browserBinary =A0 =A0 =A0 =A0 =A0 Which doc browser to use (default: lin=
ks)
=A0browserPackage =A0 =A0 =A0 =A0 =A0Which package to get browser from (def=
ault: links)
-cpioVerbose =A0 =A0 =A0 =A0 =A0 =A0 How verbose to be with cpio: high, med=
ium or low
+cpioVerbose =A0 =A0 =A0 =A0 =A0 =A0 How verbose to be with cpio: high or l=
ow
=A0debug =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Extra debugging?
=A0defaultrouter =A0 =A0 =A0 =A0 =A0 IP address of default route
=A0disk =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Which disk to operate on (ad=
0, da0, etc).
--- usr.sbin/sysinstall/media.c.orig =A0 =A02010-06-13 19:09:06.000000000 -=
0700
+++ usr.sbin/sysinstall/media.c 2010-10-26 15:51:06.000000000 -0700
@@ -117,8 +117,6 @@ cpioVerbosity()

=A0 =A0 if (cp && !strcmp(cp, "high"))
=A0 =A0 =A0 =A0return "-v";
- =A0 =A0else if (cp && !strcmp(cp, "medium"))
- =A0 =A0 =A0 return "-V";
=A0 =A0 return "";
=A0}

@@ -848,8 +846,6 @@ mediaSetCPIOVerbosity(dialogMenuItem *se
=A0 =A0 }
=A0 =A0 else {
=A0 =A0 =A0 =A0if (!strcmp(cp, "low"))
- =A0 =A0 =A0 =A0 =A0 variable_set2(VAR_CPIO_VERBOSITY, "medium", 0);
- =A0 =A0 =A0 else if (!strcmp(cp, "medium"))
=A0 =A0 =A0 =A0 =A0 =A0variable_set2(VAR_CPIO_VERBOSITY, "high", 0);
=A0 =A0 =A0 =A0else /* must be "high" - wrap around */
=A0 =A0 =A0 =A0 =A0 =A0variable_set2(VAR_CPIO_VERBOSITY, "low", 0);
--- usr.sbin/sysinstall/sysinstall.8.orig =A0 =A0 =A0 2010-06-13
19:09:06.000000000 -0700
+++ usr.sbin/sysinstall/sysinstall.8 =A0 =A02010-10-26 15:57:21.000000000 -=
0700
@@ -749,8 +749,7 @@
=A0.Sy Variables :
=A0.Bl -tag -width indent
=A0.It cpioVerbose
-Can be used to set the verbosity of cpio extractions to low, medium or
-high.
+Can be used to set the verbosity of cpio extractions to low or high.
=A0.El
=A0.It mediaGetType
=A0Interactively get the user to specify some type of media.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=_Vcc9cUSG2Zo2=g3UpvW4jMrtDLDgnBoMh1qF>