Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Wed Aug 15, 2018 4:56 am

All times are UTC+01:00

Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Jul 04, 2017 11:18 pm 
Regular Member

Joined: Mon Oct 15, 2007 5:21 am
Posts: 144
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.html
https://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_root
bootargs_root=root=/dev/sda2 rw panic=5 iomem=relaxed

DONT REBOOT until you are sure, things were correctly done.
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

PostPosted: Tue Jul 25, 2017 12:00 am 
Total Newbie

Joined: Sun Feb 13, 2011 6:44 pm
Posts: 2
My old Jessie installation only had a single mtd device (/dev/mtd0) and the /etc/fw_env.config entry was:

/dev/mtd0 0x3F000 0x1000 0x1000

when I upgraded to Stretch, I had 3 mtd devices and there was no /etc/fw_env.config file. I copied /usr/share/doc/u-boot-tools/examples/linkstation_pro_live.config to /etc/fw_env.config which has the following entry:

/dev/mtd2 0x3F000 0x1000 0x1000

This would allow fw_printenv to display the environment variables but any attempt to change them would get:

MTD erase error on /dev/mtd2: Invalid argument
Error: can't write fw_env to flash

I changed the entry in fw_env.config to:

/dev/mtd2 0x00000 0x1000 0x1000

and I was able to change bootargs_root successfully.


PostPosted: Mon Aug 06, 2018 11:48 pm 

Joined: Mon Nov 24, 2008 6:33 pm
Posts: 35
During the apt dist-upgrade from jessie to stretch on a Linkstation LS-GL, I get the following:

Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-3.2.0-4-orion5x
Using DTB: orion5x-linkstation-lsgl.dtb
Couldn't find DTB orion5x-linkstation-lsgl.dtb in /usr/lib/linux-image-3.2.0-4-orion5x or /etc/flash-kernel/dtbs
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

A couple hours of internet searching has not turned up anything helpful. Any suggestions? I did make sure the fw_printenv had the right info.

Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+01:00

Who is online

Users browsing this forum: Google [Bot] and 5 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited