Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2004 12:00:05 GMT
From:      bob frazier <bobf@mrp3.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/73195: bad PATH, missing HOME and TERM env var on single boot upgrading to 5.3-STABLE #1
Message-ID:  <200410271200.i9RC05FA068836@www.freebsd.org>
Resent-Message-ID: <200410271200.i9RC0lWI041067@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         73195
>Category:       kern
>Synopsis:       bad PATH, missing HOME and TERM env var on single boot upgrading to 5.3-STABLE #1
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 27 12:00:47 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     bob frazier
>Release:        5.3-STABLE #1
>Organization:
SFT Inc.
>Environment:
FreeBSD BSDServer.SFT.local 5.3-STABLE FreeBSD 5.3-STABLE #1: Tue Oct 26 20:13:16 PDT 2004     root@:/usr/obj/usr/src/sys/GENERIC  i386
      
>Description:
following a cvsup to RELENG_5 for src-all (for 5.3-STABLE #1), and running 5.2.1-p9 prior to upgrade, performed 'make buildworld' and 'make buildkernel' and 'make installkernel' without problems. After booting the machine into 'single user' the PATH environment variable was assigned incorrectly (to something similar to '/usr/bin:/bin') and both the TERM and HOME environment variables were missing.  This created problems when trying to check drivers, mount devices, etc. and run mergemaster according to the recommendations in the handbook.  The problem disappeared once 'make installworld' and mergemaster had completed successfully.  I booted several times into single user mode, and the problem occurred each time until the upgrade had been completed.
Running 'mergemaster -p' and then rebooting did not solve the problem either.  I observed that mergemaster updated /etc/rc so this may be where the problem is (perhaps the previous /etc/rc format is unreadable by the new kernel or lacks some important setting?)
>How-To-Repeat:
1) install 5.2.1-p9
2) cvsup src-all for RELENG_5
3) make buildworld, make buildkernel, make installkernel
4) boot to single-user mode
5) use the default shell '/bin/sh' and type 'set' to view environment variables
>Fix:
The only workaround is to manually assign HOME to /root, TERM to cons25, and PATH to a value similar to /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

After doing this, you can properly check the drives, mount everything, etc. in single user mode, and then do a 'make installworld' and run mergemaster as needed.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410271200.i9RC05FA068836>