All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: reporting amount of available memory (and acting on it) from grub?
Date: Wed, 6 Jan 2016 12:09:27 +0300	[thread overview]
Message-ID: <568CD9C7.5050401@gmail.com> (raw)
In-Reply-To: <877fjnum67.fsf@alice.fifthhorseman.net>

06.01.2016 11:50, Daniel Kahn Gillmor пишет:
> 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?
> 

Look at lsmmap; in principle, it could be extended to report totals and
set value to variable, or another command added.




      reply	other threads:[~2016-01-06  9:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06  8:50 reporting amount of available memory (and acting on it) from grub? Daniel Kahn Gillmor
2016-01-06  9:09 ` Andrei Borzenkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=568CD9C7.5050401@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.