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

Bug#805223: base-installer unable to determine kernel



Package: base-installer
Version: 1.154
Tags: patch

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

--8<---------------cut here---------------start------------->8---
. /usr/lib/base-installer/kernel.sh
. /usr/lib/base-installer/library.sh;
kernel_update_list
cat /tmp/available_kernels.txt
--8<---------------cut here---------------end--------------->8---

returns expected results:

--8<---------------cut here---------------start------------->8---
linux-image-kirkwood
linux-image-3.16.0-4-kirkwood
--8<---------------cut here---------------end--------------->8---

and the installer presents a nice list of available containing the two
above and a "none" option.

-- 
Było mi bardzo miło.                                  --- Rurku. --- ...
>Łukasz<                                --- To dobrze, że mnie słuchasz.

... Droga wśród jabłoni prowadzi w nieznane...
From 6885bbfe670ab48bdbc65a127331a7f380b71a59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <steelman@post.pl>
Date: Sun, 15 Nov 2015 21:54:08 +0100
Subject: [PATCH] Rename $FLAVOUR to $KERNEL_FLAVOUR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Łukasz Stelmach <steelman@post.pl>
---
 library.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/library.sh b/library.sh
index d73d880..cfb0f6f 100644
--- a/library.sh
+++ b/library.sh
@@ -349,12 +349,12 @@ kernel_update_list () {
 	cut -d" " -f1 | grep -v "linux-image-2.6" | uniq > "$KERNEL_LIST.unfiltered"
 	kernels=`sort -r "$KERNEL_LIST.unfiltered" | tr '\n' ' ' | sed -e 's/ $//'`
 	for candidate in $kernels; do
-		if [ -n "$FLAVOUR" ]; then
-			if arch_check_usable_kernel "$candidate" "$FLAVOUR"; then
+		if [ -n "$KERNEL_FLAVOUR" ]; then
+			if arch_check_usable_kernel "$candidate" "$KERNEL_FLAVOUR"; then
 				echo "$candidate"
-				info "kernel $candidate usable on $FLAVOUR"
+				info "kernel $candidate usable on $KERNEL_FLAVOUR"
 			else
-				info "kernel $candidate not usable on $FLAVOUR"
+				info "kernel $candidate not usable on $KERNEL_FLAVOUR"
 			fi
 		else
 			info "could not determine kernel flavour"
@@ -404,8 +404,8 @@ pick_kernel () {
 		# Unset seen flag in case we had an incorrect preseeded value.
 		db_fset base-installer/kernel/image seen false || true
 
-		if [ -n "$FLAVOUR" ]; then
-			arch_kernel="$(arch_get_kernel "$FLAVOUR")"
+		if [ -n "$KERNEL_FLAVOUR" ]; then
+			arch_kernel="$(arch_get_kernel "$KERNEL_FLAVOUR")"
 
 			# Hack to support selection of meta packages with a postfix
 			# added to the normal name (for updated kernels in stable).
-- 
2.4.6

Attachment: signature.asc
Description: PGP signature


Reply to: