[sf-lug] Grub question
eric at ericwalstad.com
Sun Mar 25 12:22:48 PDT 2012
On Sat, Mar 24, 2012 at 10:40 PM, Michael Paoli
<Michael.Paoli at cal.berkeley.edu> wrote:
> I'm presuming we're talking GRUB "2" (not "legacy" grub).
> I believe the GRUB_DISABLE_RECOVERY option just prevents grub from
> creating menu entries with recovery boot option (e.g. separate
> additional entries for Linux kernel with additional boot parameter of
> "single" for single user mode) - so that option is probably wouldn't
> help in the case cited.
That's what it looked like to me. Thanks for confirming it.
> First question is - why - beyond the obvious repeated, and potentially
> unpredictable, power disruptions, is it getting "stuck" - presumably in
> the boot process. A few possibilities come to mind - and some possible
> ways of addressing them (even if power isn't addressed).
The installation is really remote, sometimes snowed-in, and
off-grid. It's solar powered. To reduce power consumption (and
thus the number of solar panels that are needed, I only run the
computer during the daylight hours. Power is cycled off at sundown and
cycled on at sunrise. The computer is configured to shut itself down
well before sundown and to turn on when it senses power is available.
I suspect that what is happening is that after a few days of overcast
sky the battery voltage drops close to, but not quite below, the
charge controller's "LVD" (low voltage disconnect) setpoint. Then,
when the sun comes up, the power comes on. As the computer boots, it
pulls the battery voltage below the LVD and the charge controller
disconnects the load (to protect the battery) during the boot process.
> And by "maintenance shell" - is that Linux in, or prompting to go into
> single user mode? ... and is that from filesystem(s) too unclean for the
> default unattended filesystem check/fix/mounts to succeed?
I just read that there are three possible "recovery" destinations with
grub2. I don't know which one I'm landing in, I'll pay closer
attention next time this happens. I've never had to fsck or do any
maintenance. Come to think of it, I think that when I boot it with
the monitor and keyboard attached it stops at the grub menu waiting
for me to manually select the menu item and press Enter. Urgh, that's
frustrating considering it's a 4+hr drive to just hit "Enter".
> Anyway, a few things ...
> Be sure the default GRUB entry that's booted is
> for multiuser mode. Also, for quicker unattended reboots, make sure
> the timeout is "short enough" (but not too short that one can't
> reasonably easily interrupt it if/when one wants to).
Yeah, that's a good idea. I think I'm using the default of, what is
it, 10s? It boots pretty fast and if I can just get past the boot
sequence before the LVD happens I'd be in better shape. Ultimately
I'd like to be able to have it check the (external) battery voltage
and shutdown if low, similar to how it's done with laptops. If you
have any experience or suggestions, I'd appreciate hearing them.
(Here's the hardware I'm currently running)
> Some time of remote management could come in quite handy (e.g. IPMI).
> One could then potentially remotely reset host, effectively access (at
> least text) console, etc.
There's no inbound network access, unfortunately. Also, this is a
hobby project that is constrained in just about every parameter
imaginable, including financial ;).
Thanks very much for your thoughtful comments, much appreciated!
 ASUS TS Mini SOHO Home Server w/ Intel Atom N280 1.66GHz 1GB DDR2
with an smallish SSD.
More information about the sf-lug