Finnix Forums » Bugs

Finnix fails to boot on 32GB ram server (w/patch)


  1. linproknan
    Member

    Hi!

    Finnix 89.0 and 89.2 fails to boot on one of our servers here in 64-bit mode (x86-64).

    When failing, it has the interesting error message:
    "tmpfs: Bad value '-16587919k' for mount option 'size'"

    The server in question is beefy, it has 16 detected cores and 32GB ram.

    I tracked the failure down to this, in /isolinux/minirt:

    --- tmp4/sbin/init      2006-10-17 10:10:05.000000000 +0200
    +++ tmp5/sbin/init      2007-09-05 13:58:43.000000000 +0200
    @@ -173,14 +173,20 @@
     # New in Kernel 2.4.x: tmpfs with variable ramdisk size.
     # We check for available memory anyway and limit the ramdisks
     # to a reasonable size.
    -FOUNDMEM="$(awk '/MemTotal/{print $2}' /proc/meminfo)"
    -TOTALMEM="$(awk 'BEGIN{m=0};/MemFree|Cached/{m+=$2};END{print m}' /proc/meminfo)"
    -# Never use more than 80% of the RAM available at this point
    -RAMSIZE=$(expr $TOTALMEM \* 80 / 100)
    -echo "${WHITE}[${BLUE}*${WHITE}]${NORMAL} Total memory: ${WHITE}${FOUNDMEM}k${NORMAL}, shared ramdisk: ${WHITE}${RAMSIZE}k${NORMAL}"
    +#
    +# // knan+finnix@linpro.no, 2007-09-05
    +# // commented out the size calculations - unneeded in 2.6, and breaks on 32GB RAM servers
    +# //
    +# // FOUNDMEM="$(awk '/MemTotal/{print $2}' /proc/meminfo)"
    +# // TOTALMEM="$(awk 'BEGIN{m=0};/MemFree|Cached/{m+=$2};END{print m}' /proc/meminfo)"
    +# // Never use more than 80% of the RAM available at this point
    +# // RAMSIZE=$(expr $TOTALMEM \* 80 / 100)
    +# // echo "${WHITE}[${BLUE}*${WHITE}]${NORMAL} Total memory: ${WHITE}${FOUNDMEM}k${NORMAL}, shared ramdisk: ${WHITE}${RAMSIZE}k${NORMAL}"
     echo -n "${WHITE}[${BLUE}*${WHITE}]${NORMAL} Setting up ramdisk... "
    -mount -n -t tmpfs -o "size=${RAMSIZE}k" none /ramdisk
    -mount -n -t tmpfs -o "size=${RAMSIZE}k" none /etc
    +# // mount -n -t tmpfs -o "size=${RAMSIZE}k" none /ramdisk
    +# // mount -n -t tmpfs -o "size=${RAMSIZE}k" none /etc
    +mount -n -t tmpfs none /ramdisk
    +mount -n -t tmpfs none /etc
     for i in UNIONFS FINNIX cdrom dev initrd mnt proc selinux sys tmp tmp/UNIONFS tmp/FINNIX busybin; do
      mkdir /ramdisk/$i
     done

    (Hopefully bbpress doesn't mangle the patch too badly.)

    Please consider including this patch or doing something similar in your next release. It's not as if the calculation is actually needed these days.

    Posted Wed, 19 Sep 2007 01:54:57 -0700
  2. rfinnie
    Administrator

    Your solution makes the tmpfs size "default" (50% total memory), while my code calculates 80% of free memory (at the time). While I have since found that there's an option to specify percentages on mount, it's still of total memory.

    The actual bug is that 32GB-in-KB * 80 (before then dividing by 100) rolls over the 32 bit signed boundary, which busybox doesn't seem do like. Doing "/ 10 * 8" instead accomplishes the same feat.

    Once you actually got it booted, how well does Finnix work on a 32GB machine? Until this point, the biggest machine I've used Finnix on was a 4-core machine with 12GB.

    Posted Tue, 25 Sep 2007 22:08:16 -0700
  3. rfinnie
    Administrator

    Oh, and forgot to mention, yes the fix will be in the next release.

    Posted Tue, 25 Sep 2007 22:08:56 -0700
  4. linproknan
    Member

    It works admirably on the big, beefy server. We're using a customized Finnix (add backup software client, stir gently) for a standard bare metal restore routine for a large customer.

    Not using the tmpfs'es much, just for temporary copies of fstabs and lvmtabs really. The restore goes straight from network to disk. So I had no use for most of either 16GB or 25.6GB of tmpfs :)

    Posted Mon, 22 Oct 2007 05:56:29 -0700