Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jan 2013 16:57:02 GMT
From:      jb <jb.1234abcd@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/175139: bsdinstall(8) - do not offer services invalid in installation env (e.g. VirtualBox)
Message-ID:  <201301081657.r08Gv2ok090391@red.freebsd.org>
Resent-Message-ID: <201301081700.r08H00BT015916@freefall.freebsd.org>

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

>Number:         175139
>Category:       bin
>Synopsis:       bsdinstall(8) - do not offer services invalid in installation env (e.g. VirtualBox)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 08 17:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     jb
>Release:        FreeBSD 9.1-RELEASE #0 r243826
>Organization:
>Environment:
FreeBSD 9.1-RELEASE #0 r243826 ... i386

>Description:
This applies to any installation env (VirtualBox, other hardware platforms).

On VirtualBox, I selected powerd service during install, but at boot time there
was an error msg:
starting powerd
powerd lookup freq: No such file or directory
/etc/rc: WARNING failed to start powerd

Disabling powerd in /etc/rc.conf to get rid of the error message is a fix, but
not a solution to a problem.
Making a statement that in VirtualBox powerd doesn't work because the guest
OS can not control the frequency of the host CPU is true, but is not a solution
as well.

The solution is to NOT offer bugus/invalid services for installation env, real
or virtual.

Bsdinstall can discover this condition with checking for lack of
sysctl -a | grep dev.cpu.0.freq
sysctl -a | grep dev.cpu.0.freq_levels
in /usr/libexec/bsdinstall/services,

exactly as it does (in powerd.c) with
     if (sysctlnametomib("dev.cpu.0.freq", freq_mib, &len))
       err(1, "lookup freq");
       ...
     if (sysctlnametomib("dev.cpu.0.freq_levels", levels_mib, &len))
       err(1, "lookup freq_levels");
in /usr/sbin/powerd (via /etc/rc.d/powerd).

Bsdinstall already does similar checks for other features, see:
$ grep -ir sysctl /usr/libexec/bsdinstall/









>How-To-Repeat:
as above
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



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