I have a FreeBSD 10.2 based x86_64 machine with read-only root. For security reason I cannot mount '/' as r/w or remount it as r/w post bootup.
Sometimes I have to change file system of one of partition from UFS to ext2. To boot cleanly after FS change fstab need to be modified which due to above constraints I am not able to do now.
To get around RO root constraints I'm thinking of replacing '/etc/fstab' with a symbolic link from '/etc/fstab' to actual fstab in '/efi/fstab where '/efi' is a non-root partition with r/w access. Problem is how to make OS to run /'efi/fstab' on bootup time as 'efi' is mounted by fstab itself.
This may be little ugly fix but with given constraints this is what have in mind as of now. Open for better ideas/suggestions.
Mount command give an option to specify an alternative fstab file. Not sure if alternative path mention in description here can be on non-root partition and if yes, how to do that. Anyone have tried this option?
-T, --fstab path Specifies an alternative fstab file. If path is a directory then the files in the directory are sorted by strverscmp(3); files that start with "." or without an .fstab extension are ignored. The option can be specified more than once. This option is mostly designed for initramfs or chroot scripts where additional configuration is specified beyond standard system configuration.