after upgrade from debian jessie to stretch the linkstation pro/live and kurobox pro
dies after a period of between minutes and a day when micro-evtd watchdog timer fails.
To fix, first use the same approach as needed for a safe upgrade:
You can temporarily prevent this by disabling the watchdog (this disables button presses on the box)
Users of the watchdog daemon provided by the micro-evtd package should stop the daemon and disable the watchdog timer before the upgrade, to avoid a spurious reboot in the middle of the upgrade process:
# service micro-evtd stop
# /usr/sbin/microapl -a system_set_watchdog off
The problem involves kernels linux 4.8 and later.
(see https://lists.debian.org/debian-arm/2017/04/msg00062.htmlhttps://lists.debian.org/debian-arm/201 ... 00062.html
According to changelog of kernel, the new restriction introduced by kernel
4.8 can be turned off by kernel option: iomem=relaxed
So if your u-boot-tools is properly configured (fw_printenv command can
show u-boot env list), you can setup kernel option by:
fw_setenv bootargs_root "root=/dev/sda2 rw panic=5 iomem=relaxed"
(after above command you should run fw_printenv again to confirm it's
properly written to the device)
Here "properly configured" means that
/etc/fw_env.config contains the right location of the flash mtd partition with the u-boot env
variables. The default file provided by debian gives this as /dev/mtd0 which was wrong
for my boxes. use the uboot envtools utility /usr/sbin/mtdinfo -a to check which mtd partition has the u-boot env
(/dev/mtd0 seems to hold the original ones that came with the linkstation, not the current ones)
On my boxes this showed uboot_env was /dev/mtd2 on linkstation live/pro and /dev/mtd5 on kurobox pro
root@linkstation:/home/duncan# cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# MTD device name Device offset Env. size Flash sector size
/dev/mtd2 0x3F000 0x1000 0x1000
when properly configured, fw_printenv shows (before the fix)
root@linkstation:/home/duncan# fw_printenv bootargs_root
bootargs_root=root=/dev/sda2 rw panic=5
IMPORTANT: use fw_printenv to check you correctly updated BOOTARGS_ROOT
to add the new "ïomem=relaxed" entry that fixes the micro-evtd problem
After the fix:
root@linkstation:/home/duncan# fw_printenv bootargs_rootDONT REBOOT until you are sure, things were correctly done.
bootargs_root=root=/dev/sda2 rw panic=5 iomem=relaxed
if you messed up the BOOTARGS_ROOT entry you may lock yourself
out of the linkstation if you dont have serial access
After a reboot use fw_printenv bootargs_root again to check the fix is still there.
(there doesnt seem to be any needed "fw_saveenv" command; I did the change in uboot with a
serial connection where a "saveenv" is needed, because I had not seen that my /etc/fw_env.config
was incorrect and thus preventing fw_setenv from working)
---------------------------a separate Debian 9 stretch issue:
debian stretch requires up to 16MB free in /run before apt-get restarts daemons that are updated
increase the default size limit on tmpfs /run from 10% to 15% with an /etc/fstab entry (see "man tmpfs")
tmpfs /run tmpfs size=15% 0 0