I'm trying to customize a preinstalled Ubuntu image for VM instances. My idea was to add a secondary filesystem to /etc/fstab
(let's call it /config
) and then symlink all relevant config files to that filesystem.
This approach works fine for /etc/network/interfaces
but fails for /etc/hostname
. Apparently the hostname is set before /etc/fstab
is mounted, causing the symlink to fail.
How can I have /config
mounted before the hostname is set? Or is there an alternative solution to this problem that does not require an early mount?