Bug#890262: flash-kernel: QNAP TS109, Not enough space for initrd in MTD

2019-09-10 Thread Alper Nebi Yasak

On Tue, 13 Feb 2018 01:03:43 + Ben Hutchings wrote:

Now that I think about it, initramfs-tools does allow other packages to
override the configuration for mkinitramfs through shell scripts in
/usr/share/initramfs-tools/conf-hooks.d.  This seems like a good reason
to do that.


I've recently implemented doing this:
https://salsa.debian.org/installer-team/flash-kernel/merge_requests/16/

(But I didn't add the relevant machine db entries for this device).



Bug#890262: flash-kernel: QNAP TS109, Not enough space for initrd in MTD

2018-02-12 Thread Ben Hutchings
Control: tag -1 - moreinfo

On Mon, 2018-02-12 at 22:24 +0100, Gunnar Thorburn wrote:
> Hi,
> 
> Creating this file with COMPRESS=xz worked fine
> /etc/initramfs-tools/conf.d/compress
> 
> Obviously, with xz there is plenty of space left. There was a little
> warning though (see below).
> 
> Generating kernel u-boot image... done.
> Flashing kernel (using 2050440/2097152 bytes)... done.
> Flashing initramfs (using 2870792/4194304 bytes)... done.
> W: APT had planned for dpkg to do more than it reported back (0 vs 7).
>Affected packages: flash-kernel:armel initramfs-tools:armel
> 
> 
> Yes, this system has been upgraded several time. I think your web page
> even said that that is the correct/only way to do it.
> 
> I guess installing Stretch does COMPRESS=xz on its own.
> 
> Thank you so much. My problem is now solved. But perhaps xz could be
> part of the upgrade process.

It seems to me that there are two bugs:

1. flash-kernel gave a useless hint to use MODULES=dep, when that was
already the current configuration.

2. It didn't give the useful hint to use COMPRESS=xz, or make that
configuration change itself.

Now that I think about it, initramfs-tools does allow other packages to
override the configuration for mkinitramfs through shell scripts in
/usr/share/initramfs-tools/conf-hooks.d.  This seems like a good reason
to do that.

Ben.

-- 
Ben Hutchings
friends: People who know you well, but like you anyway.



signature.asc
Description: This is a digitally signed message part


Bug#890262: flash-kernel: QNAP TS109, Not enough space for initrd in MTD

2018-02-12 Thread Gunnar Thorburn
Hi,

Creating this file with COMPRESS=xz worked fine
/etc/initramfs-tools/conf.d/compress

Obviously, with xz there is plenty of space left. There was a little
warning though (see below).

Generating kernel u-boot image... done.
Flashing kernel (using 2050440/2097152 bytes)... done.
Flashing initramfs (using 2870792/4194304 bytes)... done.
W: APT had planned for dpkg to do more than it reported back (0 vs 7).
   Affected packages: flash-kernel:armel initramfs-tools:armel


Yes, this system has been upgraded several time. I think your web page
even said that that is the correct/only way to do it.

I guess installing Stretch does COMPRESS=xz on its own.

Thank you so much. My problem is now solved. But perhaps xz could be
part of the upgrade process.

On 12 February 2018 at 22:05, Gunnar Thorburn  wrote:
> Hi Martin,
>
> I sincerely apologize for setting the wrong severity to the wrong
> package in the original report.
> (I thought the system could be in a state where it would not reboot at all)
>
> I am sorry to inform you that changing to MODULES=dep in
> initramfs.conf did not help.
> (driver-policy already had MODULES=dep).
>
> And no, I am not using LVM or RAID (just a standard ext2-partitions
> for /, /boot, /home/ and one for swap on a single SATA drive).
>
> The good thing is that the system reboots properly and seems to work
> fine with the old 3.16 kernel.
>
> There is no
> /etc/initramfs-tools/conf.d/compress
>
> I will try it out and get back.
>
> Thank you very much!
>
>
>
>
>
> On 12 February 2018 at 21:57, Martin Michlmayr  wrote:
>> Unfortunately my memory is quite bad.  I *thought* the current
>> installer configured XZ compression by default but it seems that's not
>> the case.  So the documentation on my web site is correct.
>>
>> * The installer sets MODULES=dep
>> * It has done so for a long time
>> * But you've upgraded from a really old release where this wasn't the case 
>> (I believe)
>>
>> * The installer doesn't configure XZ compression
>> * You don't need it for a normal installation
>> * If you want LVM or RAID, you have to use XZ, as per the hint at 
>> http://www.cyrius.com/debian/orion/qnap/ts-109/known-issues/
>>
>> At least I *believe* that's the case.  I didn't investigate in detail.
>>
>> --
>> Martin Michlmayr
>> http://www.cyrius.com/



Bug#890262: flash-kernel: QNAP TS109, Not enough space for initrd in MTD

2018-02-12 Thread Gunnar Thorburn
Hi Martin,

I sincerely apologize for setting the wrong severity to the wrong
package in the original report.
(I thought the system could be in a state where it would not reboot at all)

I am sorry to inform you that changing to MODULES=dep in
initramfs.conf did not help.
(driver-policy already had MODULES=dep).

And no, I am not using LVM or RAID (just a standard ext2-partitions
for /, /boot, /home/ and one for swap on a single SATA drive).

The good thing is that the system reboots properly and seems to work
fine with the old 3.16 kernel.

There is no
/etc/initramfs-tools/conf.d/compress

I will try it out and get back.

Thank you very much!





On 12 February 2018 at 21:57, Martin Michlmayr  wrote:
> Unfortunately my memory is quite bad.  I *thought* the current
> installer configured XZ compression by default but it seems that's not
> the case.  So the documentation on my web site is correct.
>
> * The installer sets MODULES=dep
> * It has done so for a long time
> * But you've upgraded from a really old release where this wasn't the case (I 
> believe)
>
> * The installer doesn't configure XZ compression
> * You don't need it for a normal installation
> * If you want LVM or RAID, you have to use XZ, as per the hint at 
> http://www.cyrius.com/debian/orion/qnap/ts-109/known-issues/
>
> At least I *believe* that's the case.  I didn't investigate in detail.
>
> --
> Martin Michlmayr
> http://www.cyrius.com/



Bug#890262: flash-kernel: QNAP TS109, Not enough space for initrd in MTD

2018-02-12 Thread Martin Michlmayr
Unfortunately my memory is quite bad.  I *thought* the current
installer configured XZ compression by default but it seems that's not
the case.  So the documentation on my web site is correct.

* The installer sets MODULES=dep
* It has done so for a long time
* But you've upgraded from a really old release where this wasn't the case (I 
believe)

* The installer doesn't configure XZ compression
* You don't need it for a normal installation
* If you want LVM or RAID, you have to use XZ, as per the hint at 
http://www.cyrius.com/debian/orion/qnap/ts-109/known-issues/

At least I *believe* that's the case.  I didn't investigate in detail.

-- 
Martin Michlmayr
http://www.cyrius.com/



Bug#890262: flash-kernel: QNAP TS109, Not enough space for initrd in MTD

2018-02-12 Thread Martin Michlmayr
The other thing you can do is to enable XZ compression:
http://www.cyrius.com/debian/orion/qnap/ts-109/troubleshooting/#bootable

I thought this was documented in the release notes but I can't find
it.

-- 
Martin Michlmayr
http://www.cyrius.com/



Bug#890262: flash-kernel: QNAP TS109, Not enough space for initrd in MTD

2018-02-12 Thread Martin Michlmayr
* Gunnar Thorburn  [2018-02-12 17:52]:
> The initial ramdisk is too large. This is often due to the unnecessary 
> inclusion
> of all kernel modules in the image. To fix this set MODULES=dep in one or both
> /etc/initramfs-tools/conf.d/driver-policy (if it exists) and

> Not enough space for initrd in MTD 'RootFS1' (need 4210887 but is
> actually 4194304).

Please check the various initramfs-tools configuration files to see if
you're using MODULES=dep.  Changing to MODULES=dep would be the fix.
However, given the size of your ramdisk, I fear you are already using
MODULES=dep.

Are you using RAID or LVM?  Unfortunately, since the MTD partition for
the ramdisk is very tiny on the TS-x09, you cannot use RAID or LVM.
(And this was possible in the past, which will lead to problems with
upgrades.)

> But given that TS-109 appears supported
>   http://www.cyrius.com/debian/orion/qnap/ts-109/install/
> and with no major issues
>   http://www.cyrius.com/debian/orion/qnap/ts-109/known-issues/
> I would not expect this problem well into the upgrade.

I have to document the LVM/RAID issue.  In fact, the installation page
currently says "You can use LVM and RAID and a number of filesystems",
which is definitely no longer true to due to the size issue (even with
MODULES=dep).

-- 
Martin Michlmayr
http://www.cyrius.com/



Bug#890262: flash-kernel: QNAP TS109, Not enough space for initrd in MTD

2018-02-12 Thread Ben Hutchings
Control: severity -1 important
Control: tag -1 moreinfo

On Mon, 2018-02-12 at 17:52 +0100, Gunnar Thorburn wrote:
[...]
> I have not tried editing
>   /etc/initramfs-tools/initramfs.conf
> 
> I suppose i could try to change MODULES=most to MODULES=dep.
[...]

This is definitely not a critical bug in flash-kernel.  It even told
you how to fix the problem.  (It is not allowed for a package to
directly modify configuration files belonging to another package.)

Ben.

-- 
Ben Hutchings
If at first you don't succeed, you're doing about average.



signature.asc
Description: This is a digitally signed message part


Bug#890262: flash-kernel: QNAP TS109, Not enough space for initrd in MTD

2018-02-12 Thread Gunnar Thorburn
Package: flash-kernel
Version: 3.79
Severity: critical
Justification: breaks the whole system

Dear Maintainer,

I have been running Debian on a QNAP TS109 for many years.
I successfully upgraded from Squeeze to Wheezy in 2013 and to Jessie in 2015.

As I now upgrade to Stretch (basically following Debian Upgrade Guide, it
is a very simple system) I now get:

== from apt-get dist-upgrade ==
update-initramfs: Generating /boot/initrd.img-4.9.0-5-marvell
flash-kernel: installing version 4.9.0-5-marvell

The initial ramdisk is too large. This is often due to the unnecessary inclusion
of all kernel modules in the image. To fix this set MODULES=dep in one or both
/etc/initramfs-tools/conf.d/driver-policy (if it exists) and
/etc/initramfs-tools/initramfs.conf and then run 'update-initramfs -u
-k 4.9.0-5-marvell'

Not enough space for initrd in MTD 'RootFS1' (need 4210887 but is
actually 4194304).
run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
== end of output

That was (obviously) after
 - editing /etc/apt/sources.list (changing jessie to stretch)
 - apt-get update
 - apt-get upgrade

I am completely aware how old and obsolete this QNAP TS109 is.
It would make complete sense to me if it was not supported anymore.
And I would completely understand if you dont want to fix this problem.

But given that TS-109 appears supported
  http://www.cyrius.com/debian/orion/qnap/ts-109/install/
and with no major issues
  http://www.cyrius.com/debian/orion/qnap/ts-109/known-issues/
I would not expect this problem well into the upgrade.

To other users, it would be helpful to advice them not to upgrade to Stretch.

I guess my system would reboot if I try (but I have not tried)
I guess Debain 9.3 can run with Linux 3.16.0-5-orion5x from Debian 8, but
to me (I have used Debian for 20 years) the system seems to be in a rather
bad state. (if it fails to boot a serial cable for direct UBOOT is necessary)

I have not tried editing
  /etc/initramfs-tools/initramfs.conf

I suppose i could try to change MODULES=most to MODULES=dep.

However, if I break the system completely it will be much harder for me
to give you any more useful information.


  Best Regards
  Gunnar Thorburn


-- System Information:
Debian Release: 9.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: armel (armv5tel)

Kernel: Linux 3.16.0-5-orion5x
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages flash-kernel depends on:
ii  debconf [debconf-2.0]  1.5.61
ii  devio  1.2-1.2+b1
ih  initramfs-tools0.130
ii  linux-base 4.5
ii  mtd-utils  1:2.0.0-1
ii  ucf3.0036

Versions of packages flash-kernel recommends:
ii  u-boot-tools  2016.11+dfsg1-4

flash-kernel suggests no packages.

-- debconf information:
  flash-kernel/linux_cmdline: quiet