Buffalo LS421 Front

Install Debian on Buffalo LS421DE?

Update Oct-6-2017,

prebuilt rootfs is now available, download from here https://www.znbs.space/devices/ls421de/

INSTALL(README)?

What’s this:

This is a tar’d rootfs for buffalo ls421de.

The distribution is debian stretch armhf, with linux kernel 4.13.

ssh is enabled by default, login with user=root password=root

Ethernet ip address is set to 192.168.12.199

How to use

1)preparation, get an empty hard disk

– create GPT label on the disk

– create two partitions

* first partition: /boot (ext3)

* second partition: / (ext4)

2) expand the rootfs onto these partations

3) remove all usb drive and hard disks from LS421DS and plug the disk we just prepared to bay1

4) Power on and enjoy!


Original Post

Partition Layout, use GPT


linkstation lzto # parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA SanDisk SSD P4 1 (scsi)
Disk /dev/sda: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17.4kB 1024MB 1024MB ext3 primary
2 1024MB 16.0GB 15.0GB ext4

(parted) q
linkstation lzto #

The mount point of partition 1 is /boot, partition 2 is /.

Extract armhf debian rootfs to /, then place an empty initrd.buffalo into /boot.

Put u-boot.buffalo and uImage.buffalo shipped together with original fw into /boot. Also, kernel modules are also extracted from original fw to /lib/modules.

You may find ipv6 is not supported by the stock kernel, we’d like to compile it from source code.

The source code of kernel can be obtained from http://opensource.buffalo.jp/ls400-110.html .


linkstation lzto # uname -a
Linux linkstation 3.3.4 #6 Thu Nov 20 01:52:24 EST 2014 armv7l GNU/Linux
linkstation lzto # dmesg |head
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.3.4 (lzto@Phoenix) (gcc version 4.9.1 20140529 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.06 - Linaro GCC 4.9-2014.06) ) #6 Thu Nov 20 01:52:24 EST 2014
[ 0.000000] CPU: Marvell PJ4Bv7 Processor [561f5811] revision 1 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] Machine: Marvell Armada-370
[ 0.000000] Using UBoot passing parameters structure
[ 0.000000] >>>>>>>Tag MAC e6:f3:b4:43:50:00
[ 0.000000] >>>>>>>Tag MAC b9:16:cd:3f:6f:10
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
linkstation lzto #

You may want to tune kernel by write this line to /etc/sysctrl.conf


vm/min_free_kbytes = 65536

The speed of LS421DE’s network seems to be very fast, but when add iptables to the kernel, it becomes slow(10~20 percent slower). So, it means that the computation power of Armada-370 is not that good. This is also true for Allwinner A20(sunxi-7). And this is why ddwrt route is slower than hw nat(ddwrt uses iptables, which is sw nat).

 

Published by

ztong

Kill 1 stone with 2 birds.

32 thoughts on “Install Debian on Buffalo LS421DE?”

  1. I have followed the steps above, but there seams to be a problem with the network driver:

    After booting, the network is unly up for 10-20 seconds.

    dmesg shows some problems:

    [ 13.218785] systemd-journald[1116]: Received request to flush runtime journal from PID 1
    [ 21.201450] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 40.884675] random: crng init done
    [ 73.204542] mvneta d0074000.ethernet eth0: Link is Down
    [ 75.281454] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 75.552973] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 75.962952] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 76.342896] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 76.462898] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 76.563110] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=255
    [ 76.833300] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=75
    [ 76.972905] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=447
    [ 77.094211] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=447
    [ 77.243021] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 77.353065] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 77.363049] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=163
    [ 77.682887] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=499
    [ 77.692919] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=499
    [ 78.812871] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 79.312840] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 79.323504] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 79.372962] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 79.873219] mvneta d0074000.ethernet eth0: bad rx status 0f810000 (crc error), size=71
    [ 79.877730] mvneta d0074000.ethernet eth0: bad rx status 0f810000 (crc error), size=71
    [ 79.892999] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=331
    [ 80.142898] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=495
    [ 80.192965] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=75
    [ 80.752881] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 81.612940] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=98
    [ 81.782878] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=495
    [ 81.823368] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=75
    [ 81.862814] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 81.972858] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 82.502881] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=435
    [ 82.612882] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=120
    [ 84.645756] mvneta d0074000.ethernet eth0: Link is Down
    [ 85.682795] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 86.762860] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=495
    [ 87.142775] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=143
    [ 88.806220] mvneta d0074000.ethernet eth0: Link is Down
    [ 91.923406] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 92.112754] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 92.312769] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=499
    [ 93.623055] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=97
    [ 93.792788] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=111
    [ 94.612792] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 95.025091] mvneta d0074000.ethernet eth0: bad rx status 0d810000 (crc error), size=71
    [ 95.172619] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=499
    [ 95.342999] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=120
    [ 95.702716] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 96.102719] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 96.282815] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=491
    [ 96.552958] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=503
    [ 96.572731] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=255
    [ 96.765234] mvneta d0074000.ethernet eth0: bad rx status 0fc10000 (crc error), size=79
    [ 96.882723] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 96.982689] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=331
    [ 96.992703] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=71
    [ 97.092711] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 97.152801] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=75
    [ 97.502855] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=487
    [ 97.703471] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=499
    [ 97.842543] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 98.152873] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=495
    [ 98.192717] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=499
    [ 98.542750] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=435
    [ 98.642742] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=383
    [ 98.852929] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=119
    [ 99.332789] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=488
    [ 99.502708] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=299
    [ 99.722715] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=447
    [ 100.228244] mvneta d0074000.ethernet eth0: bad rx status 0fa10000 (crc error), size=267
    [ 100.592688] mvneta d0074000.ethernet eth0: bad rx status 0cc10000 (crc error), size=499
    [ 102.327097] mvneta d0074000.ethernet eth0: Link is Down
    [ 184.484632] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 188.647723] mvneta d0074000.ethernet eth0: Link is Down
    [ 191.764635] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Half – flow control off
    [ 195.927724] mvneta d0074000.ethernet eth0: Link is Down
    [ 257.284637] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 264.567724] mvneta d0074000.ethernet eth0: Link is Down
    [ 265.604634] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 319.687722] mvneta d0074000.ethernet eth0: Link is Down
    [ 320.724634] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 332.167722] mvneta d0074000.ethernet eth0: Link is Down
    [ 356.084635] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 380.007724] mvneta d0074000.ethernet eth0: Link is Down
    [ 381.044636] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 394.567724] mvneta d0074000.ethernet eth0: Link is Down
    [ 395.604634] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Half – flow control off
    [ 407.047765] mvneta d0074000.ethernet eth0: Link is Down
    [ 409.124670] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
    [ 414.327724] mvneta d0074000.ethernet eth0: Link is Down
    [ 415.364634] mvneta d0074000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx

    Acording to this post:

    http://lists.infradead.org/pipermail/linux-arm-kernel/2014-March/238475.html

    the kernals has to be build with “CONFIG_MARVELL_PHY=y”
    Is your kernel build with this option?

      1. If tried several switches at all speed settings (1000/100/10)(Half+Full Duplex).
        If I connect directly to my computer, the same problem arises, after boot network is working for some seconds and then the link disappears.

    1. it’s hard to tell what’s going on at this point, it can not be reproduced from my side.
      could you try
      mv /boot/bootcmd /boot/bootcmd.bk
      and reboot to see if it works.
      This will force it to use the bootstrap kernel(uImage.buffalo). if that works then it is possible that the culprit is the kernel.

  2. Marvell Armada 370 1.2 GHz – 512 MB Ram
    4 Bay
    From Shihsung’s google site it uses md125 not md127 (LS421DE)
    and u-boot-ls440.flash
    I have tried that method but it failed ( stock firmware 1.83 I think may have been the problem )

    1. It might need to change kernel dts file, I guess. And the u-boot boot sequence is highly likely to be the same. You can try to compile kernel source code released by Buffalo to see if that works or not. If that works we can draft a new dts file for LS441DE using their version.

  3. Thank you for reply

    I think the source code released by Buffalo is the same ( and out of date ).
    I do not have a lot of Linux experience other than installing and using a desktop.
    I have tried the rootrfs from the link
    I created 2 partitions 1024mb ex3 called boot and set properties to boot ( gparted and ubuntu ) and a ex4 15gb ( mounted made writeable to my ubuntu username and extracted the files to it )
    booted with red error light on bottom , no ping no ssh ( through router )

    1. It entered `rescue mode’ offered by the initrd you downloaded. You can ssh into it to see what goes wrong, but I currently don’t remember the default ip address and password. However you can extract the initrd to see what they are.

  4. From google searches it appears to load from Internal then from hard drive if the hard drive fails it defaults back to internal “rescue mode” with DHCP enabled and default admin/password. I am not 100% sure I set the drive up correctly. I did SSH to the rescue mode but there was not much there.

    Thank you again for help

  5. I tried putting it on the 2nd and both and also an empty initrd.buffalo ,u-boot.buffalo and uImage.buffalo into /boot.
    No joy just “rescue mode” ( from internal memory ( SPI flash?) )

    Thank you again for help

  6. Hi,

    I’ve tried to follow your instructions but getting a little confused and wonder if I can ask you for more assistance.

    In “expanding the rootfs into these partitions” should I be placing the boot folder into the partition /boot?

    Many Thanks

  7. I have some questions about what you post.
    I booted up with rootfs.
    And when you remove the installed hard,
    Back to original firmware?
    Or is it firmware installed with debian?
    to be curious

    1. If I understand you correctly you are asking whether this will overwrite the existing firmware.
      This does not overwrite existing firmware on the NAND and NOR flash however part of the firmware is installed on hard drive if you want to revert to original firmware you have to reinstall it using linkstation tool.

      1. Thank you for letting me know.
        I’ve installed the rootfs you put up.
        Only an error code occurs.
        Number seven red lights up.
        Try another hdd and it is the same.
        What am I doing wrong?

Leave a Reply

Your email address will not be published. Required fields are marked *