diff --git a/files/initrd/opt/rr/boot.sh b/files/initrd/opt/rr/boot.sh index 0ded08e0..cdf9f65d 100755 --- a/files/initrd/opt/rr/boot.sh +++ b/files/initrd/opt/rr/boot.sh @@ -62,7 +62,7 @@ LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")" DMI="$(dmesg 2>/dev/null | grep -i "DMI:" | sed 's/\[.*\] DMI: //i')" CPU="$(echo $(cat /proc/cpuinfo 2>/dev/null | grep 'model name' | uniq | awk -F':' '{print $2}'))" -MEM="$(free -m 2>/dev/null | grep -i mem | awk '{print $2}') MB" +MEM="$(awk '/MemTotal:/ {printf "%.0f", $2 / 1024}' /proc/meminfo 2>/dev/null) MB" echo -e "$(TEXT "Model: ") \033[1;36m${MODEL}(${PLATFORM})\033[0m" echo -e "$(TEXT "Version: ") \033[1;36m${PRODUCTVER}(${BUILDNUM}$([ ${SMALLNUM:-0} -ne 0 ] && echo "u${SMALLNUM}"))\033[0m" diff --git a/files/initrd/opt/rr/init.sh b/files/initrd/opt/rr/init.sh index 49aef808..19bebc1e 100755 --- a/files/initrd/opt/rr/init.sh +++ b/files/initrd/opt/rr/init.sh @@ -222,7 +222,7 @@ if [ "${DSMLOGO}" = "true" -a -c "/dev/fb0" -a ! "LOCALBUILD" = "${LOADER_DISK}" fi # Check memory -RAM=$(free -m 2>/dev/null | awk '/Mem:/{print $2}') +RAM=$(awk '/MemTotal:/ {printf "%.0f", $2 / 1024}' /proc/meminfo 2>/dev/null) if [ ${RAM:-0} -le 3500 ]; then echo -e "\033[1;33m$(TEXT "You have less than 4GB of RAM, if errors occur in loader creation, please increase the amount of memory.")\033[0m\n" fi