Unable to mount system in read only

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Unable to mount system in read only

Postby SkripT » Wed Aug 12, 2020 9:59 pm

Hi, i'm using a rpi3. I want a fresh copy (as if it was always the first boot) of the os stored on my sd card. So, no changes can be made on the system. I've changed all the mount entries in etc/fstab to ro but there are still changes in some files comparing it with the original system. Here's my fstab

$this->bbcode_second_pass_code('', '# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
/dev/root / ext4 noatime,ro,nouser_xattr,discard 0 0
/dev/mmcblk0p1 /boot vfat defaults,ro 0 0

#Finetuning for less writes on SD Card - Warning!!! Logs are deleted after each reboot.
tmpfs /var/log tmpfs nodev,nosuid,noatime,mode=1777,size=20m 0 0

#SAMBA Share - Public Share
//192.168.100.1/usb-090c-021146_1 /mnt/nas-samba cifs vers=1.0,guest,ro,uid=mpd,gid=audio,iocharset=utf8,nolock,noauto,x-systemd.automount,x-systemd.device-timeout=10,sec=ntlm,rsize=8048,wsize=8096

#SAMBA Share - Share using username/password
#//xxx.xxx.xxx.xxx/nameofshare /mnt/nas-samba cifs vers=1.0,username=myusername,password=mypassword,ro,uid=mpd,gid=audio,iocharset=utf8,nolock,noauto,x-systemd.automount,x-systemd.device-timeout=10,sec=ntlm,rsize=8192,wsize=8192

#NFS Share
#xxx.xxx.xxx.xxx:/nameofshare /mnt/nas-nfs nfs4 ro,noauto,x-systemd.automount,x-systemd.device-timeout=10,rsize=8192,wsize=8192
')

Can you please help me how to accomplish it?

Thanks!!
SkripT
 
Posts: 2
Joined: Wed Aug 12, 2020 9:42 pm

Re: Unable to mount system in read only

Postby ufo6000 » Thu Aug 13, 2020 5:11 pm

You have to put the "ro" also into the bootloader config, /boot/cmdline.txt, instead of the "rw".
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: Unable to mount system in read only

Postby SkripT » Fri Aug 14, 2020 9:41 am

It works! No changes are made now in the sd card. Many thanks!
SkripT
 
Posts: 2
Joined: Wed Aug 12, 2020 9:42 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 10 guests