from os import listdir | |
from os.path import isfile, join | |
## Set image folder path | |
dir_path = "C:/img_dir/" | |
## Store files names in folder | |
files = [f for f in listdir(dir_path) if isfile(join(dir_path, f))] | |
for file in files: |
How I update RPIs bootloader
- Get an extra sd-card for flashing updates
- Flash Raspberry OS (used the minimal version) into the sd-card using
balena-etcher
- Using
sudo
runtouch /mnt/.../boot/ssh
to enable ssh login to the rpi - Move the sd-card to the RPi
- Debug hint: from now on use the following to get the different versions
/opt/vc/bin/vcgencmd version
orvcgencmd bootloader_version
or eventvgencmd bootloader_config
.
WIP
This article is really worth it!
This gist tackles, how I did debug the ssh configuration for gitea.
tl;dr: Only read to have some debugging insights, follow this issue to get the final answer directly.
First of all Gitea uses s6 to supervise sshd and gitea itself.
Which automatically resurrects sshd, whenever sshd shuts down.
To rerun the sshd with some other options, hopefully over the same port, as it's the one correctly exposed through docker
Following are some hints
- There are many flavors for awk,
mawk
minimal&default,gawk
feature-full &nawk
new-implementation - For a technical comparison between
mawk
andgawk
follow this google discussion - MAWK was slow, follow this guide. But the recent version 1.3.4 seems to fix that
- AWKPATH is only available in
gawk
.nawk
may have it too. But the default onemawk
only uses the-f
notation, it doesn't even havet the@inlcude
statement, thus one can't nest the files, without creating a wrapper application, in a conf/lib like directory structure.
Hints for working with memory on linux
- Set swappiness to zero guide
- Utilize ps_mem to check for the real memory usage
- Check for the caches by checking
/proc/meminfo
, for GB/MB view use this answer - Drop the caches if desired by using
sudo sh -c "/bin/echo 3 > /proc/sys/vm/drop_caches"
then resetting to0
, the guide is here, notice that sudo should wrap the whole redirection.
Following are the steps I followed to have further understanding
-
Know the architecture from this link. Whether the API totally encapsulates the CGI or there are some differences, that is not the topic of this guide, so it's better to be always aware of the Disk Station Architecture your script would support, so that when we have to read the sources we'll know which source to check
-
Try a working ansible role. That will give a pretty good overview of how the interaction is implemented.
-
Check the official docs for the