I have the following set-up:

  • hw: RPi 3 Model B
  • os: 4.4.37-1-ARCH #1 SMP armv7l GNU/Linux
  • file system: /boot(vfat), /(ext4), /var(ext4)
  • partitions: three; mounted: /boot, /, /var
  • storage: mlc nand flash micro sd

Recently I am getting kernel panic errors at boot time referring to a file in lib which turns out to be some how corrupted.

kernel panic "/sbin/init" error while loading shared libraries /usr/lib/libseccomp.so.2 invalid elf header

So my theory is that since my root file system is NOT readonly and I am using nand flash and there are unexpected shutdowns, some files are getting corrupted.

The goal is to make the root file system readonly so that it may solve the problem.

Unfortunately I could not find any good solid source on how making a readonly root file system should be done on Arch Linux.

Also posted on Arch Linux Forum: https://archlinuxarm.org/forum/viewtopic.php?f=9&t=11621


In case anyone is interested, what I ended up doing was to just modify /boot/cmdline.txt and replace rw with ro for root:

root=/dev/mmcblk0p2 ro

also modify the fstab as follow to set boot partition as readonly. note that /var is NOT readonly:

/dev/mmcblk0p1  /boot   vfat    defaults,ro,errors=remount-ro        0       0
/dev/mmcblk0p3  /var    ext4    defaults,noatime        0       2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.