[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#871721: After upgrade to stretch, booting fails due to late mounting of /var



Package: release-notes

After upgrading from jessie to stretch, the boot process fails and goes into the emergency mode. Several programs try to access /var which is, however, mounted later.

The Release Notes comment on /usr but not on /var:

https://www.debian.org/releases/stretch/i386/release-notes/ch-information.en.html#late-mounting-usr

I got the system booting again after spending hours with reading man pages and finally creating /etc/systemd/system/var.mount, a modified version of /run/systemd/generator/var.mount:

[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=console-kit-log-system-start.service binfmt-support.service

[Mount]
What=/dev/disk/by-uuid/6d5dc6ef-beee-4744-9ade-102f2dca4d2b
Where=/var
Type=ext3
Options=defaults,nosuid,nodev

The statement 'Before=console-kit-log-system-start.service binfmt-support.service' forces systemd(1) to mount /var before services are started which need access to this partition.

I am not very happy with this solution. Any additional future service which is not considered in the var.mount might let the system fail again. Furthermore, I'd like to define mounts only in /etc/fstab. Is there a possibility to do this and to get rid of /etc/systemd/system/var.mount? 

Alternatively, the file system /var could, e.g., mounted like / (sda1) and /usr (sda9) by the kernel:

Aug 10 22:08:52 arnie kernel: EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
Aug 10 22:08:52 arnie kernel: EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Aug 10 22:08:52 arnie kernel: SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
Aug 10 22:08:52 arnie kernel: XFS (sda9): Mounting V4 Filesystem
Aug 10 22:08:52 arnie kernel: XFS (sda9): Ending clean mount

Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux
libc6:i386 2.24-11+deb9u1


Reply to: