Fwd: [patch] cpioVerbose=medium breaks sysinstall(8) during install
of FreeBSD-8.x/CURRENT (all platforms/media)
Randi Harper
randi at freebsd.org
Fri Oct 29 20:52:07 UTC 2010
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 at vicor.com>
Date: Fri, Oct 29, 2010 at 11:41 AM
Subject: [patch] cpioVerbose=medium breaks sysinstall(8) during
install of FreeBSD-8.x/CURRENT (all platforms/media)
To: FreeBSD-gnats-submit at freebsd.org
Cc: Randi Harper <randi at freebsd.org>, Devin Teske <dteske at vicor.com>
X-send-pr-version: 3.113
X-GNATS-Notify:
>Submitter-Id: current-users
>Originator: Devin Teske <dteske at vicor.com>
>Organization: VICOR
>Confidential: no <FreeBSD PRs are public data>
>Synopsis: [patch] cpioVerbose=medium breaks sysinstall(8) during install of FreeBSD-8.x/CURRENT (all platforms/media)
>Severity: serious
>Priority: low
>Category: bin
>Class: sw-bug
>Release: 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 at 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:
RELENG_8_BP
RELENG_8_0_BP
RELENG_8_0
RELENG_8_0_0_RELEASE
RELENG_8_1_BP
RELENG_8_1
RELENG_8_1_0_RELEASE
RELENG_8
MAIN
HEAD
First occurred:
Mon May 26 17:15:34 2008 UTC (2 years, 5 months ago)
when src/usr.bin/cpio/* was committed to MAIN by kientzle
with comment:
Initial commit of bsddcpio 0.9.11b
A new implementation of cpio that uses libarchive as it's back-end
archiving/dearchiving infrastructure. Includes test harness;
"make check" in the bsdcpio directory to build and run the test
harness.
>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):
DEBUG: Executing command `find -x /stand | cpio -V -pdum /mnt'
Brief Usage:
List: cpio -it < archive
Extract: cpio -i < archive
Create: cpio -o < filenames > archive
Help: cpio --help
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
pressing Alt+F4 to bring up the debug console. Also note that much
of the information displayed in the above image requires debug=YES
to be set for sysinstall(8) (either as an environment variable, as
a 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=medium 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:
"Options View/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
extract the first binary distribution-set (using cpio(1)), the
installation will error-out with the above errors.
>Fix:
Below is a unified patch for three files:
usr.sbin/sysinstall/help/shortcuts.hlp,v 1.13 (RELENG_8_1)
usr.sbin/sysinstall/media.c,v 1.127.2.2.4.1 (RELENG_8_1)
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 2010-10-26
15:37:45.000000000 -0700
@@ -13,7 +13,7 @@ blanktime Screen blank tim
bootManager Select boot manager: booteasy, standard or none
browserBinary Which doc browser to use (default: links)
browserPackage Which package to get browser from (default: links)
-cpioVerbose How verbose to be with cpio: high, medium or low
+cpioVerbose How verbose to be with cpio: high or low
debug Extra debugging?
defaultrouter IP address of default route
disk Which disk to operate on (ad0, da0, etc).
--- usr.sbin/sysinstall/media.c.orig 2010-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()
if (cp && !strcmp(cp, "high"))
return "-v";
- else if (cp && !strcmp(cp, "medium"))
- return "-V";
return "";
}
@@ -848,8 +846,6 @@ mediaSetCPIOVerbosity(dialogMenuItem *se
}
else {
if (!strcmp(cp, "low"))
- variable_set2(VAR_CPIO_VERBOSITY, "medium", 0);
- else if (!strcmp(cp, "medium"))
variable_set2(VAR_CPIO_VERBOSITY, "high", 0);
else /* must be "high" - wrap around */
variable_set2(VAR_CPIO_VERBOSITY, "low", 0);
--- usr.sbin/sysinstall/sysinstall.8.orig 2010-06-13
19:09:06.000000000 -0700
+++ usr.sbin/sysinstall/sysinstall.8 2010-10-26 15:57:21.000000000 -0700
@@ -749,8 +749,7 @@
.Sy Variables :
.Bl -tag -width indent
.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.
.El
.It mediaGetType
Interactively get the user to specify some type of media.
More information about the freebsd-sysinstall
mailing list