0

I have a set of PIs that I control remotely. I am going to update them to set the the root of the filesystem as read-only (to avoid SDACRD corruption problems). However, occasionally I will need to put the root back to read-write mode to apply updates etc. So I will use commands umount or mount -o etc.

However I cant figure out how to unmount the root filesystem. If I run sudo umount /dev/mmcblk0p6 I get the error umount: /: device is busy. I used fuser to figure out what processes are using root. I killed them all except for the last one - its called -bash and if I kill it my terminal dies (I'm using SSH with PuTTY).

Is there a way to remotely change the root to read-write mode?

4
  • As a matter of interest have you seen any evidence that this will make the file system any more robust? I suspect you are engaged in a fruitless exercise.
    – joan
    Oct 7 '14 at 8:15
  • @joan, we have had a lot units suffering from SDCARD errors. Judging by the forums, it seems to be a big problem with the PI. Our units are (like many PIs) used in an embedded application where controlled shutdown is not always possible. I have eliminated all writes to the SDCARD (which may be enough) - this seems a reasonable step to take to me. Why do you think it is pointless? I wanted to go one step further and make the card read-only, though this may not be possible. Oct 7 '14 at 10:26
  • There are certainly a small proportion of complaints of SD card corruption. I'd guess at a real-world < 0.1% problem. An insignificant complaint, perhaps due to the purchase of fake SD cards or plain bad practice in powering down the Pi.
    – joan
    Oct 7 '14 at 10:34
  • @joan. The sdcard has the raspberry logo on it and I believe it came with the pi. (And before you ask, no I'm not overclocking it). Removing the power from the unit to power it down is fairly normal in embedded apps. Maybe the PI is not suitable for this, which is fair enough. Oct 7 '14 at 11:38
1

You can't unmount the root filesystem on a running machine. The reason your terminal dies is that bash is your shell.

0

You might want to consider a Linux distribution which was designed for read-only rootfs from the start. For example, my project Nard SDK
http://www.arbetsmyra.dyndns.org/nard/
is a better fit for embedded use (but there are others too). The ones on your SD-card with a Raspberry logo is for desktops.

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.