After you entered the lines in nano, you press CTRL+o , ENTER and CTRL+x.
When nano is closed you enter the lines in the terminal and wait 30 seconds for a response. sudo chmod 644 /lib/systemd/system/setdatetime.service && sudo systemctl daemon-reload && sudo systemctl enable setdatetime.service && sudo systemctl start setdatetime.service
I connected RTC ds3231, entered everything according to the instructions and I have a problem with access to the clock.
Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Welcome to Volumio for Raspberry Pi (6.1.77-v7l+ armv7l)
Last login: Wed May 22 12:52:03 2024 from 192.168.0.115
volumio@volumio:~$ sudo hwclock -w
[sudo] password for volumio:
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
volumio@volumio:~$
The clock is connected to the RPi4 with extension cables of approximately 20 cm, the cables are functional, I have checked each one separately.
volumio@volumio:~$ cat /boot/config.txt
### DO NOT EDIT THIS FILE ###
### APPLY CUSTOM PARAMETERS TO userconfig.txt ###
initramfs volumio.initrd
gpu_mem=128
gpu_mem_256=32
gpu_mem_512=32
gpu_mem_1024=128
max_usb_current=1
[pi5]
usb_max_current_enable=1
[all]
include volumioconfig.txt
include userconfig.txt
volumio@volumio:~$ cat /boot/userconfig.txt
# Add your custom config.txt options to this file, which will be preserved during updates
dtparam=i2c_arm_baudrate=800000
dtparam=spi=on
volumio@volumio:~$ cat /boot/userconfig.txt
# Add your custom config.txt options to this file, which will be preserved during updates
dtparam=i2c_arm_baudrate=800000
dtparam=spi=on
dtoverlay=i2c-rtc,ds3231
RTC ds3231 is already working.
I found my mistake.
Thank you @Wheaten for directing my search