(RPI) Changing the tty to an external device and validating functionality

General support for the Pi-Star System
Posts: 948
Joined: Wed Apr 17, 2019 11:11 pm

Re: (RPI) Changing the tty to an external device and validating functionality

Post by KE7FNS » 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.

Code: Select all

#File System            Mountpoint              Type    Options                Dump     Pass
/dev/mmcblk0p1          /boot                   vfat    defaults,ro               02
/dev/mmcblk0p2          /                       ext4    defaults,noatime,ro       01
You'll also need to edit /etc/rc.local and comment out line 68 "mount -o remount,ro /"

Code: Select all

sudo nano /etc/rc.local
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

Code: Select all

sudo nano /usr/local/sbin/pistar-hourly.cron
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.

Code: Select all

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)

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
change the following lines in /etc/systemd/system/apt-daily.service

Code: Select all

Description=Daily apt download activities

#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

and /etc/systemd/system/apt-daily-upgrade.service

Code: Select all

Description=Daily apt upgrade and clean activities

#ExecStartPre=/bin/mount -o remount,rw /
#ExecStartPre=/bin/mount -o remount,rw /boot
ExecStart=/usr/lib/apt/apt.systemd.daily install
#ExecStartPost=/bin/mount -o remount,ro /
#ExecStartPost=/bin/mount -o remount,ro /boot
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.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:

Posts: 28
Joined: Mon Aug 19, 2019 3:20 am

Re: (RPI) Changing the tty to an external device and validating functionality

Post by KG7PAR » Sun Sep 22, 2019 3:06 am

Wow, I now understand why I couldn't get it to come out of RO mode. I also found /boot/cmdline.txt also has it in there. I will tackle this tomorrow and see how it goes.

I am going to push up an image to my website soon that has my version of mmdvm (RC4 with trunk BUSTER OS) and also svxlink installed and configured for the board. I will share the path if you are interested.

Svxlink is an incredibly powerful analog repeater controller software package. It has been around for like 15 years, and has a large audience around the world. There is no support for digital integration, but the first board I mailed out is to one of the key developers to tinker with so who knows. I am planning just to run pi-star and svxlink in parallel, with analog set to be priority over the digital. I might make that programmable later, but for now it is done with analog signaling (Squelch drives the inhibit bin on the mmdvm).

I am hopeful that I will only need it to be RW for about the first minute or so, so some of the watchdog and misc scripts may be skipable.

Post Reply