public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrew Nowa Ammerlaan <andrewammerlaan@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH] kernel-install: Improve warning, consider alternate initrd generators
Date: Mon, 15 Jul 2024 15:42:15 +0200	[thread overview]
Message-ID: <caeff3c2-e035-4f2b-a208-8b9c7833cede@gentoo.org> (raw)

Part of https://github.com/gentoo/gentoo/pull/33634

 From f442d70bdbd0d410809ede4c23fe476177eee55d Mon Sep 17 00:00:00 2001
From: Zen <z@pyl.onl>
Date: Fri, 28 Jun 2024 13:04:35 -0500
Subject: [PATCH] kernel-install: Improve warning, consider alternate initrd
  generators

Signed-off-by: Zen <z@pyl.onl>
---
  eclass/kernel-install.eclass | 35 ++++++++++++++++++++++++-----------
  1 file changed, 24 insertions(+), 11 deletions(-)

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 77570a905ce11..9698b6be3562a 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -63,7 +63,10 @@ _IDEPEND_BASE="
  		>=sys-kernel/installkernel-14
  	)
  	initramfs? (
-		>=sys-kernel/installkernel-14[dracut(-)]
+		|| (
+			>=sys-kernel/installkernel-14[dracut(-)]
+			>=sys-kernel/installkernel-14[ugrd(-)]
+		)
  	)
  "

@@ -190,7 +193,7 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
  	"
  	IDEPEND="
  		generic-uki? (
-			>=sys-kernel/installkernel-14[-dracut(-),-ukify(-)]
+			>=sys-kernel/installkernel-14[-dracut(-),-ugrd(-),-ukify(-)]
  		)
  		!generic-uki? (
  			${_IDEPEND_BASE}
@@ -543,16 +546,26 @@ kernel-install_pkg_pretend() {

  	if ! use initramfs && ! has_version "${CATEGORY}/${PN}[-initramfs]"; then
  		ewarn
-		ewarn "WARNING: The standard configuration of the Gentoo distribution"
-		ewarn "kernels requires an initramfs! You have disabled the initramfs"
-		ewarn "USE flag and as a result dracut was not pulled in as a 
dependency."
-		ewarn "Please ensure that you are either overriding the standard"
-		ewarn "configuration or that an alternative initramfs generation plugin"
-		ewarn "is installed for your installkernel implementation!"
-		ewarn
-		ewarn "This is an advanced use case, you are on your own to ensure"
-		ewarn "that your system is bootable!"
+		ewarn "WARNING: The default distribution kernel configuration is 
designed"
+		ewarn "to be used with an initramfs! Although possible, there is no 
guarantee"
+		ewarn "that distribution kernels will boot without an initramfs."
  		ewarn
+		ewarn "You have disabled the initramfs USE flag, and as a result the 
package manager"
+        ewarn "will not enforce the configuration of an initramfs 
generator in"
+        ewarn "sys-kernel/installkernel."
+        ewarn
+		ewarn "If you wish to use a custom initramfs generator, then please 
ensure that"
+        ewarn "/sbin/installkernel is capable of calling it via a 
kernel installation hook,"
+        ewarn "and is also configured to use it via 
/etc/kernel/install.conf."
+        ewarn
+        ewarn "If you wish to boot without an initramfs, then please 
ensure that"
+        ewarn "all kernel drivers required to boot your system are 
built into the"
+        ewarn "kernel by modifying the default distribution kernel 
configuration"
+        ewarn "using /etc/kernel/config.d"
+        ewarn
+		ewarn "Please refer to the installkernel and distribution kernel 
documentation:"
+		ewarn "    https://wiki.gentoo.org/wiki/Installkernel"
+        ewarn " 
https://wiki.gentoo.org/wiki/Project:Distribution_Kernel"
  	fi
  }



                 reply	other threads:[~2024-07-15 13:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=caeff3c2-e035-4f2b-a208-8b9c7833cede@gentoo.org \
    --to=andrewammerlaan@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox