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 342A81382C5 for ; Mon, 14 Jun 2021 08:39:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 14AC0E0EBE; Mon, 14 Jun 2021 08:39:02 +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 8C35FE0D7C for ; Mon, 14 Jun 2021 08:39:00 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lsi7W-0008rH-Us for gentoo-user@lists.gentoo.org; Mon, 14 Jun 2021 10:38:58 +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 08:38:50 -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: 5e312be3-89ad-4a54-b3c0-9f42fb543297 X-Archives-Hash: 4813925ff59cd336a20b7de93fbb79fd On 2021-06-14, Walter Dnes wrote: > On Mon, Jun 14, 2021 at 01:00:38AM -0000, Grant Edwards wrote >> 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 >> } >> ======================================================================== > > Thanks. It's nice to have a working example. Are you booting via > BIOS? I'm on a UEFI-only machine, and the generated grub.cfg has... The example above is BIOS boot with a GPT labelled root disk. Now that you've reminded me, I do have one UEFI system, and it does contain a few extra global lines. It's also GPT labelled, and still contains the original Lenovo Win10 installation -- I shrunk the Win10 partition and added two new partitions (Linux root, Linux swap). Below is the grub.cfg for that machine: IIRC, it worked fine without any of the gfx/font/video stuff, but like you I wanted a nice big font. Note that on this machine I just tell grub to search for the filesystem with the label "root" instead of specifying it manually -- though it is still specified manually for the kernel argument. I don't remember why I did that... ======================================================================== timeout=5 loadfont "DejavuSansMono24" set gfxmode=auto set gfxpayload=keep insmod all_video insmod gfxterm terminal_output gfxterm search --set=root --label rootfs sleep 2 menuentry vmlinuz-5.10.27-gentoo { linux /boot/vmlinuz-5.10.27-gentoo root=/dev/nvme0n1p5 } menuentry 'vmlinuz-5.4.97-gentoo' { linux /boot/vmlinuz-5.4.97-gentoo root=/dev/nvme0n1p5 } menuentry 'vmlinuz-4.19.175-gentoo' { linux /boot/vmlinuz-4.19.175-gentoo root=/dev/nvme0n1p5 } ========================================================================