Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#39 closed defect (fixed)

/var/var weirdness on boot

Reported by: rick Owned by: rick
Priority: major Milestone:
Keywords: Cc:
Resource needed to fix: embedded system

Description

ad0: 961MB <CF Card Ver2.21> at ata0-master UDMA33
GEOM_LABEL: Label for provider ad0s3 is ufsid/4a0068da6f2ce37f.
GEOM_LABEL: Label for provider ad0s1a is ufsid/4a0068673477ba29.
Trying to mount root from ufs:/dev/ad0s1a
Invalid time in clock: check and reset the date!
GEOM_LABEL: Label for provider md0 is ufsid/4a0068b8ecd8a206.
GEOM_LABEL: Label ufsid/4a0068b8ecd8a206 removed.
GEOM_LABEL: Label for provider md1 is ufsid/4a0068bbf1b860f0.
GEOM_LABEL: Label ufsid/4a0068bbf1b860f0 removed.
cp: utimes: /var/var: No such file or directory
cp: chown: /var/var: No such file or directory
cp: chmod: /var/var: No such file or directory
cp: chflags: /var/var: No such file or directory
Loading configuration files.

Change History (7)

comment:1 by rick, 15 years ago

Owner: changed from nobody to rick
Status: newaccepted

Enabled debugging:

%grep -C 2 o_verbose= etc/rc.initdiskless
# DEBUGGING
# log something on stdout if verbose.
o_verbose=1     # set to 1 or 2 if you want more debugging
log() {
    [ ${o_verbose} -gt 0 ] && echo "*** $* ***"

some content for the use of debugging:

mount_nfs: can't update /var/db/mounttab for 192.168.4.1:/data/cfg
*** handle_remount /conf/default/etc ***
*** handle_remount /conf/default/var ***
*** create_md etc with size 10240 ***
GEOM_LABEL: Label for provider md0 is ufsid/4a353d3201dad57f.
GEOM_LABEL: Label ufsid/4a353d3201dad57f removed.
*** create_md var with size 10240 ***
GEOM_LABEL: Label for provider md1 is ufsid/4a353d3527301bf7.
GEOM_LABEL: Label ufsid/4a353d3527301bf7 removed.
cp: utimes: /var/var: No such file or directory
cp: chown: /var/var: No such file or directory
cp: chmod: /var/var: No such file or directory
cp: chflags: /var/var: No such file or directory
Loading configuration files.

comment:2 by rick, 15 years ago

Removed directory /conf/default/var after image build, to fix issue. But questions leaves where to delete it during the install.

comment:3 by rick, 15 years ago

Seems to be some quirk in nanobsd.sh

%grep -n -C 3 -- 'mkdir -p conf' /usr/src/tools/tools/nanobsd/nanobsd.sh
297-		# we use hard links so we have them both places.
298-		# the files in /$d will be hidden by the mount.
299-		# XXX: configure /$d ramdisk size
300:		mkdir -p conf/base/$d conf/default/$d
301-		find $d -print | cpio -dumpl conf/base/
302-	done
303-

Seems that you are able to specify some files at the /var/foo.txt which then get copied properly during boot, but empty directories is either a config typo or an unhandled race condition in /etc/rc.initdiskless

comment:4 by rick, 15 years ago

%sudo mkdir -p /foo
%sudo mkdir -p /tmp/foo
%sudo cp -pR /tmp/foo/ /foo
cp: utimes: /foo/foo: No such file or directory
cp: chown: /foo/foo: No such file or directory
cp: chmod: /foo/foo: No such file or directory
cp: chflags: /foo/foo: No such file or directory
8:44 PM
 
Lijkt wel een fout in cp (1)
...
No recent fixes lately http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/cp/ (so let's go to the source)

comment:5 by rick, 15 years ago

Turned out to be an issue with FreeBSD base cp. Filed at http://www.freebsd.org/cgi/query-pr.cgi?pr=135581

comment:6 by rick, 15 years ago

Resolution: fixed
Status: acceptedclosed

(In [6984]) * Get rid of those stupid copy directories. Will fixes #39 for now as workaround

comment:7 by rick, 12 years ago

Milestone: 0.1

Milestone 0.1 deleted

Note: See TracTickets for help on using tickets.