grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* reporting amount of available memory (and acting on it) from grub?
@ 2016-01-06  8:50 Daniel Kahn Gillmor
  2016-01-06  9:09 ` Andrei Borzenkov
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Kahn Gillmor @ 2016-01-06  8:50 UTC (permalink / raw)
  To: The development of GNU GRUB

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: reporting amount of available memory (and acting on it) from grub?
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Andrei Borzenkov @ 2016-01-06  9:09 UTC (permalink / raw)
  To: The development of GNU GRUB

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.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-06  9:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).