public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: gentoo-amd64@lists.gentoo.org
Subject: [gentoo-amd64] Re: grub2 upgrade fail (was Boycott Systemd)
Date: Wed, 24 Sep 2014 12:29:34 +0000 (UTC)	[thread overview]
Message-ID: <pan$9a380$ba10af86$a890d9c6$c13da8b8@cox.net> (raw)
In-Reply-To: 20140923055051.GA3384@crud

Barry Schwartz posted on Tue, 23 Sep 2014 00:50:51 -0500 as excerpted:

> Expanding on this:
>> From: Barry Schwartz <chemoelectric@chemoelectric.org>
>> Date: Tue, 23 Sep 2014 00:42:44 -0500
>> 
>> Antoine Martin <antoine@nagafix.co.uk> skribis:
>>> "Simple" and the large collection of scripts that is grub2 is not
>>> something I often hear in the same sentence ;)
>> 
>> I don’t use any of the scripts, and just have a very simple, hand
>> edited grub config file.
> 
> See http://exherbo.org/docs/install-guide.html for how simple it can be
> to use GRUB 2, if you just ignore the hoopla. My own config is more
> complicated; it installs some fonts and has entries for memtest; but
> these are minor niceties.

When I installed grub2 I was running four drives in (mdraid) raid1 mode.  
While most of the system was 4-way raid1, I already had my /boot as two-
way raid1, with a backup /boot on a second two-device raid1.  That 
allowed me to update one grub and/or /boot at a time, leaving the other 
one in place and changing much more slowly.  I run git kernels and 
normally load another git kernel on the "working" /boot every few days, 
updating the backup only with the .0 stable kernel releases.  (I don't 
usually bother with the stable-series .1, and usually switch to the new 
development kernel about the time stable .2 or .3 comes out, so the .0 
releases are my "stable" kernels.)

Between that and the fact that I was already running GPT partitions and 
had already reserved a BIOS partition for grub2's usage when I switched 
to GPT, made the switch to grub2 reasonably easy.

But I too don't use the scripts, and indeed, have the primary scripted 
installer install-masked, so there's no way anything could /possibly/ run 
it accidentally, as it simply doesn't exist /to/ run!

And my grub2 native scripted config is probably one of the more complex 
ones here.  My grub.cfg is a short stub that primarily sets up the main 
grub menu and exports a few vars, with only the primary boot and a couple 
submenus listed on the initial boot menu.

The first submenu is backups.  This loads another config file that lets 
me choose from several kernels (primary, backup, stable, all set in grub 
vars and I simply assign the appropriate one to the bootkernel var), 
choose which root I'm going to boot (working, primary backup, secondary 
backup on another device, again, all set in vars so selecting one simply 
loads the rootselect var from the appropriate one), choose whether I'm 
going to boot systemd or bash as pid1/init (again via vars, with the 
default of course openrc previously, and with both openrc and systemd 
available for awhile when I switched), and yet another choice that gives 
me a prompt to fill in additional kernel-commandline options if I want to 
(again assigned to a grub var, that's normally null).  Finally, there's a 
reset option that resets all these choices back to the defaults, if I 
screw up on one of them.

Actual booting, whether the default boot as chosen from the initial menu, 
or from the backups submenu, loads yet another config file, that simply 
loads all those vars into the appropriate place in the kernel command and 
runs it.  Additionally, it detects (via another var) whether I'm loading 
it from the backups submenu/config, or the default boot, from the main 
menu/config.  If it's the default it simply runs it, if it's loaded from 
the backups submenu, it loads all the vars and displays what it's going 
to do, asking me if that's correct, before actually running it.  If I 
tell it no, it loads the backups menu/config again and lets me try again.

The second submenu/config available from the primary menu is utils.  This 
contains built-in grub-command choices such as reboot/halt, a command 
that loads all my partitions into various vars so I can switch to grub-
command mode and browse arbitrary files from them (using the vars) if 
need be (good for loading the kernel dir to read about kernel commandline 
options if I'm troubleshooting! =:^), an entry that cats out (with the 
grub-pager activated) my grub-notes files with various useful grub and 
kernel-commandline options I've discovered over the years, etc.

Of course I could switch to grub-commandline mode and do most of these 
same things, including directly editing the kernel commandline that grub 
will hand off, but it's nice to have the choices all setup in a nice menu-
based system so I can simply select the appropriate ones, instead. =:^)

And because it's all grub-var based, with many of the basic choices 
already preset in grubenv, changing many of the settings is simply a 
matter of mounting /boot and running grub-editenv from a terminal. =:^)

> (Completely avoiding initrd by simply putting / and /usr on one
> filesystem is another of those measures you wouldn’t think existed if
> your experience were entirely Ubuntu, etc.)

That's how my system is setup, not to avoid an initr* altho it's nice for 
that, but rather, so that everything installed by portage is on the same 
partition as the portage installation database (/var/db/pkg).  I learned 
to do that the hard way, after having a drive die and having to recover 
from backups, but with the backup for /, /var, and /usr, being three 
different backups created at different times, so when I had finished 
restoring from backup, the installed-package database didn't match what 
was actually on / and /usr!  I was still cleaning up from that fiasco, 
finding stale files that hadn't been updated because portage lost track 
of them due to all this, over a year later!

I vowed never again!  So now most of /var along with most of /usr, pretty 
much everything portage installs, is on /, along with the database 
tracking it.  That way, whatever backup I end up booting to and restoring 
from, the installed-package database will match it, because it's on the 
same backup! =:^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



  reply	other threads:[~2014-09-24 12:29 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-21 17:25 [gentoo-amd64] Boycott Systemd Frank Peters
2014-09-21 17:37 ` Canek Peláez Valdés
2014-09-21 18:30   ` Frank Peters
2014-09-21 19:15     ` Canek Peláez Valdés
2014-09-21 19:20     ` Barry Schwartz
2014-09-21 19:22       ` Canek Peláez Valdés
2014-09-21 19:33         ` Barry Schwartz
2014-09-21 19:45           ` Canek Peláez Valdés
2014-09-21 19:48             ` Canek Peláez Valdés
2014-09-21 21:13         ` Frank Peters
2014-09-21 22:04           ` Canek Peláez Valdés
2014-09-21 22:15             ` Harry Holt
2014-09-21 22:28               ` Canek Peláez Valdés
2014-09-22  5:27                 ` [gentoo-amd64] " Duncan
2014-09-22  0:26             ` [gentoo-amd64] " Frank Peters
2014-09-22  0:45               ` Rich Freeman
2014-09-22  2:02                 ` Frank Peters
2014-09-22  2:34                   ` Rich Freeman
2014-09-22  6:00                     ` [gentoo-amd64] " Duncan
2014-09-22 12:47                       ` Harry Holt
2014-09-22 12:53                         ` Rich Freeman
2014-09-22 16:14                           ` Duncan
2014-09-23 14:55                             ` Frank Peters
2014-09-24 11:25                               ` Duncan
2014-09-24 16:58                                 ` Frank Peters
2014-09-25  4:12                                   ` Duncan
2014-09-25 11:34                                     ` Harry Holt
2014-10-07 14:18                                       ` Harry Holt
2014-10-07 14:55                                         ` Barry Schwartz
2014-10-07 17:04                                         ` Rich Freeman
2014-10-07 20:43                                           ` Barry Schwartz
2014-10-07 20:54                                             ` Damien Levac
2014-10-07 21:19                                               ` Barry Schwartz
2014-10-07 21:45                                                 ` Rich Freeman
2014-10-08  1:15                                                   ` Frank Peters
2014-10-08  2:28                                                     ` Rich Freeman
2014-10-08  3:19                                                       ` Harry Holt
2014-10-08 12:34                                                         ` Phil Turmel
2014-10-08 18:02                                                           ` Frank Peters
2014-10-08 21:42                                                             ` Barry Schwartz
2014-10-08  3:23                                                       ` Frank Peters
2014-09-22 13:23                         ` Barry Schwartz
2014-09-22 17:00                         ` Frank Peters
2014-09-22 16:21                       ` Frank Peters
2014-09-22 19:46                         ` Duncan
2014-09-22 17:04               ` [gentoo-amd64] " Lie Ryan
2014-09-22 17:58                 ` Barry Schwartz
2014-09-22 18:22                   ` Canek Peláez Valdés
2014-09-22 19:08                     ` Barry Schwartz
2014-09-22 19:18                       ` Canek Peláez Valdés
2014-09-22 19:46                         ` Barry Schwartz
2014-09-22 19:30                     ` Frank Peters
2014-09-22 19:37                       ` Rich Freeman
2014-09-22 19:39                       ` Canek Peláez Valdés
2014-09-22 19:54                       ` Barry Schwartz
2014-09-22 20:08                     ` Harry Holt
2014-09-22 20:22                       ` Canek Peláez Valdés
2014-09-23  4:00                         ` Canek Peláez Valdés
2014-09-23  3:51                     ` Antoine Martin
2014-09-23  4:07                       ` Barry Schwartz
2014-09-23  5:17                         ` [gentoo-amd64] grub2 upgrade fail (was Boycott Systemd) Antoine Martin
2014-09-23  5:42                           ` Barry Schwartz
2014-09-23  5:50                             ` Barry Schwartz
2014-09-24 12:29                               ` Duncan [this message]
2014-09-23  4:09                       ` [gentoo-amd64] Boycott Systemd Canek Peláez Valdés
2014-09-23  4:32                         ` Barry Schwartz
2014-09-23  4:48                           ` Canek Peláez Valdés
2014-09-23  5:49                             ` Frank Peters
2014-09-23  6:05                               ` Barry Schwartz
2014-09-23  6:31                               ` Canek Peláez Valdés
2014-09-23  5:28                         ` Barry Schwartz
2014-09-23 17:11                       ` Paul Jewell
2014-09-23 23:31                         ` Systemd is really beside the point, anyway (was Re: [gentoo-amd64] Boycott Systemd) Barry Schwartz
2014-09-24 12:45                       ` [gentoo-amd64] Re: Boycott Systemd Duncan
2014-09-22 18:41                   ` [gentoo-amd64] " Frank Peters
2014-09-22 18:44                     ` Canek Peláez Valdés
2014-09-22 19:24                     ` Barry Schwartz
2014-09-22 20:07                       ` Frank Peters
2014-09-22 20:24                         ` Barry Schwartz
2014-09-22 20:24                     ` [gentoo-amd64] " Duncan
2014-09-22 18:07                 ` [gentoo-amd64] " Frank Peters
2014-09-22 16:11           ` Lie Ryan
2014-09-22 16:35             ` Barry Schwartz
2014-09-22 17:55             ` Frank Peters

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='pan$9a380$ba10af86$a890d9c6$c13da8b8@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --cc=gentoo-amd64@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox