Setting rootfs to RO is not possible in any way - mount: / is busy

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
chrnobel
Posts: 7
Joined: Sun May 12, 2019 10:34 pm

Setting rootfs to RO is not possible in any way - mount: / is busy

Post by chrnobel » Fri May 17, 2019 3:19 pm

Hi.

I am trying to change rootfs to RO on DietPi ver 6.24 but gets a - mount: / is busy.

It is a fresh install, and my video looper (which actually reads the video file from a USB stick) is the only program I am going to use, and it makes no difference if it is stopped.

I have deleted the swapfile through dietpi-drive_manager (which appears to set swappines=1) so what do I have to do to change the fs to RO?

I am doing this remote over ssh - is that a problem having Dropbear running, or what have I overseen?

----

Edit:

I have now tried to login directly via console, disabled the only program installed in autostart, stopped Dropbear, and changed to the /boot partition before running dietpi-drive_maneger - but with the same result.

So is it at all possible to make rootfs read only?

And trying manually to change fstab, so it should be RO from next boot totally makes it crash under startup.

User avatar
MichaIng
Legend
Posts: 1510
Joined: Sat Nov 18, 2017 5:21 pm

Re: Setting rootfs to RO is not possible in any way - mount: / is busy

Post by MichaIng » Sun May 26, 2019 12:08 am

@chrnobel
Many thanks for your report.

Actually I believe it is due to the swapfile on rootfs. Open dietpi-drive_manager, select the root device e.g. /dev/mmcblk0p2 (RPi) or /dev/sda1 (some others) depending on your device, select swap file and enter 0 to disable it. At best, if you have an external drive, enable it there instead.

But note that DietPi is currently not really made to run as R/O. It will prompt errors here and there, although you could simply ignore them.

Post Reply