[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#367515: Bug#749991: debian-installer: Wrong kernel in debian-installer package



Hi,

Ben Hutchings <ben@decadent.org.uk> wrote:
> On Sun, 2019-10-27 at 20:18 +0100, Holger Wansing wrote:
> > Bugreport against kernel version mismatch, when using outdated or broken 
> > netboot images:
> > 
> > 
> > Since it's unlikely that we completely prevent this issue to happen, maybe we 
> > could at least change the error message, saying that the user should try 
> > another / a newer installation image?
> > (as already suggested in bug#367515)
> > 
> > It would be a good time for such template changing now...
> > Patch attached.
> 
> I feel that we ought to give a more definite answer, instead of "you
> can try" and "will probably fail".  I don't think that "choosing to
> install a different version of Debian" is likely to be a useful answer
> very often, and continuing without kernel modules is definitely going
> to fail.
> 
> If I understood correctly, this message can only appear when using a
> netboot image, and can be caused by either (a) old netboot image or (b)
> broken mirror.  If that's right, we should recommend (a) make sure your
> netboot image is current (b) if it is, then try another mirror,
> recommending deb.debian.org.

That looks reasonable.
I have prepared a proposal for this:


======== snip =======================================================

diff --git a/debian/anna.templates b/debian/anna.templates
index 66677ee..3709584 100644
--- a/debian/anna.templates
+++ b/debian/anna.templates
@@ -66,14 +66,14 @@ Template: anna/no_kernel_modules
 Type: boolean
 Default: false
 # :sl2:
-_Description: Continue the install without loading kernel modules?
+_Description: No kernel modules found
  No kernel modules were found. This probably is due to a mismatch between
  the kernel used by this version of the installer and the kernel version
  available in the archive.
  .
- If you're installing from a mirror, you can work around this problem by
- choosing to install a different version of Debian. The install will probably
- fail to work if you continue without kernel modules.
+ You should make sure that your installation image is current (check if you
+ are using an up-to-date netboot image), or - if that's the case - try a
+ different mirror, preferably deb.debian.org.
 
 Template: anna/retriever
 Type: string

======== snap =======================================================


> Also, this should be an error message, not a question.

For this, I would need some help, since I'm lacking the needed skills there.
The relevant part of anna.c seems to be:


======== snip =======================================================

/* Go through the available packages to see if it contains at least
 * one package that is valid for the subarchitecture and corresponds
 * to the kernel version we are running */
int packages_ok (di_packages *packages) {
	di_slist_node *node;
	di_package *package;
	bool kernel_packages_present = false;

	for (node = packages->list.head; node; node = node->next) {
		package = node->data;

		if (!di_system_package_check_subarchitecture(package, subarchitecture))
			continue;
	 	if (((di_system_package *)package)->kernel_version) {
			if (running_kernel &&
			    strcmp(running_kernel, ((di_system_package *)package)->kernel_version) == 0) {
				kernel_packages_present = true;
				break;
			}
		}
	}

	if (!kernel_packages_present) {
		di_log(DI_LOG_LEVEL_WARNING, "no packages matching running kernel %s in archive", running_kernel);
#ifdef __GNU__
		/* GNU Mach does not have modules */
#else
		debconf_input(debconf, "critical", "anna/no_kernel_modules");
		if (debconf_go(debconf) == 30)
			return 0;
		debconf_get(debconf, "anna/no_kernel_modules");
		if (strcmp(debconf->value, "false") == 0)
			return 0;
#endif
	}

	return 1;
}

======== snap =======================================================


I assume, just turning

===== snip ====
Template: anna/no_kernel_modules
Type: boolean
Default: false
# :sl2:
_Description: Continue the install without loading kernel modules?
===== snap ====

into

===== snip ====
Template: anna/no_kernel_modules
Type: error
# :sl2:
_Description: No kernel modules found
===== snap ====

is not enough here?



Holger



-- 
Holger Wansing <hwansing@mailbox.org>
PGP-Fingerprint: 496A C6E8 1442 4B34 8508  3529 59F1 87CA 156E B076


Reply to: