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

Bug#864260: Missing kernel in debian-installer sd-card images for armhf (stretch)



control: tags 864260 +patch

On Tue, Jun 06, 2017 at 10:47:55PM +0200, Karsten Merker wrote:
> On Tue, Jun 06, 2017 at 02:24:41AM +0200, Cyril Brulebois wrote:
> > Diego Roversi <diegor@tiscali.it> (2017-06-05):
> > > Package: debian-installer
> > > Version: 20170525
> > > 
> > > The sd-card images of debian-installer for arm-hf don't have a kernel
> > > image inside, and they can't boot from sd.
> > > 
> > > To reproduce the problem:
> > > 
> > > #wget http://ftp.uk.debian.org/debian/dists/stretch/main/installer-armhf/current/images/netboot/SD-card-images/firmware.A10-OLinuXino-Lime.img.gz
> > > 
> > > #wget http://ftp.uk.debian.org/debian/dists/stretch/main/installer-armhf/current/images/netboot/SD-card-images/partition.img.gz
> > > 
> > > #zcat firmware.A10-OLinuXino-Lime.img.gz partition.img.gz > image_a10.img
> > > 
> > > # ls -lrt
> > > total 63628
> > > -rw-r--r-- 1 root root 23891122 May 25 12:21 partition.img.gz
> > > -rw-r--r-- 1 root root   224112 May 25 12:21 firmware.A10-OLinuXino-Lime.img.gz
> > > -rw-r--r-- 1 root root 40960000 Jun  4 21:57 image_a10.img
> > > 
> > > # losetup /dev/loop0 image_a10.img 
> > > # fdisk -lu /dev/loop0
> > > Disk /dev/loop0: 39.1 MiB, 40960000 bytes, 80000 sectors
> > > Units: sectors of 1 * 512 = 512 bytes
> > > Sector size (logical/physical): 512 bytes / 512 bytes
> > > I/O size (minimum/optimal): 512 bytes / 512 bytes
> > > Disklabel type: dos
> > > Disk identifier: 0x0eded707
> > > 
> > > Device       Boot Start   End Sectors  Size Id Type
> > > /dev/loop0p1 *     2048 79999   77952 38.1M  c W95 FAT32 (LBA)
> > > 
> > > # partprobe /dev/loop0
> > > # mount /dev/loop0p1 /mnt/card
> > > # ls -l /mnt/card/
> > > total 20732
> > > -rwxr-xr-x 1 root root     1575 May 25 10:50 boot.scr
> > > drwxr-xr-x 2 root root    41984 May 25 10:50 dtbs
> > > -rwxr-xr-x 1 root root 21185369 May 25 10:50 initrd.gz
> > > 
> > > The boot from this sd image give this error:
> > > 
> > > Scanning mmc 0:1...                                               
> > > Found U-Boot script /boot.scr                                     
> > > reading /boot.scr                                                 
> > > 1575 bytes read in 25 ms (61.5 KiB/s)                             
> > > ## Executing script at 43100000                                   
> > > Mainline u-boot / new-style environment detected.                 
> > > reading vmlinuz                                                   
> > > 3701008 bytes read in 391 ms (9 MiB/s)                            
> > > reading dtbs/sun4i-a10-olinuxino-lime.dtb                         
> > > 27941 bytes read in 621 ms (43 KiB/s)                             
> > > reading initrd.gz                                                 
> > > ** Unable to read file initrd.gz **                               
> > > SCRIPT FAILED: continuing...            
> > 
> > I'm not familiar with those images, but they should contain u-boot
> > configuration and needed bits. From the log above, it looks like a
> > vmlinuz was found, but initrd.gz couldn't be read. Cc'ing debian-arm@
> > since I don't know much more about this.
> 
> I'm currently trying to narrow the problem down. A release build
> from git gives me:
> 
> - netboot:
>   * netboot tarball has both kernel and initrd
>   * netboot SD card image has kernel, but no initrd
> 
> - hd-media
>   * hd-media tarball has both kernel and initrd
>   * hd-media SD card image has both kernel and initrd
> 
> So the problem must be somehow specific to the netboot SD image
> build process.  I'm trying to diagnose the problem further, but I
> will need to get off rather soon now, so if somebody else wants
> to take a look, feel free.

Hello,

I guess I have found the problem: the images have a fixed size
(~40MB uncompressed) and the netboot build has grown a few kBytes
larger than that while the hd-media build still fits (although
tightly). Increasing the image size should solve the problem.

Attached is a corresponding patch. A test build is running but
will need some time.  I'll check the results when it's ready
and commit the change to the d-i git if everything looks good.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.
>From 7cf56a809891b25b73607f4a4a1f36474dfb2743 Mon Sep 17 00:00:00 2001
From: Karsten Merker <merker@debian.org>
Date: Tue, 6 Jun 2017 23:08:57 +0200
Subject: [PATCH] Increase the partition size for the armhf SD card images
 (Closes: #864260).

The installer binary size has grown over time and now exceeds the
predefined SD card partition size for the netboot build on armhf.
The hd-media image just tightly fits for now but will probably
outgrow the available space in the near future as well.

Increase the partition size from ~40MB to ~50MB for both netboot
and hd-media.  As the images get compressed, the actual download
size increase for additional unused space is rather small.
---
 build/config/armhf/hd-media.cfg | 2 +-
 build/config/armhf/netboot.cfg  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build/config/armhf/hd-media.cfg b/build/config/armhf/hd-media.cfg
index 053bd8488..aa1a9205a 100644
--- a/build/config/armhf/hd-media.cfg
+++ b/build/config/armhf/hd-media.cfg
@@ -1,5 +1,5 @@
 FLAVOUR_SUPPORTED = ""
-FLOPPY_SIZE = 40000
+FLOPPY_SIZE = 50000
 
 GZIPPED = .gz
 EXTRANAME = hd-media/
diff --git a/build/config/armhf/netboot.cfg b/build/config/armhf/netboot.cfg
index 381010ce1..2ca092874 100644
--- a/build/config/armhf/netboot.cfg
+++ b/build/config/armhf/netboot.cfg
@@ -10,7 +10,7 @@ EXTRANAME = $(MEDIUM)/
 MANIFEST-INITRD = "netboot initrd"
 MANIFEST-KERNEL = "kernel image to netboot"
 
-FLOPPY_SIZE = 40000
+FLOPPY_SIZE = 50000
 
 GZIPPED = .gz
 
-- 
2.11.0


Reply to: