While P2V-ing an Ubuntu 6.06 server with my warm-cloning P2V method, I ran into a strange problem when booting:
The exact text of the error is:
mount: special device /var/run does not exist mount: special device /var/lock does not exist mount: wrong fs type, bad option, bad superblock on /dev/shm/var.run, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so mount: wrong fs type, bad option, bad superblock on /dev/shm/var.lock, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so
Everything seems to work, untill I found out that the extra IP addresses on secondary network interfaces were not able to carry any network traffic…
I had to cancel the virtualization and revert to the physical machine again.
The system in question has a separate /var partition (see booting picture, /dev/sda6 in my case).
I first mount the root filesystem, which holds on empty “var” directory, and then mount /dev/sda6 on that “var” directory. I had created empty “run” and “lock” directories in there to be able to mount /var/run and /var/lock. Wrong!
Turns out that the root filesystem needs to contain /var/run and /var/lock, even though the system has a separate /var partition.
:bonk: :bonk: :bonk:
Thanks to Chris Siebenmann for pointing this out on his wiki.
The solution thus is to boot from Ubuntu Live CD, mount ONLY the root filesystem, and create the /var/run and /var/lock directories.
They are only needed for mounting the tempfs partitions, and will be hidden by the real /var partition, which is mounted over it once the system has finished booting.