Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

g00d

Members
  • Joined

  • Last visited

Solutions

  1. g00d's post in how to modify MOTD was marked as the answer   
    Well, I made some progression and want to share it with the community:
     
    Related to question 1)
    still unresolved because I don't know if I am missing something or this could possibly be a bug?
     
    Related to question 2)
    the culprit lies inside the function storage_info() because I am not using simply /dev/sda1 but an encrypted drive. My disk *is* /dev/sda1 but it's LUKS encrypted and so my device for the system is /dev/mapper/rootfs or even more /dev/mapper/volumeGroup1-rootfs because I am also using LVM. The storage_info() function does not take this into account. I had to modify the function to this here:
    function storage_info() {         # storage info         RootInfo=$(df -h /)         root_usage=$(awk '/\// {print $(NF-1)}' <<<${RootInfo} | sed 's/%//g')         root_total=$(awk '/\// {print $(NF-4)}' <<<${RootInfo})         StorageInfo=$(df -h $STORAGE 2>/dev/null | grep $STORAGE)         #if [[ -n "${StorageInfo}" && ${RootInfo} != *$STORAGE* ]]; then         if [[ -n "${StorageInfo}" ]]; then                 storage_usage=$(awk '/\// {print $(NF-1)}' <<<${StorageInfo} | sed 's/%//g')                 storage_total=$(awk '/\// {print $(NF-4)}' <<<${StorageInfo})                 if [[ -n "$(command -v smartctl)" ]]; then                         #DISK="${STORAGE::-1}"                         storage_temp+=$(smartctl -l scttempsts $DISK 2> /dev/null | grep -i 'Current Temperature:' | awk '{print $(NF-1)}')                         storage_pwroff_retract_count=$(smartctl -a $DISK | grep Power-Off_Retract | awk '{print $10}')                 fi         fi } # storage_info  
    in detail:
     
    it needs to comment out the originally line
    #if [[ -n "${StorageInfo}" && ${RootInfo} != *$STORAGE* ]]; then  
    and change it to:
    if [[ -n "${StorageInfo}" ]]; then  
    it needs to comment the following line here inside the if clause:
    #DISK="${STORAGE::-1}"  
    and it needs a definition in the top of the script where we need to add a DISK variable. Simply said, we need to separate DISK and STORAGE in case of encrypted systems and/or LVM used. The top of the script 30-armbian-sysinfo looks like that in my case:
    DISK=/dev/sda1 STORAGE=/dev/mapper/volumeGroup1-rootfs  
    that way the script works fine and outputs the correct values.
     
    Related to question 3)
    solved also according to question 2. I added the threshold 50 for the power-off retract count in the beginning for the script:
    [...] CPU_TEMP_OFFSET=0 HDD_TEMP_LIMIT=60 PWROFF_WARN=25 [...]  
    The variable and display command should look like that:
    disk_pwroff_retract_count=$(smartctl -a $DISK | grep Power-Off_Retract | awk '{print $10}') [...] # display info display "HDD PWRoff Retract Count" "$disk_pwroff_retract_count" $PWROFF_WARN "0" "times" "" ; a=$((a+$?)) [...]  
  2. Me again. I figured out what the problem was and I was able to solve this like that:
     
    the original /boot structure contains three symbolic links, in my case on the ODROID-HC2 (which is equal to odroidxu4):
     
    dtb -> dtb-5.4.151-odroidxu4
    uInitrd -> uInitrd-5.4.151-odroidxu4
    zImage -> vmlinuz-5.4.151-odroidxu4
     
    The default boot.ini is seeking for that link names but on the fat system it's not possible to have symbolic links. I just renamed (or one can simply copy) the existing three files like that:
     
    dtb-5.4.151-odroidxu4 ---to---> dtb
    uInitrd-5.4.151-odroidxu4 ---to---> uInitrd
    vmlinuz-5.4.151-odroidxu4 ---to---> zImage
     
    I also found out that /boot folder is NOT being red by boot process, it looks at the root folder for those files. So I "mv /boot/* /" moved the complete content of the /boot folder into the root. That way the boot process works like a charm.
     
    Thank you Igor for assistance. Have a nice weekend
     


     
     

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.