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

Re: Bug#526640: Please try to keep the number of flashes minimal



* Michael Goetze <mgoetze@mgoetze.net> [2009-05-02 14:17]:
> I just did an upgrade (via aptitude) on my QNAP TS-209, and noticed
> that  the kernel and initrd were flashed 3 times. Since flashing is
> somewhat  dangerous (in that a mishap/power outage may leave the
> system unbootable) and causes wear on the hardware, I would
> appreciate it if superfluous writes could be eliminated.

This is a long-standing problem (introduced a few months ago).  The
problem is that flash-kernel will add a postinst hook for the kernel,
but nowadays update-initramfs will call flash-kernel directly.

I asked Joey Hess whether the postinst hook for flash-kernel can
safely be removed (maybe there are corner cases where it's still
needed) but didn't get a reply.  Joey?

http://lists.debian.org/debian-arm/2008/08/msg00091.html

> [...]
> Preparing to replace flash-kernel 2.11 (using  
> .../flash-kernel_2.13_armel.deb) ...
> Unpacking replacement flash-kernel ...
> [...]
> Preparing to replace linux-image-2.6-orion5x 2.6.26+17 (using  
> .../linux-image-2.6-orion5x_2.6.26+17+lenny1_armel.deb) ...
> Unpacking replacement linux-image-2.6-orion5x ...
> [...]
> Setting up linux-image-2.6.26-1-orion5x (2.6.26-13lenny2) ...
>
>  Hmm. The package shipped with a symbolic link  
> /lib/modules/2.6.26-1-orion5x/source
>  However, I can not read the target: No such file or directory
>  Therefore, I am deleting /lib/modules/2.6.26-1-orion5x/source
>
> Running depmod.
> Finding valid ramdisk creators.
> Using mkinitramfs-kpkg to build the ramdisk.
> Not updating initrd symbolic links since we are being updated/reinstalled
> (2.6.26-12 was configured last, according to dpkg)
> Not updating image symbolic links since we are being updated/reinstalled
> (2.6.26-12 was configured last, according to dpkg)
> Running postinst hook script flash-kernel.
> Generating kernel u-boot image... done.
> Flashing kernel... done.
> Flashing initramfs... done.
> Setting up linux-image-2.6.26-2-orion5x (2.6.26-15) ...
>
>  Hmm. The package shipped with a symbolic link  
> /lib/modules/2.6.26-2-orion5x/source
>  However, I can not read the target: No such file or directory
>  Therefore, I am deleting /lib/modules/2.6.26-2-orion5x/source
>
> Running depmod.
> Finding valid ramdisk creators.
> Using mkinitramfs-kpkg to build the ramdisk.
> Running postinst hook script flash-kernel.
> Generating kernel u-boot image... done.
> Flashing kernel... done.
> Flashing initramfs... done.
> [...]
> Setting up flash-kernel (2.13) ...
> [...]
> Setting up linux-image-2.6-orion5x (2.6.26+17+lenny1) ...
> [...]
> Processing triggers for initramfs-tools ...
> update-initramfs: Generating /boot/initrd.img-2.6.26-2-orion5x
> Generating kernel u-boot image... done.
> Flashing kernel... done.
> Flashing initramfs... done.

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


Reply to: