varlock and varrun

Christoph Pleger Christoph.Pleger at cs.uni-dortmund.de
Tue Apr 17 07:11:58 UTC 2007


Hello,

On Mon, 16 Apr 2007 21:35:43 +0200
Nils Kassube <kassube at gmx.net> wrote:

> > > I generated a minimal edgy system by debootstrap, copied that
> > > system to a machine with fresh formatted partitions and installed
> > > a kernel and a bootloader. After rebooting, the machine did not
> > > fully come up and I found out that the reason for that was that
> > > /var/lock and /var/run had not been mounted. After some
> > > investigation I found out that /var/lock and /var/run should be
> > > mounted by S01mountkernfs.sh and I wonder how that is possible
> > > when S35mountall.sh is run later, because the mountpoints
> > > /var/lock and /var/run cannot be present before mounting /var,
> > > what normally should be done by S35mountall.sh.
> > >
> > > In spite of that, after a normal CD-installation the machine boots
> > > successfully. But I cannot find the significant difference between
> > > a CD-installation and my debootstrap-installation.
> > >
> > > Does anybody know why mounting /var/lock and /var/run works ok
> > > after installing from CD?
> >
> > Does really nobody here know how Ubuntu manages to mount /var/lock
> > and /var/run before /var? In a user technical support list?

> On my Dapper system:
> 
> $ grep -l varrun /etc/init.d/*
> /etc/init.d/mtab
> $ ls -l /etc/rc*.d/*mtab
> lrwxrwxrwx 1 root root 14 2007-02-21 22:24 /etc/rcS.d/S22mtab ->
> ../init.d/mtab
> 
> I.e. the script mtab is started before mountall.sh.

Yes, and that I see as the problem where I wonder why it does not occur
in a CD-installed Ubuntu system:

/var/lock and /var/run are mounted in S01mountkernfs.sh (S22mtab only
creates the entries in /etc/mtab, but does not mount anything, see "man
mount" for the meaning of paramater -f), but /var is mounted in
S35mountall.sh. So, directories /var/lock and /var/run are not present
at the time when they are tried to be used as mountpoints. And even if
they existed in the root filesystem /, they would be overwritten by
mounting /var later.

So, I still have no explanation how /var/lock and /var/run can be
mounted successfully in a CD-installed system.

Regards
  Christoph




More information about the ubuntu-users mailing list