KN2TOD wrote: ↑Sun Jun 05, 2022 8:57 pm
FWIW:
Happened to try out DHCLIENT recently. It appears it can/will inadvertently put the system in permanent RW mode:
Code: Select all
pi-star@pi-star(ro):~$ sudo dhclient -v
can't create /var/lib/dhcp/dhclient.leases: Read-only file system
pi-star@pi-star(rw):~$
ummmm.... I wonder what it's up to.
Just an FYI: but a regular Pi=Star install has...
Code: Select all
pi-star@pi-star-3b(ro):~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 15213412 1850688 12709040 13% /
devtmpfs 464768 0 464768 0% /dev
tmpfs 498048 0 498048 0% /dev/shm
tmpfs 32768 7632 25136 24% /run
tmpfs 5120 0 5120 0% /run/lock
tmpfs 32768 0 32768 0% /sys/fs/cgroup
tmpfs 16 4 12 25% /var/lib/logrotate
tmpfs 65536 8 65528 1% /tmp
tmpfs 16 0 16 0% /var/lib/sudo
tmpfs 65536 7896 57640 13% /var/log
tmpfs 1024 72 952 8% /var/cache/samba
tmpfs 1024 0 1024 0% /var/lib/nginx/body
tmpfs 64 0 64 0% /var/lib/php/sessions
tmpfs 4096 2176 1920 54% /var/lib/samba/private
tmpfs 32 16 16 50% /var/lib/dhcpcd5 <<<=============
/dev/mmcblk0p1 64456 51032 13424 80% /boot
tmpfs 99608 0 99608 0% /run/user/1000
pi-star@pi-star-3b(ro):~$
... mounted in a tmpfs (aka RAM disk).
Find out where that mount is made, and add a line referencing /var/lib/dhcp may clear up your experiment. (I think it's /etc/fstab, but /etc/mtab has some stuff too -- but may be a dynamic file updated by the mount command using fstab)
Code: Select all
pi-star@pi-star-3b(ro):~$ cat /etc/fstab
#File System Mountpoint Type Options Dump Pass
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults,ro 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime,ro 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
tmpfs /run tmpfs nodev,noatime,nosuid,mode=1777,size=32m 0 0
tmpfs /run/lock tmpfs nodev,noatime,nosuid,mode=1777,size=5m 0 0
tmpfs /sys/fs/cgroup tmpfs nodev,noatime,nosuid,mode=1755,size=32m 0 0
tmpfs /tmp tmpfs nodev,noatime,nosuid,mode=1777,size=64m 0 0
tmpfs /var/log tmpfs nodev,noatime,nosuid,mode=0755,size=64m 0 0
tmpfs /var/lib/sudo tmpfs nodev,noatime,nosuid,mode=1777,size=16k 0 0
tmpfs /var/lib/dhcpcd5 tmpfs nodev,noatime,nosuid,mode=1777,size=32k 0 0
tmpfs /var/lib/logrotate tmpfs nodev,noatime,nosuid,mode=0755,size=16k 0 0
tmpfs /var/lib/nginx/body tmpfs nodev,noatime,nosuid,mode=1700,size=1m 0 0
tmpfs /var/lib/php/sessions tmpfs nodev,noatime,nosuid,mode=0777,size=64k 0 0
tmpfs /var/lib/samba/private tmpfs nodev,noatime,nosuid,mode=0755,size=4m 0 0
tmpfs /var/cache/samba tmpfs nodev,noatime,nosuid,mode=0755,size=1m 0 0
pi-star@pi-star-3b(ro):~$