baselayout currently installs fstab with invalid entries, expecting the user to replace them before booting. Instead, I think we should install an fstab with commented-out examples. This would allow stage tarballs to be used as pre-built container images for tools like systemd-machined without having ugly mount errors displayed when the container starts.
An example of what I mean: > floppym@naomi ~ % sudo systemd-nspawn -b -M stage3-amd64-systemd-20160323 > Spawning container stage3-amd64-systemd-20160323 on /var/lib/machines/stage3-amd64-systemd-20160323. > Press ^] three times within 1s to kill container. > systemd 226 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL -XZ +LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN) > Detected virtualization systemd-nspawn. > Detected architecture x86-64. > > Welcome to Gentoo/Linux! > > Running in a container, ignoring fstab device entry for /dev/BOOT. > Running in a container, ignoring fstab device entry for /dev/ROOT. > Running in a container, ignoring fstab device entry for /dev/SWAP. > Running in a container, ignoring fstab device entry for /dev/cdrom. > Running in a container, ignoring fstab device entry for /dev/fd0.
Created attachment 444106 [details, diff] patch Here's a patch for this. I also included an update to add information on mounting by UUID.
Added in commit 90edf00. I also made the same change for the bsd fstab and put it in the same commit. If someone wants to add the url to this bug for the commit feel free to do so.