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

Bug#1030853: armv5tel + uboot: update-initramfs triggers flash-kernel to always write latest kernel version



Package: initramfs-tools
Version: 0.140
Severity: normal
X-Debbugs-Cc: peter.nagel@kit.edu

Dear Maintainer,

when using uboot ... update-initramfs triggers flash-kernel to _always_ write latest kernel version into flash-memory. Even if this might be helpful in many cases ... there are situations where this behavior is unexpected.

Assume that a user want to do a quick test with the latest kernel version from backports. Using apt to install the new kernel version will trigger flash-kernel which writes the latest kernel version into flash memory which is most likely the expected behavior. After reboot the system will boot the new kernel and the user can perform some tests.

How to get back to the original (stable) kernel?
1) Using 'apt remove linux-image-6.0.0-0.deb11.6-marvell' will will through a warning and actually does not work (at least not on my system).

2) Using 'update-initramfs -u -k 5.10.0-21-marvell' triggers flash-kernel but refuses to write kernel 5.10.0-21-marvell to flash memory - instead the latest kernel version 6.0.0-0.deb11.6-marvell is used (see output below). Interestingly, the output suggest to use the --force option ... however, this option is not available for update-initramfs.

3) Using 'flash-kernel --force 5.10.0-21-marvell' is working fine - it just writes the stable kernel back into flash memory (which will be started after reboot). However, whenever update-initramfs is (automatically) triggered it will rewrite the unstable kernel version into flash memory which is not really expected.

4) A workaround (after using method 3) would be to remove kernel 6.0 via apt which works fine - however, this will again trigger flash-kernel to rewrite kernel 5.10 into flash memory which would not have been necessary (since it was already written into flash memory).

Additional information:
Writing into flash memory can take quite some time (e.g. 15 minutes in my case). Unexpected flashing or flashing the 'wrong' kernel should therefore be avoided.


Possible solutions for this problem:
  * update-initramfs is asking if flash-kernel should be triggered or not
  * update-initramfs allows to select the kernel version which is written to flash memory   * update-initramfs provides (while running) a menu to select the kernel version (including default) which is written to flash memory.
  * other solutions ...


Output of 'update-initramfs -u -k 5.10.0-21-marvell':
update-initramfs: Generating /boot/initrd.img-5.10.0-21-marvell
kirkwood-qnap: machine: QNAP TS419 family
Using DTB: kirkwood-ts419-6282.dtb
Installing /usr/lib/linux-image-5.10.0-21-marvell/kirkwood-ts419-6282.dtb into /boot/dtbs/5.10.0-21-marvell/./kirkwood-ts419-6282.dtb
Taking backup of kirkwood-ts419-6282.dtb.
Installing new kirkwood-ts419-6282.dtb.
Ignoring old or unknown version 5.10.0-21-marvell (latest is 6.0.0-0.deb11.6-marvell)
Use --force if you want version 5.10.0-21-marvell.
Installing /usr/lib/linux-image-6.0.0-0.deb11.6-marvell/kirkwood-ts419-6282.dtb into /boot/dtbs/6.0.0-0.deb11.6-marvell/./kirkwood-ts419-6282.dtb
Taking backup of kirkwood-ts419-6282.dtb.
Installing new kirkwood-ts419-6282.dtb.
flash-kernel: installing version 6.0.0-0.deb11.6-marvell
flash-kernel: appending /usr/lib/linux-image-6.0.0-0.deb11.6-marvell/kirkwood-ts419-6282.dtb to kernel
Generating kernel u-boot image... done.
Flashing kernel (using 2609102/3145728 bytes)... done.
Flashing initramfs (using 6465055/12582912 bytes)... done.



-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 6.2M Jan 17 18:30 /boot/initrd.img-5.10.0-20-marvell
-rw-r--r-- 1 root root 6.2M Feb 8 10:52 /boot/initrd.img-5.10.0-21-marvell
-- /proc/cmdline
console=ttyS0,115200 root=/dev/ram initrd=0xb00000,0xc00000 ramdisk=34816 mem=768M cmdlinepart.mtdparts=spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot_Config),256k@0xc0000(NAS_Config) mtdparts=spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot_Config),256k@0xc0000(NAS_Config)

-- resume
RESUME=UUID=ab2b48ae-e256-4a0b-9de8-f811fb014c44
-- /proc/filesystems
ext3
ext2
ext4
fuseblk

-- lsmod
Module Size Used by
nf_log_ipv6 16384 1
nf_log_ipv4 16384 1
nf_log_common 16384 2 nf_log_ipv6,nf_log_ipv4
nft_limit 16384 2
nft_counter 16384 29
xt_LOG 20480 2
xt_limit 16384 0
xt_tcpudp 20480 1
xt_state 16384 0
xt_conntrack 16384 8
nf_conntrack 114688 2 xt_state,xt_conntrack
nf_defrag_ipv6 24576 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
nft_compat 20480 16
nf_tables 163840 106 nft_limit,nft_compat,nft_counter
nfnetlink 16384 2 nft_compat,nf_tables
ofpart 20480 0
cmdlinepart 16384 0
spi_nor 61440 0
mtd 61440 9 spi_nor,ofpart,cmdlinepart
marvell 24576 2
ehci_orion 20480 0
mvmdio 16384 0
mv643xx_eth 36864 0
ehci_hcd 61440 1 ehci_orion
marvell_cesa 36864 0
libdes 28672 1 marvell_cesa
libaes 16384 1 marvell_cesa
orion_wdt 16384 0
watchdog 20480 1 orion_wdt
usbcore 176128 2 ehci_orion,ehci_hcd
spi_orion 20480 0
usb_common 16384 2 ehci_hcd,usbcore
kirkwood_thermal 16384 0
nls_base 16384 1 usbcore
sg 28672 0
evdev 20480 2
gpio_keys 20480 0
fuse 98304 1
configfs 40960 1
ip_tables 24576 5
x_tables 28672 7 xt_state,xt_LOG,ip_tables,nft_compat,xt_tcpudp,xt_limit,xt_conntrack
hmac 16384 3
ipv6 430080 20
autofs4 40960 2
ext4 606208 2
crc16 16384 1 ext4
mbcache 16384 1 ext4
jbd2 102400 1 ext4
raid10 53248 0
raid0 24576 0
multipath 20480 0
linear 20480 0
raid456 139264 1
libcrc32c 16384 3 nf_conntrack,raid456,nf_tables
crc32c_generic 16384 4
async_raid6_recov 24576 1 raid456
async_memcpy 20480 2 raid456,async_raid6_recov
async_pq 20480 2 raid456,async_raid6_recov
async_xor 20480 3 async_pq,raid456,async_raid6_recov
xor 16384 1 async_xor
async_tx 20480 5 async_xor,async_pq,raid456,async_memcpy,async_raid6_recov
raid6_pq 98304 3 async_pq,raid456,async_raid6_recov
raid1 45056 2
md_mod 131072 8 raid1,raid10,multipath,linear,raid0,raid456
sd_mod 45056 16
t10_pi 16384 1 sd_mod
crc_t10dif 20480 1 t10_pi
crct10dif_generic 16384 1
crct10dif_common 16384 2 crct10dif_generic,crc_t10dif
sata_mv 28672 12
libata 188416 1 sata_mv
rtc_s35390a 20480 0
scsi_mod 180224 3 sd_mod,libata,sg

-- /etc/initramfs-tools/modules

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = yes

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=auto
KEYMAP=n
COMPRESS=gzip
DEVICE=
NFSROOT=auto
RUNSIZE=10%
FSTYPE=auto

-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no

-- /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid10]
md127 : active (auto-read-only) raid1 sdc1[4] sdd1[5]
19514368 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[4]
19513344 blocks super 1.2 [4/2] [UU__]

md1 : active raid5 sdc3[3] sdd3[4] sdb3[6] sda3[5](S)
7773733888 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
bitmap: 0/29 pages [0KB], 65536KB chunk

unused devices: <none>

-- /sys/block
md0
md1
md127
sda
sdb
sdc
sdd

-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:

/usr/share/initramfs-tools/hooks:
dmsetup
flash_kernel_set_root
fsck
keymap
klibc-utils
kmod
mdadm
qcontrol
resume
thermal
udev
zz-busybox


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

Kernel: Linux 5.10.0-21-marvell
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages initramfs-tools depends on:
ii initramfs-tools-core 0.140
ii linux-base 4.6

initramfs-tools recommends no packages.

Versions of packages initramfs-tools suggests:
ii bash-completion 1:2.11-2

-- no debconf information

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: