/var on separate partition fails at boot time

Bug #555780 reported by Krzysztof Matusik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: initramfs-tools

The problem is having /var on separate partition.

I suppose initramfs' initrd generation script can't handle the situation properly.
If I put /var separately in /etc/fstab (with correct copy of direcory tree of course) resulting system fails to boot.

This can be /var/run and /var/lock mounted during the initramfs boot phase mounted to root ( / ) tree instead of /var tree.
Therefore /var, if exists in fstab, should be mounted before /var/run and /var/lock in initramfs boot phase. Or /var/run and /var/lock should be binded to newly mounted /var again, somewhere at the end of boot phase. Well, I don't know the initramfs-tools so good...

rgs

Tags: all boot lucid
Revision history for this message
Krzysztof Matusik (krzysztof-matusik) wrote :

I've investigated the issue and it looks it's not a initramfs-tools package problem but mountall problem.
There is a file /lib/init/fstab from that package that has configuration lines with /var/run and /var/lock.
It seems that one who has /var on separate partition should put lines for 'run and 'lock in his /etc/fstab to override the /lib/init/fstab lines.
There should be some documentation, guide for users- then this "bug" would be partially solved.

affects: initramfs-tools (Ubuntu) → mountall (Ubuntu)
Revision history for this message
Krzysztof Matusik (krzysztof-matusik) wrote :

I've checked it thoroughly and I can confirm the bug.
No documentation, no mention anywhere that if someone wants to mount somewhere in the directory tree first should check /lib/init/fstab and duplicate lines containing mount points inside directory he intends to mount and after his line. For ex.:
UUID=4ef7876b-6d81-4f2c-a677-a7dd25716876 /var ext4 user_xattr 0 2
none /var/run tmpfs mode=0755,nosuid,showthrough 0 0
none /var/lock tmpfs nodev,noexec,nosuid,showthrough 0 0

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

This isn't true at all.

The reason that there's no documentation that you need to do anything special for mountall to support /var on a separate partition is because you don't! You've pasted the appropriate lines from /lib/init/fstab for /var/run and /var/lock and as you can see, they both have the "showthrough" mount option

These causes mountall to take special action to mount /var, with these filesystems mounted on it and under it

affects: mountall (Ubuntu) → initramfs-tools (Ubuntu)
Revision history for this message
Krzysztof Matusik (krzysztof-matusik) wrote :

Hm. You're right.

I've commented out /etc/fstab lines with 'run and 'lock and system looks the same as before (and boots properly).

Well, last time I've tried this was about 4 weeks ago- then boot process (lucid) hanged, I'm sure (I've tried few times to be sure this was fstab and /var issue). But this weekend was the first time I've found some spare time to try solve the issue. Maybe you did put some changes in the mean time or maybe this was caused by different package...
Anyway- I can confirm everything works properly.

Sorry for the mess, regards

Changed in initramfs-tools (Ubuntu):
status: New → Fix Released
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.