The initscript mountvirtfs fails to mount /var/run and /var/lock if /var is a seperate partition

Bug #63986 reported by Jens Bergmann
2
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

System:
Server with one harddisk partitioned to /, /home and /var
Linux rad2 2.6.15-27-server #1 SMP Sat Sep 16 02:57:21 UTC 2006 i686 GNU/Linux

initscripts:
  Installed: 2.86.ds1-6ubuntu32

Mounted partitions (/etc/fstab):
# /etc/fstab: static file system information.
#
#<file sys> <mount point> <type> <options> <dump> <pass>
/dev/sda2 / ext3 rw,errors=remount-ro 0 1
/dev/sda1 none swap rw 0 0
none /proc proc defaults 0 0
/dev/sda5 /home ext3 rw 0 2
/dev/sda6 /var ext3 rw 0 2

Problemdescription:
On system boot mountvirtfs (S01) is started befor mountall.sh (S35). This causes the mount requests for /var/run and /var/lock to fail since there are no such paths in /var until /var is mounted by mountall.sh.

Workaround:
Create the required paths in the /var directory befor it is mounted.
mount --bind / /mnt && mkdir /mnt/var/run /mnt/var/lock && umount /mnt
mountvirtfs will mount /var/run and /var/lock as tmpfs and everything is working fine.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

These directories are created by the installer

Changed in sysvinit:
status: Unconfirmed → Rejected
Revision history for this message
Jens Bergmann (jens-bergmann) wrote :

So it is not supported by ubuntu to repartition the disk or move directorys to seperate partitions after installation?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

It's entirely supported, you just need to make sure that if you make /var a separate partition, you make /var/run and /var/lock under it as you note here.

This is documented in several places

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.