#805223 base-installer unable to determine kernel

#805223#5
Date:
2015-11-15 21:17:12 UTC
From:
To:
Dear Maintainer,

I am trying to install Debian jessie on an arm device (Zyxel NSA325).
The device isn't yet officially supported by d-i and I had to make some
changes to d-i to run it on the device. I am willing to share my work as
soon as possible.

During the installation I get a message that the installer was unable to
find appropriate kernel package for the device.

    No installable kernel was found in the defined APT sources. [...]

I have traced the the message and it comes from pick_kernel() in
/usr/lib//base-installer/library.sh. In /var/log/syslog I find a message

    Jan  1 00:52:06 base-installer: info: could not determine kernel flavour

repeated several times and followed by

    Jan  1 00:52:06 base-installer: info: Found kernels ''

A very brief investigation suggests that that the problems comes from
the references to unassigned $FLAVOUR variable. I may only suspect that
the code containing $FLAVOUR has been moved from some file without
moving actual assignment (like the one in
debian/bootstrap-base.postinst)

The attached patch renames occurrences of $FLAVOUR in library.sh to
$KERNEL_FLAVOUR. A quick in vitro test in a d-i shell

... Droga wśród jabłoni prowadzi w nieznane...

#805223#10
Date:
2015-11-15 21:46:39 UTC
From:
To:
* Łukasz Stelmach <steelman@post.pl> [2015-11-15 22:17]:

I think the correct solution is to add your device to
libdebian-installer - see src/system/subarch-armel-linux.c.

#805223#15
Date:
2015-11-15 21:54:20 UTC
From:
To:
Control: tag -1 - patch
Control: tag -1 moreinfo

Unassigned, or empty?
[...]

These functions are only ever called by debian/bootstrap-base.postinst.
I think the problem is that arch_get_kernel_flavour is failing.

This definitely doesn't seem like a proper fix.

Ben.

#805223#24
Date:
2015-11-15 22:25:36 UTC
From:
To:
Control: tag -1 - patch
Control: tag -1 moreinfo

Unassigned, or empty?
[...]

These functions are only ever called by debian/bootstrap-base.postinst.
I think the problem is that arch_get_kernel_flavour is failing.

This definitely doesn't seem like a proper fix.

Ben.

#805223#29
Date:
2015-11-16 09:16:35 UTC
From:
To:
Dnia 15 listopad 2015 o 22:54 Ben Hutchings <ben@decadent.org.uk> napisał(a):

It's hard to tell precisely. FLAVOUR is not assigned any value in
library.sh explicitly AND "$FLAVOUR" apparently evaluates to "" at
line 352[1].

I have never said they are. I only gave the postinst script as an example
of a place where FLAVOUR is assigned. Do you know of any other place?

Then what is in your opinion KERNEL_FLAVOUR for? It can't but ask why
there are two variables with apparently the same value (or at least
values from the same set).

I will try the fix suggested by Martin Michlmayr and see if it works.

[1] https://sources.debian.net/src/base-installer/1.154/library.sh/#L352

#805223#34
Date:
2015-11-16 10:36:32 UTC
From:
To:
[...]

I don't; that's my point.  There is one caller and it sets FLAVOUR.
[...]

I think it's obsolete, but it used to be used in the i386 kernel
selection to decide whether to install a kernel that supports PAE.

Ben.

#805223#39
Date:
2015-12-10 17:50:00 UTC
From:
To:
* Łukasz Stelmach <steelman@post.pl> [2015-11-16 10:16]:

Did it work?

#805223#44
Date:
2015-12-10 21:49:29 UTC
From:
To:
Dnia 10 grudnia 2015 18:50:00 CET, Martin Michlmayr <tbm@cyrius.com> napisał(a):

Due to personal reasons I haven't had time to verify it yet.