Jump to content

Helios64 - Armbian Bookworm -> OMV 7 RC1 install problems (SOLVED)


Recommended Posts

Posted (edited)

I tried to install OMV 7 RC1 on the Bookworm image, but I get a lot of "Segmentation fault" and "free(): invalid pointer" error messages.

My Installation for the Bookworm image...

 

Is the problem due to the Bookworm image or the 6.6.8 kernel or should I contact the OMV team?

 

Here is the complete log of the OMV 7 RC1 installation...

 

  Reveal hidden contents

 

Edited by TDCroPower
Posted (edited)

Solved in this thread...

 

Here the installation success output...

  Reveal hidden contents

 

Edited by TDCroPower
  • TDCroPower changed the title to Helios64 - Armbian Bookworm -> OMV 7 RC1 install problems (SOLVED)
Posted

Openmediavault 7 (sandworm) is now released.

 

Using my Helios64 with Linux 6.6.8, I followed the instructions on https://github.com/OpenMediaVault-Plugin-Developers/installScript to install OMV7.

 

First attempt failed during the update of linux image by initramfs. The device rebooted by itself. 

 

This was due to CPUfrequency parameters that were changed in between, probably by one of OMV necessary package.

Previously were :

$ cat /etc/default/cpufrequtils
ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED="1800000"
MIN_SPEED="408000"

 

And were updated to :

$ cat /etc/default/cpufrequtils
ENABLE="true"
GOVERNOR="schedutil"
MAX_SPEED="0"
MIN_SPEED="0"

 

I changed back the governor to "ondemand" using armbian-config > System > CPU.

$ sudo armbian-config

Needed to clean the install with :

$ sudo dpkg-reconfigure -a

 

And lauch again the install script :

$ sudo curl -sSL https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

 

To be sure OMV is aligned with my CPUfrequency parameters, I checked :

$ cat /etc/default/openmediavault
...
OMV_CPUFREQUTILS_GOVERNOR="ondemand"
OMV_CPUFREQUTILS_MINSPEED="408000"
OMV_CPUFREQUTILS_MAXSPEED="1800000"

Those parameters were collected by the install script from /etc/default/cpufrequtils : https://github.com/OpenMediaVault-Plugin-Developers/installScript/blob/master/install

 

 

Be aware OMV remove ssh-users group from /etc/ssh/sshd_config. It still possible to ssh using root.

$cat /etc/ssh/sshd_config
...
AllowGroups root _ssh
...

As sshd_config is now controlled by OMV and may be replaced unexpectedly, you should include your user in _ssh group

$ sudo usermod -a -G _ssh youruser

 

Posted

@Trillien 

I recommend that you do not set the max frequency to 1800000, set it only to max 1200000.
Only 2 of the 6 cores can reach this high frequency and this often leads to problems.
It is unpleasant but so far there is no solution.
But it is not so tragic with a NAS.

 

But thank you for the instructions/tips, I'll give it a try.

Posted

@Trillien you can also see the CPU frequencies in the sbc check...

 

    CPU 1:
      Microarchitecture: Cortex-A53
      Max Frequency:     1.416 GHz
      Cores:             4 cores
      Features:          NEON,SHA1,SHA2,AES,CRC32
    CPU 2:
      Microarchitecture: Cortex-A72
      Max Frequency:     1.800 GHz
      Cores:             2 cores
      Features:          NEON,SHA1,SHA2,AES,CRC32

 

Posted (edited)

@Trillien I have monitored the installation with the following command to see when the frequency is changed and then when it crashes.
Command to monitor the cpufrequtil file...

while [ 1 ]; do sleep 1; clear; tail /etc/default/cpufrequtils; done

 

at this point the cpufrequtils file is changed to the 0 values...

/usr/lib/python3/dist-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
  ) = locale.getdefaultlocale()
/usr/lib/python3/dist-packages/salt/grains/core.py:2711: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
  ) = locale.getdefaultlocale()
/usr/lib/python3/dist-packages/salt/utils/pycrypto.py:26: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
  import crypt
/usr/lib/python3/dist-packages/salt/modules/linux_shadow.py:21: DeprecationWarning: 'spwd' is deprecated and slated for removal in Python 3.13
  import spwd
Deploying service configurations ... <<<<< here !!!
Processing system modifications ... <<<<< or here !!!

 

and at this point the cpufrequtils file is changed back to its own values...

                                - modules.omv_conf
                                - modules.omv_utils

              Summary for helios64
              ------------
              Succeeded: 4 (changed=4)
              Failed:    0
              ------------
              Total states run:     4
              Total run time:   3.700 s

Summary for helios64
------------
Succeeded: 6 (changed=5)
Failed:    0
------------
Total states run:     6
Total run time:  22.648 s

 

and exactly then the helios64 crashes/reboots directly.

I'll take a look at the script that is executed at this point and see if it can be deactivated.

 

edit:

ok the installation of omv changes the cpufrequtils file at this point of the script...

line 337 - 343...  
  _log "Installing openmediavault..."
  aptFlags="--yes --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends"
  apt-get ${aptFlags} install openmediavault 2>&1 | tee -a ${logfile}
  if [ ${PIPESTATUS[0]} -gt 0 ]; then
    _log "failed to install openmediavault package."
    exit 2
  fi

... I'll go to the OMV forum and ask why this is done and whether it is really necessary, because changing the cpufrequtils without reboot kills the Helios!

 

Here my OMV forum post:

https://forum.openmediavault.org/index.php?thread/52156-omv-7-install-on-helios64-fails/

Edited by TDCroPower
Posted (edited)

@Trillien your command to clean up the install doesn't work...

root@helios64:~# dpkg-reconfigure -a
Unknown option: a
Usage: dpkg-reconfigure [options] packages
  -u,  --unseen-only		Show only not yet seen questions.
       --default-priority	Use default priority instead of low.
       --force			Force reconfiguration of broken packages.
       --no-reload		Do not reload templates. (Use with caution.)
  -f,  --frontend		Specify debconf frontend to use.
  -p,  --priority		Specify minimum priority question to show.
       --terse			Enable terse mode.

 

edit:

The following command worked and then the script ran through without any problems... finally I have OMV 7 on the eMMC (boot) + SSD installation!

dpkg-reconfigure openmediavault

 

or do you perhaps mean the following command, which has at least the -a option...

dpkg --configure -a

 

Edited by TDCroPower
Posted (edited)

Sorry, I meant

dpkg --configure -a

 

I've got a theory on /etc/default/cpufrequtils change.

Searching within openmediavault github repository for "Deploying Service Configurations ...", there is only one result : deb/openmediavault/debian/openmediavault.postinst 

According to openmediavault.postinst, the script echoes this message and runs omv-salt deploy run cpufrequtils

237		########################################################################
238		# Deploy various services when the package is installed the first time.
239		########################################################################
240		if [ -z "$2" ]; then
241			# Disable default nginx site.
242			nginx_dissite default || :
243
244			# Deploy the configuration for various services.
245			echo "Deploying service configurations ..."
246			LANG=C.UTF-8 omv-salt deploy run --no-color --quiet \
247				apt cpufrequtils chrony rsyslog \
248				watchdog monit rrdcached avahi ssh nginx collectd \
249				phpfpm issue sysctl systemd systemd-logind || :
250		fi

 

Thanks to https://docs.openmediavault.org/en/stable/various/advset.html#environmental-variables, I learn the configuration files used by omv-salt is stored at /srv/salt/omv

 

Looking at the deploy stage in /srv/salt/omv I find a cpufrequtils folder

kobol@helios64:~$ ls -al /srv/salt/omv/deploy/cpufrequtils/
total 20
drwxr-xr-x  3 root root 4096 Apr  5 15:58 .
drwxr-xr-x 39 root root 4096 Apr  5 17:04 ..
-rw-r--r--  1 root root 2387 Mar  9 12:58 default.sls
drwxr-xr-x  2 root root 4096 Apr  5 15:58 files
-rw-r--r--  1 root root  916 Mar  9 12:58 init.sls

 

default.sls tells us the source file used by salt to configure /etc/default/cpufrequtils is files/cpufrequtils.j2

$ nano /srv/salt/omv/deploy/cpufrequtils/default.sls
...
configure_default_cpufrequtils:
  file.managed:
    - name: "/etc/default/cpufrequtils"
    - source:
      - salt://{{ tpldir }}/files/cpufrequtils.j2
    - template: jinja
    - context:
        cpufreq: {{ config.cpufreq }}
    - user: root
    - group: root
    - mode: 644
...

 

Finally, files/cpufrequtils.j2 calls for OMV_CPUFREQUTILS_MAXSPEED, OMV_CPUFREQUTILS_MINSPEED and OMV_CPUFREQUTILS_GOVERNOR

$ nano /srv/salt/omv/deploy/cpufrequtils/files/cpufrequtils.j2
{%- set max_speed = salt['pillar.get']('default:OMV_CPUFREQUTILS_MAXSPEED', '0') -%}
{%- set min_speed = salt['pillar.get']('default:OMV_CPUFREQUTILS_MINSPEED', '0') -%}
{%- set governor = salt['pillar.get']('default:OMV_CPUFREQUTILS_GOVERNOR', salt['grains.filter_by']({
    "default": "ondemand",
    "amd64": "conservative",
    "i386": "conservative",
    "armhf": "schedutil",
    "arm64": "schedutil",
    "armel": "schedutil"
  }, grain="osarch")) -%}
{%- if cpufreq -%}
ENABLE="true"
{%- else -%}
ENABLE="false"
{%- endif %}
GOVERNOR="{{ governor }}"
MAX_SPEED="{{ max_speed }}"
MIN_SPEED="{{ min_speed }}"

 

The point is these values are first defined in the install script at line 543... after omv-salt is called on cpufrequtils at line 337

543	# set defaults in /etc/default/openmediavault
544	omv_set_default "OMV_CPUFREQUTILS_GOVERNOR" "${GOVERNOR}"
545	omv_set_default "OMV_CPUFREQUTILS_MINSPEED" "${MIN_SPEED}"
546	omv_set_default "OMV_CPUFREQUTILS_MAXSPEED" "${MAX_SPEED}"

 

As per /srv/salt/omv/deploy/cpufrequtils/files/cpufrequtils.j2, there isn't any values defined yet in /etc/default/openmediavault. Thus :

  • governor takes "schedutil"
  • max_speed is 0
  • min_speed is 0
Edited by Trillien
Posted

@Trillien could be due to the commands after the installation...

line 345-347
  omv-confdbadm populate 2>&1 | tee -a ${logfile}
  omv-salt deploy run hosts 2>&1 | tee -a ${logfile}
fi

also explains why your "workaround" probably works, since the part is skipped if OMV has already been installed...

line 295-297, end with fi on line 347
# install openmediavault if not installed already
omvInstall=$(dpkg -l | awk '$2 == "openmediavault" { print $1 }')
if [[ ! "${omvInstall}" == "ii" ]]; then

 

... the DEV ryecoaaron from the script is currently looking at the script fortunately and will hopefully fix the problem in the next version.

 

Do you use Docker?
For me, Helios crashes when I try to start a container, even with the hello-world test image from Docker...

docker run hello-world

 

Posted

I plan to use OMV Photoprism extension that's managed as a container by OMV. As I remember, OMV doesn't manage containers with Docker but Podman.

Not tested yet.

 

Did you have a look at?

 

Posted
  Quote

could be due to the commands after the installation...

line 345-347
omv-confdbadm populate 2>&1 | tee -a ${logfile}
omv-salt deploy run hosts 2>&1 | tee -a ${logfile} fi
Expand  

 

Nop, I didn't get a chance to reach these steps at the first install.

It reboot during update-initramfs, part of apt install openmediavault substep.

However, /etc/default/cpufrequtils were already changed to "schedutil"

Posted

Hi @TDCroPower

 

Have you got any issue with systemd-networkd service ?

I systematically have a timeout as it seems waiting for all network interface to be ready.

$ systemctl status systemd-networkd-wait-online.service
× systemd-networkd-wait-online.service - Wait for Network to be Configured
     Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/systemd-networkd-wait-online.service.d
             └─override.conf
     Active: failed (Result: exit-code) since Fri 2024-04-19 16:33:57 CEST; 18min ago
       Docs: man:systemd-networkd-wait-online.service(8)
    Process: 1188 ExecStart=/lib/systemd/systemd-networkd-wait-online (code=exited, status=1/FAILURE)
   Main PID: 1188 (code=exited, status=1/FAILURE)
        CPU: 48ms

 

I use end0 network interface.

The other enx646266d00b79 isn't connected

I've got a bridge br0 with a virtual tap0 interface (OpenVPN)

podman runs a container and enable the interface veth7198de08 and the bridge cni-podman.

 

$ networkctl
IDX LINK            TYPE     OPERATIONAL SETUP
  1 lo              loopback carrier     unmanaged
  2 end0            ether    enslaved    configuring
  4 enx646266d00b79 ether    no-carrier  configured
  5 br0             bridge   routable    configured
  6 tap0            ether    enslaved    configuring
  7 cni-podman0     bridge   routable    unmanaged
  8 veth7198de08    ether    enslaved    unmanaged

7 links listed.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines