How to remount partition as read only

Here’s a tip on remounting partitions. Usually /boot is mounted as read-write linux filesystem by default installation. If you also feel that your /boot should not be changed, modified or upgraded, you can just remount them as read only partition without booting your linux system.As root:

Go to /boot partition
# cd /boot

Create a dummy file
# touch newfile
# mount -o remount,ro /boot

Try adding and deleting some files now

# touch newfile2
# rm newfile

Error: Read-only file system

Now, your /boot is mounted as read-only filesystem. Make it permanently using /etc/fstab.

 

Done


One Response to “How to remount partition as read only”


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>