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 4B1DE1382C5 for ; Mon, 14 Jun 2021 01:00:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 05AE0E0DED; Mon, 14 Jun 2021 01:00:47 +0000 (UTC) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 910E6E07C5 for ; Mon, 14 Jun 2021 01:00:46 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lsay4-0006JF-VZ for gentoo-user@lists.gentoo.org; Mon, 14 Jun 2021 03:00:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] Re: Exact setting in grub to default to a kernel by name? Date: Mon, 14 Jun 2021 01:00:38 -0000 (UTC) Message-ID: References: User-Agent: slrn/1.0.3 (Linux) 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 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 93f51896-9c74-46d4-a5b5-7053294e9aea X-Archives-Hash: 81e44c5c060d464d5480d15adc5143b6 On 2021-06-13, Walter Dnes wrote: > On Sun, Jun 13, 2021 at 05:38:53PM -0000, Grant Edwards wrote >> On 2021-06-13, Walter Dnes wrote: >> >> > I'd be tempted to do a manual gub.cfg if I had documentation. >> >> I gave up on the grub2 auto-magical config system many years ago. My >> grub.cfg is typically 10-20 lines long. The documentation is at >> >> https://www.gnu.org/software/grub/manual/grub/grub.html >> >> For manual confiuration: see section 6: >> >> https://www.gnu.org/software/grub/manual/grub/html_node/Configuration.html#Configuration > > When experimenting with this, I'll backup grub.cfg. If things go > awry, boot with the USB key I used for the install, and copy back the > old known working grub.cfg. I've done a first crack at this. I assume > that nothing in /etc/default/grub will have any effect. Questions... > > 1) Is "insmod extfs3" necessary? I've built extfs3 into the kernels. I've never used it it, and my boot partitions are always ext3/4 > 2) I assume that the the first "menuentry" will be the default boot? Unless you set the `default` variable to something other than 0 > 3) Is the default timeout still 5 seconds? Dunny, I always set 'timeout=10' > 3) I assume that 640x480 is supported on just about every monitor > out there. I want as large text as possible. My eyes are > getting old... just like me. Any obvious errors in the following > grub.cfg? > >===================================================================== > menuentry 'Linux Experimental' --class gnu-linux { > set gfxpayload=640x480 > insmod ext3fs > set root='hd0,gpt1' > linux /vmlinuz-experimental root=/dev/sda2 ro noexec=on net.ifnames=0 intel_pstate=disable ipv6.disable=1 > } I don't know if you really need the gfxpayload or the insmod lines, I don't recall ever needing those to boot kernels from ext3/4 partitions. All my grub.cfg files looks like this: ======================================================================== timeout=10 root=hd0,1 default=0 menuentry 'vmlinuz-5.10.27-gentoo' { linux /boot/vmlinuz-5.10.27-gentoo root=/dev/sda1 } menuentry 'vmlinuz-5.4.97-gentoo' { linux /boot/vmlinuz-5.4.97-gentoo root=/dev/sda1 } ======================================================================== > Something that occured to me. Can I move the duplicated lines to the > top of the file and take them out of the menuentries? E.g. Yes.