From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6A02F1382DE for ; Thu, 30 Jun 2016 18:40:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CEE0EE0B6B; Thu, 30 Jun 2016 18:40:00 +0000 (UTC) Received: from smarthost03a.mail.zen.net.uk (smarthost03a.mail.zen.net.uk [212.23.1.20]) by pigeon.gentoo.org (Postfix) with ESMTP id AD8A1E0B5F for ; Thu, 30 Jun 2016 18:39:59 +0000 (UTC) Received: from [82.69.83.178] (helo=mail.digimed.co.uk) by smarthost03a.mail.zen.net.uk with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1bIgsY-0005P0-AB for gentoo-user@lists.gentoo.org; Thu, 30 Jun 2016 18:39:58 +0000 Received: from digimed.co.uk (fenchurch.digimed.co.uk [192.168.1.6]) by mail.digimed.co.uk (Postfix) with ESMTPA id 6F5134BF051 for ; Thu, 30 Jun 2016 19:39:57 +0100 (BST) Date: Thu, 30 Jun 2016 19:39:47 +0100 From: Neil Bothwick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] GRUB: Configuring a softlevel for grub Message-ID: <20160630193947.2af50df2@digimed.co.uk> In-Reply-To: <20160630173218.4587.109E8235@matica.foolinux.mooo.com> References: <20160630173218.4587.109E8235@matica.foolinux.mooo.com> Organization: Digital Media Production X-Mailer: Claws Mail 3.13.2-158-g985422 (GTK+ 2.24.30; x86_64-pc-linux-gnu) X-GPG-Fingerprint: 7260 0F33 97EC 2F1E 7667 FE37 BA6E 1A97 4375 1903 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/cOo_XxrO/J0svXZ16wQoY0b"; protocol="application/pgp-signature" X-Originating-smarthost03a-IP: [82.69.83.178] X-Archives-Salt: 94b180ed-08ed-470c-9d97-833cecfc20fe X-Archives-Hash: 61e5ccf6703aff3a9d7f5e522b14a89c --Sig_/cOo_XxrO/J0svXZ16wQoY0b Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 30 Jun 2016 10:51:13 -0700, Ian Zimmerman wrote: > > Edit the bootloader configuration and add a new entry for the offline > > runlevel. In that entry, add softlevel=3Doffline as a boot parameter. = =20 >=20 > In my case the bootloader is grub2. Looking at the way > /boot/grub/grub.cfg is generated, the Linux menu entries come from > /etc/grub.d/10_linux, and that script is hardwired to create exactly one > normal entry per kernel version, plus maybe a rescue entry that boots > into single user. There is no provision for additional multiuser > entries. So I have to create my own, but this seems to imply I have to > do one of: >=20 > 1. modify 10_linux itself: huge, complex, dangerous >=20 > 2. copy 10_linux into a new file and edit just the single line with boot > params: ugly, fragile if 10_linux changes >=20 > Any other way? I dream of somehow "referencing" 10_linux with just the > GRUB_CMDLINE_LINUX_DEFAULT variable changed. Use the 40_custom file, renumbering it if you need to change the order. Or you can replace 10_linux with your own script. It's just a shell script that spits out menuentry stanzas. 10_linux is quite complex because it has to handle everything, but something customised for your own needs can be much simpler. Or run grub2-mkconfig then hand edit grub.cfg to add the extra entries. There are always plenty of choices with GRUB. --=20 Neil Bothwick If at first you do succeed, try to hide your astonishment. --Sig_/cOo_XxrO/J0svXZ16wQoY0b Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAld1Z3MACgkQum4al0N1GQM8vQCdFkEViHKG6E7X31V1yUu+VfhK 9+YAmwVof6alowKdmLiGBucwSb5jMPcr =twdk -----END PGP SIGNATURE----- --Sig_/cOo_XxrO/J0svXZ16wQoY0b--