Bug 137272

Summary: 'WARNING: could not store hostuuid in /tmp/hostid' when root filesystems mount read-only
Product: Base System Reporter: admin
Component: miscAssignee: Volker Werth <vwe>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description admin 2009-07-30 18:10:01 UTC
if root filesystem mount read-only (nfs, or etc), when machine boot I see
eval: cannot create /tmp/hostid: Read-only file system
/etc/rc: WARNING: could not store hostuuid in /tmp/hostid.
Setting hostuuid: 82559667-7d48-11de-a424-0050228da6b7.
Setting hostid: 0xbee50505.
Mounting local file systems:
========
in /etc/rc.conf file I have:
router# grep tmp /etc/rc.conf
hostid_file="/tmp/hostid"
# tmp on memory
tmpmfs="YES"
tmpsize="1m"
router#    

=======
I think, it attempt store hostid before mounting all filesystems

router# rcorder /etc/rc.d/* | grep -E "host|mount"
/etc/rc.d/hostid
/etc/rc.d/mountcritlocal
/etc/rc.d/hostname
/etc/rc.d/mountcritremote
/etc/rc.d/mountd
/etc/rc.d/mountlate
/etc/rc.d/hostapd
router#

Fix: 

change boot sequence?
How-To-Repeat: boot with
hostid_file="/path/to/not/root/filesystems"
settings into rc.conf
Comment 1 Volker Werth freebsd_committer freebsd_triage 2010-08-21 21:13:51 UTC
State Changed
From-To: open->closed

Alex, 
you're just seeing a warning. Nothing bad happens if /tmp/hostid can't be written. 
The hostid is also stored in the sysctl MIB. If have no idea, who's reading 
/tmp/hostid. The rcorder can't be changed as some filesystem tools need it, 
so it must be called early. 


Comment 2 Volker Werth freebsd_committer freebsd_triage 2010-08-21 21:13:51 UTC
Responsible Changed
From-To: freebsd-bugs->vwe

track