From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-user+bounces-171961-garchives=archives.gentoo.org@lists.gentoo.org> 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 7A4DE1382DE for <garchives@archives.gentoo.org>; Thu, 30 Jun 2016 18:06:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2E406141A2; Thu, 30 Jun 2016 18:06:44 +0000 (UTC) Received: from ahiker.mooo.com (ahiker.mooo.com [173.255.215.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1924B1412D for <gentoo-user@lists.gentoo.org>; Thu, 30 Jun 2016 18:06:42 +0000 (UTC) Received: from itz by ahiker.mooo.com with local (Exim 4.84_2) (envelope-from <itz@ahiker.mooo.com>) id 1bIg7O-0007DL-3n for gentoo-user@lists.gentoo.org; Thu, 30 Jun 2016 10:51:14 -0700 Date: Thu, 30 Jun 2016 10:51:13 -0700 From: Ian Zimmerman <itz@buug.org> To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] GRUB: Configuring a softlevel for grub Message-ID: <20160630173218.4587.109E8235@matica.foolinux.mooo.com> Mail-Followup-To: gentoo-user@lists.gentoo.org 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=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Archives-Salt: c1511565-04bf-4262-993d-8e037f83f44e X-Archives-Hash: 22d55bcc017df2c0215c1b0972658e06 I followed the Handbook page [1] to set up an additional runlevel for a different network environment. The first part, adding and customizing the services with rc-update in the new level, went swimmingly. Now I'm at the line > Edit the bootloader configuration and add a new entry for the offline > runlevel. In that entry, add softlevel=offline as a boot parameter. 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: 1. modify 10_linux itself: huge, complex, dangerous 2. copy 10_linux into a new file and edit just the single line with boot params: ugly, fragile if 10_linux changes Any other way? I dream of somehow "referencing" 10_linux with just the GRUB_CMDLINE_LINUX_DEFAULT variable changed. [1] https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/Initscripts#Using_softlevel -- Please *no* private copies of mailing list or newsgroup messages. Why does the arrow on Hillary signs point to the right?