Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aGjnQ-0006I7-SN for mharc-grub-devel@gnu.org; Wed, 06 Jan 2016 03:50:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGjnK-0006Hs-Qj for grub-devel@gnu.org; Wed, 06 Jan 2016 03:50:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGjnH-0000Uc-C4 for grub-devel@gnu.org; Wed, 06 Jan 2016 03:50:14 -0500 Received: from che.mayfirst.org ([209.234.253.108]:56996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGjnH-0000UR-8y for grub-devel@gnu.org; Wed, 06 Jan 2016 03:50:11 -0500 Received: from fifthhorseman.net (c-73-231-54-145.hsd1.ca.comcast.net [73.231.54.145]) by che.mayfirst.org (Postfix) with ESMTPSA id 86105F986 for ; Wed, 6 Jan 2016 03:50:09 -0500 (EST) Received: by fifthhorseman.net (Postfix, from userid 1000) id A672420A0A; Wed, 6 Jan 2016 03:50:08 -0500 (EST) From: Daniel Kahn Gillmor To: The development of GNU GRUB Subject: reporting amount of available memory (and acting on it) from grub? User-Agent: Notmuch/0.21+39~gd2ae295 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 06 Jan 2016 00:50:08 -0800 Message-ID: <877fjnum67.fsf@alice.fifthhorseman.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.234.253.108 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2016 08:50:19 -0000 Hi grub folks-- Is there a way that a grub script (or the grub commandline) can report the amount of available memory? It seems like it would be useful in situations like a liveCD or bootable image that might want to warn the user up front if the available RAM is smaller than the advertised minimum. (e.g. Tails or debirf) Currently, when systems boot with less memory than their minimums, they often end up with a kernel dump or something similarly unintelligible to most users. A well-crafted grub configfile for such an image could provide the user with something more understandable, or at least warn the user before continuing that the available memory is believed to be inadequate. I could also imagine a use case like an automated boot process that selects some x86_64 kernel or boot options on machines with > 4GiB of RAM and plain x86 for machines with less. any pointers to how to do this? --dkg