Bug#813995: marked as done (flashcp writes to nand without being aware of bad blocks)
Your message dated Sun, 13 Mar 2016 19:47:11 +0000
with message-id <E1afByp-0002EL-7F@franck.debian.org>
and subject line Bug#813995: fixed in flash-kernel 3.35+deb8u3
has caused the Debian Bug report #813995,
regarding flashcp writes to nand without being aware of bad blocks
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact firstname.lastname@example.org
Debian Bug Tracking System
Contact email@example.com with problems
--- Begin Message ---
- To: Debian Bug Tracking System <firstname.lastname@example.org>
- Subject: flash-kernel: writes to nand without being aware of bad blocks
- From: Uwe Kleine-König <email@example.com>
- Date: Sun, 07 Feb 2016 12:09:52 +0100
- Message-id: <firstname.lastname@example.org>
Justification: causes serious data loss
Control: block 806926 with -1
when flash-kernel writes a kernel/initrd to NAND flash it uses plain
write(2) to /dev/mtdX (flash-kernel < 3.52) or flashcp
(flash-kernel >= 3.52). If the device being written to has bad blocks
these are tried to be erased and written by both approaches.
This results in a non-booting system at best. In general writing to bad
blocks can also affect other (otherwise good) blocks and so result in
loss of unrelated data. I never saw this in practise, but the
manufacturers of NAND flash say so.
I didn't check which machines are affected, but Netgear ReadyNAS 102/104
(which isn't in flash-kernel's database yet, but see below for the
obvious entry to add support for them and #806926) is affected and flash
kernel managed to break a ReadyNAS 102 already (non-permanently by good
fortune as far as I can tell up to now).
I guess there are several other machines affected though.
The right fix is to use nandwrite to write to NAND flash and only use
flashcp for NOR.
test -f /sys/class/mtd/mtdX/oobsize
could be used to detect if the device is NAND or NOR. But there might be
more reliable ways I'm not aware of.
I will debug/test a bit more with the broken rn102 (and its owner :-) to
maybe come up with a patch, but if someone beats me that's very welcome,
-- System Information:
Debian Release: 8.2
APT prefers stable
APT policy: (990, 'stable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: armhf (armv7l)
Kernel: Linux 3.16.0-4-armmp (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=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.56
ii devio 1.2-1
ii initramfs-tools 0.120
ii linux-base 3.5
ii ucf 3.0030
Versions of packages flash-kernel recommends:
ii u-boot-tools 2014.10+dfsg1-5
flash-kernel suggests no packages.
-- Configuration Files:
Machine: NETGEAR ReadyNAS 104
-- debconf information:
--- End Message ---
--- Begin Message ---
We believe that the bug you reported is fixed in the latest version of
flash-kernel, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to email@example.com,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
Uwe Kleine-König <firstname.lastname@example.org> (supplier of updated flash-kernel package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing email@example.com)
-----BEGIN PGP SIGNED MESSAGE-----
Date: Thu, 10 Mar 2016 20:30:19 +0100
Binary: flash-kernel flash-kernel-installer
Maintainer: Debian Install System Team <firstname.lastname@example.org>
Changed-By: Uwe Kleine-König <email@example.com>
flash-kernel - utility to make certain embedded devices bootable
flash-kernel-installer - Make the system bootable (udeb)
Closes: 794265 813995
flash-kernel (3.35+deb8u3) stable; urgency=medium
[ Karsten Merker ]
* Disable the use of modprobe and udevadm in the mtdblock() function
while running the testsuite.
[ Ian Campbell ]
* Use /dev/mtdN when flashing, rather than needlessly going through the
mtdblock layer (which is problematic on some platforms/kernels).
[ Uwe Kleine-König ]
* use nandwrite when writing to nand flash. (Closes: #813995)
9513e75b4356dd139b83bd2803e9a38e9333db13 1521 flash-kernel_3.35+deb8u3.dsc
8e3fd25cac663e1970160592288d6369a59d2d17 57300 flash-kernel_3.35+deb8u3.tar.xz
7709407aca324aac211d9253a7a07e8ac100e6348e6068fc32cfd5068a18b016 1521 flash-kernel_3.35+deb8u3.dsc
f3dc8e240a6b98c15013f64e0d7ef17b5fb4a1a729f085890debabeeaa1197d4 57300 flash-kernel_3.35+deb8u3.tar.xz
22ec45ca580314816eae50f0d0ca70b3 1521 utils optional flash-kernel_3.35+deb8u3.dsc
4bef47671a27faa3a65a46edfd40a537 57300 utils optional flash-kernel_3.35+deb8u3.tar.xz
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
--- End Message ---