Harddisk-Upgrade: /var/run and /var/lock not mounted tmpfs anymore
Malte J. Wetz
ubuntu-users-mlist at malte-wetz.de
Thu Sep 7 13:39:57 UTC 2006
Hi!
I recently moved my Ubuntu Dapper from a PATA- to a SATA-Harddisk,
using »cp -a« for all relevant filesystems as described in the
Harddisk-Upgrade-HOWTO.
It worked fine except for one thing: On the new disk, the
directories /var/run and /var/lock are not automatically mounted as tmpfs
on boot anymore.
This caused some other minor problems, i.e. the Initskript 'mountall.sh'
complains that the special devices /dev/shm/var.{lock,run} do not exist and
the Loopback-Network is not brought up because of problems
with /var/run/network/ifstate.
As I understand it from looking into the Initskripts, 'mountvirtfs' should
do the mounts of /var/run und /var/lock. Since /proc and /sys are mounted
and I can see a test echo string I included in the script, I can conclude
that the script itself and the relevant section are beeing executed.
,----[ /etc/init.d/mountvirtfs ]
| [...]
| # Mount standard /proc and /sys.
| domount $TYPE /proc
| domount sysfs /sys
|
| echo "***************************** BOOO! ************************"
|
| # Mount /var/run and /var/lock as tmpfs.
| # /var may be on another drive so create /var/run if we need to
| domount tmpfs /var/run "-o mode=0755"
| domount tmpfs /var/lock "-o mode=1777"
| [...]
`----
I can see no error message about this issue and the logs contain no
suspicious entries.
Manually invoking '/etc/rcS.d/S01mountvirtfs start' after boot works,
however. Of course, I loose half of my pid files and other stuff that was
created earlier in the underlying filesystem. But it works.
If I boot directly into a shell (kernel parameter 'init=/bin/bash') and then
call 'mountvirtfs' directly, it also works.
But during normal system bootup, /var/{lock,run} remain unmounted.
Currently, I solved this by adding appropriate entries to /etc/fstab. This
way, 'mountvirtfs' still fails, but 'mountall.sh' takes over.
This works for me but I'm still curious as to why this strange behaviour
occurs in the first place.
Note: /, /var and /home are seperate filesystems, all reiserfs, no lvm, no
raid, self-compiled kernel 2.6.17.11 without initrd.
--
Malte J. Wetz <mail at malte-wetz.de>
Homepage: www.malte-wetz.de (PGP/GPG Keys available on homepage)
More information about the ubuntu-users
mailing list