Re: (RPI) Changing the tty to an external device and validating functionality
Posted: Sun Sep 22, 2019 1:58 am
To make it boot and remain in R/W mode is kinda of a pain, but for starters remove ",ro" in the Options column in /etc/fstab for the filesystems in question.
You'll also need to edit /etc/rc.local and comment out line 68 "mount -o remount,ro /"
There is also a cron job that is run every hour that runs to set it back to R/O mode too. That mount command is on line 33
You are also going to run into it reverting to R/O mode after each of the following scripts are run, so you'll need to edit them and comment out the mount command in those too.
pistar-ap.service probably won't run automatically unless the system comes up and can't find a network. To make sure it doesn't run, I'd disable AP mode in the control panel.
pistar-expand should only get run on first boot, so I'd ignore it.
pi-star-mmdvmcal would only be run by you, but you might need to change the script if you plan on running it.
pi-star-update and upgrade get run automatically and manually, so lines 303 and 304 in pistar-update, and 877 and 878 in pistar-upgrade need to be commented out.
This lists filename:line number to help you out. (they are in /usr/local/sbin/) (pistar-upgrade lines 747 though 752 can be ignored)
change the following lines in /etc/systemd/system/apt-daily.service
and /etc/systemd/system/apt-daily-upgrade.service
I'll bet there are other scripts hidden all over that run that will revert it to back to R/O mode, but hopefully that will work long enough for you to be able to test.
I'm not familiar with svxlink, so I'll start researching it.
Code: Select all
#File System Mountpoint Type Options Dump Pass
/dev/mmcblk0p1 /boot vfat defaults,ro 02
/dev/mmcblk0p2 / ext4 defaults,noatime,ro 01
Code: Select all
sudo nano /etc/rc.local
Code: Select all
sudo nano /usr/local/sbin/pistar-hourly.cron
Code: Select all
/usr/local/sbin/pistar-ap.service
/usr/local/sbin/pistar-expand
/usr/local/sbin/pistar-mmdvmcal
/usr/local/sbin/pistar-update
/usr/local/sbin/pistar-upgrade
pistar-expand should only get run on first boot, so I'd ignore it.
pi-star-mmdvmcal would only be run by you, but you might need to change the script if you plan on running it.
pi-star-update and upgrade get run automatically and manually, so lines 303 and 304 in pistar-update, and 877 and 878 in pistar-upgrade need to be commented out.
This lists filename:line number to help you out. (they are in /usr/local/sbin/) (pistar-upgrade lines 747 though 752 can be ignored)
Code: Select all
pistar-ap.service:112: mount -o remount,ro /
pistar-ap.service:133: mount -o remount,ro /
pistar-ap.service:172: mount -o remount,ro /
pistar-expand:110:mount -o remount,ro /boot
pistar-expand:111:mount -o remount,ro /
pistar-hourly.cron:33:# mount -o remount,ro /
pistar-mmdvmcal:54:mount -o remount,ro /
pistar-update:303: mount -o remount,ro /
pistar-update:304: mount -o remount,ro /boot
pistar-upgrade:747: echo 'ExecStartPost=/bin/mount -o remount,ro /' >> /etc/systemd/system/apt-daily.service
pistar-upgrade:748: echo 'ExecStartPost=/bin/mount -o remount,ro /boot' >> /etc/systemd/system/apt-daily.service
pistar-upgrade:751: echo 'ExecStartPost=/bin/mount -o remount,ro /' >> /etc/systemd/system/apt-daily-upgrade.service
pistar-upgrade:752: echo 'ExecStartPost=/bin/mount -o remount,ro /boot' >> /etc/systemd/system/apt-daily-upgrade.service
pistar-upgrade:877: mount -o remount,ro /
pistar-upgrade:878: mount -o remount,ro /boot
Code: Select all
[Unit]
Description=Daily apt download activities
Documentation=man:apt(8)
ConditionACPower=true
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
#ExecStartPre=/bin/mount -o remount,rw /
#ExecStartPre=/bin/mount -o remount,rw /boot
ExecStart=/usr/lib/apt/apt.systemd.daily update
#ExecStartPost=/bin/mount -o remount,ro /
#ExecStartPost=/bin/mount -o remount,ro /boot
Code: Select all
[Unit]
Description=Daily apt upgrade and clean activities
Documentation=man:apt(8)
ConditionACPower=true
After=apt-daily.service
[Service]
Type=oneshot
#ExecStartPre=/bin/mount -o remount,rw /
#ExecStartPre=/bin/mount -o remount,rw /boot
ExecStart=/usr/lib/apt/apt.systemd.daily install
KillMode=process
TimeoutStopSec=900
#ExecStartPost=/bin/mount -o remount,ro /
#ExecStartPost=/bin/mount -o remount,ro /boot
I'm not familiar with svxlink, so I'll start researching it.