This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4376: AM4376 : About ReadOnly system

Part Number: AM4376

Hi Team,

I am currently developing a product based on AM437x Starter Kit.
Software uses PROCESSOR-SDK-LINUX-RT-AM437X 04_02_00_09.

I want to boot the root filesystem read-only. Therefore, the following description is written in /etc/fstab.

"/dev/root            /                    auto       async,auto,dev,exec,nouser,ro,suid 1  1"

However, in rare cases, systemd-remount-fs.service outputs the following error, and the root file system starts in a writable state.

================== systemd-remount-fs.service Log ==================

  • systemd-remount-fs.service - Remount Root and Kernel File Systems

   Loaded: loaded (/lib/systemd/system/systemd-remount-fs.service; static; vendor preset: enabled)

   Active: failed (Result: exit-code) since Sat 2017-12-23 14:00:39 UTC; 3 years 0 months ago

     Docs: man:systemd-remount-fs.service(8)

           www.freedesktop.org/.../APIFileSystems

  Process: 102 ExecStart=/lib/systemd/systemd-remount-fs (code=exited, status=1/FAILURE)

 Main PID: 102 (code=exited, status=1/FAILURE)

systemd-remount-fs[102]: mount: / is busy

=============================================================

Therefore, as another means, I would like to write "root = PARTUUID = $ {uuid} ro rootfstype = ext4 rootwait" in Kernel parameters so that it can be started as read-only.

The question here is, what are the possible implications of changing from the first method (/etc/fstab) to the next method (kernel parameter)?

  • Hi,

    This is a pretty generic Linux question and standard Linux resources would likely apply well here to help explain the options. The kernel command line will obviously happen earlier, until init runs and remounts / using the entry in fstab. However, this might not remove the problem of mount being busy some times and throwing the error above. Are you sure boot is not mounting the root filesystem ro already? It sounds like sometimes you boot up and have a writeable fs? If so, setting this in the command line might help, but it would be good to understand why that is happening, I would think.

    I hope this is helpful.