07-02-2024, 07:55 AM
(07-01-2024, 11:39 PM)Tim Curtis Wrote: I set locale to Europe/London on a Pi 4B 4GB and was not able to repro the fail when enabling swap.
Here's the console log starting with a fresh 9.0.3
Code:# LOCALE
pi@moode9test:~ $ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
# SERVICE STATUS (disabled)
pi@moode9test:~ $ systemctl status dphys-swapfile.service
○ dphys-swapfile.service - dphys-swapfile - set up, mount/unmount, and delete a swap file
Loaded: loaded (/lib/systemd/system/dphys-swapfile.service; disabled; preset: enabled)
Active: inactive (dead)
Docs: man:dphys-swapfile(8)
# ENABLE SERVICE
pi@moode9test:~ $ sudo systemctl enable dphys-swapfile.service
Synchronizing state of dphys-swapfile.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable dphys-swapfile
Created symlink /etc/systemd/system/multi-user.target.wants/dphys-swapfile.service → /lib/systemd/system/dphys-swapfile.service.
# REBOOT
pi@moode9test:~ $ sudo reboot
# SERVICE STATUS (enabled)
pi@moode9test:~ $ systemctl status dphys-swapfile.service
● dphys-swapfile.service - dphys-swapfile - set up, mount/unmount, and delete a swap file
Loaded: loaded (/lib/systemd/system/dphys-swapfile.service; enabled; preset: enabled)
Active: active (exited) since Tue 2024-07-02 00:27:23 BST; 6min ago
Docs: man:dphys-swapfile(8)
Main PID: 485 (code=exited, status=0/SUCCESS)
CPU: 172ms
Jul 02 00:27:22 moode9test systemd[1]: Starting dphys-swapfile.service - dphys-swapfile - set up, mount/unmount, and delete a swap file...
Jul 02 00:27:23 moode9test dphys-swapfile[372]: want /var/swap=100MByte, generating swapfile ... of 100MBytes
Jul 02 00:27:23 moode9test systemd[1]: Finished dphys-swapfile.service - dphys-swapfile - set up, mount/unmount, and delete a swap file.
# SWAPFILE SIZE 100MB
pi@moode9test:~ $ free -m
total used free shared buff/cache available
Mem: 907 223 401 4 339 683
Swap: 99 0 99
pi@moode9test:~ $
I'm not sure the locale error matters much, the swap file was enabled and works regardless. However, I'm still confused by the locale settings. In your example, the locale command seems to returning an en_US prefix in all the values. However my 3A set to en_GB in the imager says this:
Code:
master@prometheus:~ $ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_GB.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
LC_ADDRESS=en_GB.UTF-8
LC_TELEPHONE=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION=en_GB.UTF-8
LC_ALL=
I don't think it is causing any issues though. An opportunity for me to learn some stuff.
----------------
Robert
Robert