site  contact  subhomenews

More sanity checks for Limine Installer

August 11, 2022 — BarryK

Mike has been very helpful, testing Limine Installer on old computers. Consequently, I have put in extra sanity checks, and bumped the PET to version 1.3, that you can find here:

https://forum.puppylinux.com/viewtopic.php?p=62568#p62568

Here is some of the new sanity code, in /usr/local/limine-installer/limine-installer:

#20220810 ref: https://www.cyberciti.biz/faq/linux-how-to-find-if-processor-is-64-bit-or-not/
grep -q -o -w lm /proc/cpuinfo
CPU64bit=$? #0 64-bit, else 32-bit CPU
if which uname >/dev/null ; then
OSarch="$(uname -m)"
elif which arch >/dev/null ; then
OSarch="$(arch)"
else
exit #really stupid linux system if it comes here.
fi
if [ $CPU64bit -eq 0 ];then
if [ "${OSarch: -2:2}" != "64" ];then
MSG3="$(gettext 'You are running a 32-bit OS on a computer with 64-bit CPU. Please run a 64-bit Linux OS. Cannot continue.')"
err_popup_func "${MSG3}"
exit
fi
fi

Which seems good; however, Mike has tested that highlighted line on a eeepc r11cx laptop, which returned no-match. That laptop has a Intel Atom N2600 CPU, which is 64-bit, so that test should have returned zero, meaning a hit. But didn't, which is weird.

Note, the "-q" in that test means "quiet". if left out, the test would return "lm" if a hit.

I have asked him to test with the 'lscpu' utility, which should definitely report whether the CPU is 64-bit. So, still a work-in-progress.  

Tags: easy