I want to make the Jetson’s root partition read only on boot, but I don’t know how
I’ve modified /boot/extlinux/extlinux.conf to say ro rather than rw but that does not work as something else remounts it as rw.
The /etc/fstab is empty, so I’m unsure what else could be remounting root as rw.
Do I need to be looking in the initrd?
Notice that initially cmdline has “rw”, but later it has “ro”…the last occurrence should take precedence. My TX1 isn’t where I can test right now, but if using R28.1 the result should be the same.
I didn’t look at details, but it does appear the R24.2.1 initrd “init” script just mounts the root device and doesn’t offer any options. It pipes “/proc/cmdline” through this:
sed -e 's/.*root=\/dev\/\([abcdefklmnps012]*\).*//'
In my case this results in just “mmcblk0p1”, which means the normal cmdline with a ro flag would drop the ro. Probably changing the initrd init script to check for the last occurrence of “ro” or “rw” would cause the order to not be ignored (you can have as many “ro” or “rw” options as you want, it is supposed to use the last occurrence).
This is actually a bug in the init script of the initrd which needs to be fixed.