Bug#633299: debian-installer: Feature request: please support tmpfs filesystems in partitioner
This was briefly discussed on #debian-boot. I'm writing this report
to record that.
The recent changes to support /run in wheezy/unstable have added
the following mounts:
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=10%,mode=755 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5m 0 0
tmpfs /run/shm tmpfs rw,nosuid,nodev,relatime,size=20% 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,relatime,size=20% 0 0
Like the UTC=yes parameter the installer sets in /etc/default/rcS
to configure the hardware clock, these filesystems may be enabled
or disabled by setting
in /etc/default/rcS. Currently, the initscripts defaults these all to
"yes". However, it may make sense for the installer to give the user
the option of disabling them. /run is always mounted (not
Additionally, the mount options and size of the tmpfs may be
configured by adding an entry to /etc/fstab, such as shown above.
If not present, defaults from /lib/init/tmpfs.sh will be used instead
(the fstab settings supersede the defaults).
I was thinking of how this could be cleanly added into the installer,
and the best idea I've come up with so far is to add it directly into
the partitioner, so you don't need to provide any special support for
the feature (such as asking additional questions). If support for the
tmpfs filesystem was added (similar to how LVM and RAID are
supported), one could add a tmpfs mount to the filesystem list, which
would then permit configuration of its size, mount options etc. using
the existing interface. It could default to having entries for /run,
/run/lock, /run/shm and /tmp, and this would permit the user to modify
them or delete them entirely. If deleted, you could then set
RAMxxx=no in /etc/default/tmpfs. And if the options differ from the
default, you can then write an fstab entry for the mount. The
interface would also permit the addition of new tmpfs mounts as well.
It would also be possible to only expose this in expert mode, if
desirable, so that normal installs wouldn't have increased
complexity, and the package defaults would simply be used instead.
We made the options in /etc/default/rcS and /etc/fstab configurable
in this way so that it fitted in with how the installer was already
configuring things, but equally this was already how the package
was set up (RAMLOCK was repurposed from /var/lock to /run/lock, and
fstab was already used to store options; RAMSHM and RAMTMP are
simply extending the existing conventions in use).