From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-135585-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1S1fp9-0000dS-C2
	for garchives@archives.gentoo.org; Sun, 26 Feb 2012 15:15:43 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 95D44E1074;
	Sun, 26 Feb 2012 15:15:14 +0000 (UTC)
Received: from mx.virtyou.com (mx.virtyou.com [178.33.32.244])
	by pigeon.gentoo.org (Postfix) with ESMTP id EA79AE10A4
	for <gentoo-user@lists.gentoo.org>; Sun, 26 Feb 2012 15:12:34 +0000 (UTC)
Received: from weird.wonkology.org (xdsl-84-44-153-187.netcologne.de [84.44.153.187])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(Client did not present a certificate)
	by mx.virtyou.com (Postfix) with ESMTPSA id F3924DC04C
	for <gentoo-user@lists.gentoo.org>; Sun, 26 Feb 2012 16:12:33 +0100 (CET)
Date: Sun, 26 Feb 2012 16:12:30 +0100
From: Alex Schuster <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Safe way to test a new kernel?
Message-ID: <20120226161230.6719c2b4@weird.wonkology.org>
In-Reply-To: <CAN0CFw2PUHK1GruW6q+VjfkUifpSsSsTyzt7CgCffgAdWGBSWw@mail.gmail.com>
References: <CAN0CFw1msVnW-o4fxw8tjk+MMbHjHfLNb-HLr77jqbo++=j2Mg@mail.gmail.com>
	<ji9fu5$3bb$1@dough.gmane.org>
	<CAN0CFw1Vj246Nmg6df3ivqdeyHMxHHY3y1OEhzXrvEG02_QObQ@mail.gmail.com>
	<CAN0CFw13Ajx_3Z-vqgJz0GeQmfWtGLV9KeYVOAyWt-cVwe3Zsg@mail.gmail.com>
	<20120226141908.4213e10e@weird.wonkology.org>
	<CAN0CFw2PUHK1GruW6q+VjfkUifpSsSsTyzt7CgCffgAdWGBSWw@mail.gmail.com>
X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: a218a943-3e4c-4ba2-abfd-b9aee0fb9838
X-Archives-Hash: 56104e99e04f64a8a0dbae830b8f810d

Grant writes:

> > Have a look at 'info grub', 'Booting' -> 'Making your system robust',
> > especially section 4.3.2 'Booting fallback systems'. That's what I
> > used in order to test new kernels remotely.
> >
> > =A0 =A0 =A0 =A0Wonko
>=20
> I like that better.  Where do you execute 'grub-set-default 0'?

I had it in /etc/init.d/local.start back when I used these features.
Nowadays with openrc I would put this line
in /etc/local.d/grub-default.start. I had some safety checks included,
like testing if networking and sshd was running, so this box would be
accessible from remote. But this is some years ago now, currently I do
not administrate such remote servers and so I have not used this
mechanism for a while.


> BTW, is there a way to tell which grub entry I'm booted into, or am I
> best off examining the contents of /proc/config.gz?

The first line in /boot/grub/default has the number of the default entry.
grub-set-default modifies this file, as does the GRUB savedefault command.

	Wonko