Debian Wheezy on LinkStation LS421DE


Disclaimer:
THE FOLLOWING PROCEDURE WILL CAUSE ALL OF YOUR DATA TO BE LOST. YOU HAVE BEEN WARNED!

Installing Debian on LinkStation LS421DE to replace the Buffalo stock firmware aimed to create a full customized operating system without unnecessary software as in stock firmware.

The configuration for the following scenario described as below:

  • Using LinkStation LS421DE with armhf (arm hard float) architecture.
  • Not using raid, but adding raid partition for data partition is fully supported.
  • Currently, no vanilla kernel available. So, we are using Buffalo kernel at the moment. Vanilla kernel can be cross compiled.

The main process of Debian installation summarized as follow:

  • Creating rootfs by debootstrapping Debian on running LS421DE system.
  • Using a Linux box (Ubuntu) to prepare suitable image for LinkStation.
  • Modifying partition and installing Debian.
  • Enable lsmonitor script and customize Debian system.

Creating rootfs on running LS421DE system

You must have already a root access to the LinkStation box, if not, follow the the procedure on https://tohenk.wordpress.com/2014/11/11/opening-stock-firmware-of-linkstation-ls421de/.

Install debootstrap:

$ cd ~
$ wget http://ftp.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.64~bpo70+1_all.deb
$ dpkg -i --force-all debootstrap_1.0.64~bpo70+1_all.deb

Prepare the tools by issuing commands:

$ mkdir ~/lsmod
$ cd ~/lsmod
$ wget https://github.com/tohenk/linkstation-mod/archive/master.zip
$ unzip master.zip
$ cd linkstation-mod-master

Edit scripts/debootstrap-rootfs.cfg and adjust as you need, choose closest mirror from your location. Extra packages can be specified using PACKAGES variable.

$ cat scripts/debootstrap-rootfs.cfg
ARCH=armhf
VERSION=wheezy
MIRROR=http://kartolo.sby.datautama.net.id/debian
PACKAGES=
$ vi scripts/debootstrap-rootfs.cfg

Run debootstrap:

$ ./scripts/debootstrap-rootfs.sh --clean

You can ommit –clean option if you don’t want to debootstrap-ing again. After debootstrap process, the rootfs archive can be found on rootfs folder:
rootfs_wheezy_armhf_yymmdd.tar.gz => hddrootfs
initrd_wheezy_armhf_yymmdd.tar.gz => initrd

Preparing Debian image for LinkStation

On Linux (Ubuntu) box, prepare the tools:

$ mkdir ~/lsmod
$ cd ~/lsmod
$ wget https://github.com/tohenk/linkstation-mod/archive/master.zip
$ unzip master.zip
$ cd linkstation-mod-master

Transfer rootfs from LinkStation (replace lsbox with your real LinkStation hostname or IP address):

$ mkdir rootfs
$ scp root@lsbox:/root/lsmod/linkstation-mod-master/rootfs/* rootfs/

Prepare LinkStation stock firmware and place it in firmware folder:

$ mkdir firmware
$ cp path-to-buffalo-firmware/ls400-133en.zip firmware/
$ unzip firmware/ls400-133en.zip

Customize scripts/debootstrap-combine.cfg (adjust HOSTNAME, NETWORK_PROTO, etc), then create hddrootfs and initrd:

$ cat scripts/debootstrap-combine.cfg
HOSTNAME=LS421DE88B
NETWORK_INTERFACE=eth1
NETWORK_PROTO=static
NETWORK_IP=172.16.1.4
NETWORK_NETMASK=255.255.255.0
NETWORK_GATEWAY=172.16.1.1
NETWORK_DNS=172.16.1.1
NETWORK_DOMAIN=ntlab.net
#INITRD_TEMP_ROOT="0x811"
#INITRD_ROOT="0x901"
INITRD_ROOT="0x802"
$ vi scripts/debootstrap-combine.cfg
$ sudo ./scripts/debootstrap-combine.sh rootfs/rootfs_wheezy_armhf_141112.tar.gz rootfs/initrd_wheezy_armhf_141112.tar.gz firmware/ls400-133en

Unpack Buffalo kernel image:

$ sudo ./scripts/unpack-image.sh firmware/ls400-133en/uImage.img out/

Debian image for LinkStation now ready in the folder out with files hddrootfs.buffalo.updated, initrd.buffalo, and uImage.buffalo.

Modifying partition and installing Debian

Now, detach the hard disk from LinkStation and attach it to Linux box. Ensure the disk is detected and acquire the correct device node:

$ ls /dev/sd*

I’m assumed the disk detected as /dev/sda. Next install mdadm if it’s not already installed:

$ sudo apt-get install --no-install-recommends mdadm

Assemble raid partition:

$ sudo mdadm --assemble --scan

Stop all raid partition:

$ sudo mdadm --stop /dev/md0
$ sudo mdadm --stop /dev/md1
$ sudo mdadm --stop /dev/md2
$ sudo mdadm --stop /dev/md101

Remove all raid partition:

$ sudo mdadm --remove /dev/md0
$ sudo mdadm --remove /dev/md1
$ sudo mdadm --remove /dev/md2
$ sudo mdadm --remove /dev/md101

Zero super block:

$ sudo mdadm --zero-superblock /dev/sda1
$ sudo mdadm --zero-superblock /dev/sda2
$ sudo mdadm --zero-superblock /dev/sda5
$ sudo mdadm --zero-superblock /dev/sda6

Create filesystems:

$ sudo mkfs.ext3 /dev/sda1
$ sudo mkfs.ext4 /dev/sda2
$ sudo mkswap /dev/sda5
$ sudo mkfs.ext4 /dev/sda6

Install Debian:

$ mkdir /tmp/sda1
$ sudo mount /dev/sda1 /tmp/sda1
$ sudo cp out/initrd.buffalo /tmp/sda1
$ sudo cp out/uImage.buffalo /tmp/sda1
$ mkdir /tmp/sda2
$ sudo mount /dev/sda2 /tmp/sda2
$ sudo ./scripts/unpack-rootfs.sh out/hddrootfs.updated.buffalo /tmp/sda2

Attach back the disk to LinkStation, try pinging to test if installation was successfull. You then can SSH-ing as usual.

Enable lsmonitor script and customize Debian system

Now, the final step to customize Debian system by enabling lsmonitor init script:

$ cd ~
$ wget https://github.com/tohenk/linkstation-mod/raw/master/lsmonitor/lsmonitor.tar.gz
$ cd / && tar -xvf ~/lsmonitor.tar.gz

Install dependencies:

$ apt-get install smartmontools hdparm

Enable init script:

$ update-rc.d lsmonitor defaults

Start lsmonitor service:

$ service lsmonitor start

Now, Debian system is complete. Next you can customize your Debian as you need.

Advertisements

, , ,

  1. #1 by KeyPhact on November 15, 2014 - 10:49 pm

    I’m going to try this out today.
    However is there a way of restoring the stock firmware once I’ve install debian?

    Thanks

    • #2 by Toha on November 17, 2014 - 10:09 am

      Just take out the disk and delete all partitions, re-attach the disk to LinkStation, then it will go on Emergency Mode. Use LSUpdater to restore stock firmware.

  2. #3 by Kevin on March 26, 2015 - 9:42 pm

    How would one go about recreating the Raid array after this? If I use mdadm to create an array is there a “grub” config of some kind that will allow me to pull the main drive, boot off the second, and then recreate the array? Thanks fot the writeups! Very helpful!

    • #4 by Toha on March 27, 2015 - 7:22 am

      This LinkStation uses U-Boot, currently I don’t have a serial console access so I don’t know the boot console log.
      As far as I know:
      * U-Boot expect kernel to be placed on /dev/sda1 along with init script.
      * The init script then decide which root device will be used.
      The example shown above assume not using raid so the root device is 0x802 aka /dev/sda2. If you use raid, try use /dev/md1 (0x901).

  3. #5 by Kevin on March 27, 2015 - 10:14 am

    Yet another question. I can easily just create Raid1 for the data partition, that works flawlessly. Does the above process of debootstrapping, etc. make *both disks bootable so, in the case of a disk failure, I can stop the LS421, pull the bad disk, and restart the LS421 degraded (assuming the bad disk is disk 1 in this case)? Or do I need to do the “Install Debian” step on each of the disks in the LS421? Thanks again.

  4. #7 by Gustavo Brandao on April 21, 2015 - 8:59 am

    Hi friend… when running $ ./scripts/debootstrap-rootfs.sh –clean got some notices as follow:
    “Cannot check Release signature; keyring file not available /usr/share/keyrings/debian-archive-keyring.gpg”
    “Found additional required dependencies: insserv libbz2-1.0 libdb5.1 libsemanage-common libsemanage1 libslang2 libustr-1.0-1 ”
    “Found additional base dependencies: libept1.4.12 libgcrypt11 libgnutls26 libgpg-error0 libidn11 libnfnetlink0 libp11-kit0 libsqlite3-0 libtasn1-3 libxapian22”

    But script kept running. Is it normal? Can I proceed modding?

    Thanks

    • #8 by Toha on April 22, 2015 - 6:34 pm

      Can you include the full console output of the script?

  5. #9 by Jackson on January 29, 2016 - 10:30 pm

    I followed your instructions but run into problems as below:

    [root@LS421DE392 scripts]# ./debootstrap-rootfs.sh –clean
    > Debootstrapping jessie on Sat Jan 30 00:02:42 JST 2016…
    W: Cannot check Release signature; keyring file not available /usr/share/keyrings/debian-archive-keyr ing.gpg
    I: Retrieving Release
    I: Retrieving Packages
    I: Validating Packages
    I: Resolving dependencies of required packages…
    I: Resolving dependencies of base packages…
    I: Found additional required dependencies: acl adduser dmsetup insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libcap2-bin libctsetup4 libdb5.3 libdebconfclient0 libdevmapper1.02.1 libgcrypt20 libgpg-error0 libkmod2 libncursesw5 libprocps3 libsemanage-common semanage1 libslang2 libsystemd0 libudev1 libustr-1.0-1 procps systemd systemd-sysv udev
    I: Found additional base dependencies: libdns-export100 libffi6 libgmp10 libgnutls-deb0-28 libgnutls-openssl27 libhogweed2 libicu52 idn11 libirs-export91 libisc-export95 libisccfg-export90 libmnl0 libnetfilter-acct1 libnettle4 libnfnetlink0 libp11-kit0 libpsl0 libn1-6
    I: Checking component main on http://ftp.jp.debian.org/debian
    I: Retrieving acl 2.2.52-2
    I: Validating acl 2.2.52-2
    I: Retrieving libacl1 2.2.52-2
    I: Validating libacl1 2.2.52-2
    I: Retrieving adduser 3.113+nmu3
    I: Validating adduser 3.113+nmu3
    I: Retrieving apt 1.0.9.8.2
    I: Validating apt 1.0.9.8.2
    I: Retrieving apt-utils 1.0.9.8.2
    I: Validating apt-utils 1.0.9.8.2
    I: Retrieving libapt-inst1.5 1.0.9.8.2
    I: Validating libapt-inst1.5 1.0.9.8.2
    I: Retrieving libapt-pkg4.12 1.0.9.8.2
    I: Validating libapt-pkg4.12 1.0.9.8.2
    I: Retrieving libattr1 1:2.4.47-2
    I: Validating libattr1 1:2.4.47-2
    I: Retrieving libaudit-common 1:2.4-1
    I: Validating libaudit-common 1:2.4-1
    I: Retrieving libaudit1 1:2.4-1+b1
    I: Validating libaudit1 1:2.4-1+b1
    I: Retrieving base-files 8+deb8u3
    I: Validating base-files 8+deb8u3
    I: Retrieving base-passwd 3.5.37
    I: Validating base-passwd 3.5.37
    I: Retrieving bash 4.3-11+b1
    I: Validating bash 4.3-11+b1
    I: Retrieving libdns-export100 1:9.9.5.dfsg-9+deb8u4
    I: Validating libdns-export100 1:9.9.5.dfsg-9+deb8u4
    I: Retrieving libirs-export91 1:9.9.5.dfsg-9+deb8u4
    I: Validating libirs-export91 1:9.9.5.dfsg-9+deb8u4
    I: Retrieving libisc-export95 1:9.9.5.dfsg-9+deb8u4
    I: Validating libisc-export95 1:9.9.5.dfsg-9+deb8u4
    I: Retrieving libisccfg-export90 1:9.9.5.dfsg-9+deb8u4
    I: Validating libisccfg-export90 1:9.9.5.dfsg-9+deb8u4
    I: Retrieving libboost-iostreams1.55.0 1.55.0+dfsg-3
    I: Validating libboost-iostreams1.55.0 1.55.0+dfsg-3
    I: Retrieving bsdmainutils 9.0.6
    I: Validating bsdmainutils 9.0.6
    I: Retrieving libbz2-1.0 1.0.6-7+b3
    I: Validating libbz2-1.0 1.0.6-7+b3
    I: Retrieving libdebconfclient0 0.192
    I: Validating libdebconfclient0 0.192
    I: Retrieving coreutils 8.23-4
    I: Validating coreutils 8.23-4
    I: Retrieving cpio 2.11+dfsg-4.1
    I: Validating cpio 2.11+dfsg-4.1
    I: Retrieving cron 3.0pl1-127+deb8u1
    I: Validating cron 3.0pl1-127+deb8u1
    I: Retrieving libcryptsetup4 2:1.6.6-5
    I: Validating libcryptsetup4 2:1.6.6-5
    I: Retrieving dash 0.5.7-4+b1
    I: Validating dash 0.5.7-4+b1
    I: Retrieving libdb5.3 5.3.28-9
    I: Validating libdb5.3 5.3.28-9
    I: Retrieving debconf 1.5.56
    I: Validating debconf 1.5.56
    I: Retrieving debconf-i18n 1.5.56
    I: Validating debconf-i18n 1.5.56
    I: Retrieving debian-archive-keyring 2014.3
    I: Validating debian-archive-keyring 2014.3
    I: Retrieving debianutils 4.4+b1
    I: Validating debianutils 4.4+b1
    I: Retrieving diffutils 1:3.3-1+b1
    I: Validating diffutils 1:3.3-1+b1
    I: Retrieving dmidecode 2.12-3
    I: Validating dmidecode 2.12-3
    I: Retrieving dpkg 1.17.26
    I: Validating dpkg 1.17.26
    I: Retrieving e2fslibs 1.42.12-1.1
    I: Validating e2fslibs 1.42.12-1.1
    I: Retrieving e2fsprogs 1.42.12-1.1
    I: Validating e2fsprogs 1.42.12-1.1
    I: Retrieving libcomerr2 1.42.12-1.1
    I: Validating libcomerr2 1.42.12-1.1
    I: Retrieving libss2 1.42.12-1.1
    I: Validating libss2 1.42.12-1.1
    I: Retrieving findutils 4.4.2-9+b1
    I: Validating findutils 4.4.2-9+b1
    I: Retrieving gcc-4.8-base 4.8.4-1
    I: Validating gcc-4.8-base 4.8.4-1
    I: Retrieving gcc-4.9-base 4.9.2-10
    I: Validating gcc-4.9-base 4.9.2-10
    I: Retrieving libgcc1 1:4.9.2-10
    I: Validating libgcc1 1:4.9.2-10
    I: Retrieving libstdc++6 4.9.2-10
    I: Validating libstdc++6 4.9.2-10
    I: Retrieving libgdbm3 1.8.3-13.1
    I: Validating libgdbm3 1.8.3-13.1
    I: Retrieving libc-bin 2.19-18+deb8u2
    I: Validating libc-bin 2.19-18+deb8u2
    I: Retrieving libc6 2.19-18+deb8u2
    I: Validating libc6 2.19-18+deb8u2
    I: Retrieving multiarch-support 2.19-18+deb8u2
    I: Validating multiarch-support 2.19-18+deb8u2
    I: Retrieving libgmp10 2:6.0.0+dfsg-6
    I: Validating libgmp10 2:6.0.0+dfsg-6
    I: Retrieving gnupg 1.4.18-7
    I: Validating gnupg 1.4.18-7
    I: Retrieving gpgv 1.4.18-7
    I: Validating gpgv 1.4.18-7
    I: Retrieving libgnutls-deb0-28 3.3.8-6+deb8u3
    I: Validating libgnutls-deb0-28 3.3.8-6+deb8u3
    I: Retrieving libgnutls-openssl27 3.3.8-6+deb8u3
    I: Validating libgnutls-openssl27 3.3.8-6+deb8u3
    I: Retrieving grep 2.20-4.1
    I: Validating grep 2.20-4.1
    I: Retrieving groff-base 1.22.2-8
    I: Validating groff-base 1.22.2-8
    I: Retrieving gzip 1.6-4
    I: Validating gzip 1.6-4
    I: Retrieving hostname 3.15
    I: Validating hostname 3.15
    I: Retrieving libicu52 52.1-8+deb8u3
    I: Validating libicu52 52.1-8+deb8u3
    I: Retrieving ifupdown 0.7.53.1
    I: Validating ifupdown 0.7.53.1
    I: Retrieving init 1.22
    I: Validating init 1.22
    I: Retrieving init-system-helpers 1.22
    I: Validating init-system-helpers 1.22
    I: Retrieving insserv 1.14.0-5
    I: Validating insserv 1.14.0-5
    I: Retrieving iproute2 3.16.0-2
    I: Validating iproute2 3.16.0-2
    I: Retrieving iptables 1.4.21-2+b1
    I: Validating iptables 1.4.21-2+b1
    I: Retrieving libxtables10 1.4.21-2+b1
    I: Validating libxtables10 1.4.21-2+b1
    I: Retrieving iputils-ping 3:20121221-5+b2
    I: Validating iputils-ping 3:20121221-5+b2
    I: Retrieving isc-dhcp-client 4.3.1-6+deb8u2
    I: Validating isc-dhcp-client 4.3.1-6+deb8u2
    I: Retrieving isc-dhcp-common 4.3.1-6+deb8u2
    I: Validating isc-dhcp-common 4.3.1-6+deb8u2
    I: Retrieving libjson-c2 0.11-4
    I: Validating libjson-c2 0.11-4
    I: Retrieving kmod 18-3
    I: Validating kmod 18-3
    I: Retrieving libkmod2 18-3
    I: Validating libkmod2 18-3
    I: Retrieving less 458-3
    I: Validating less 458-3
    I: Retrieving libcap2 1:2.24-8
    I: Validating libcap2 1:2.24-8
    I: Retrieving libcap2-bin 1:2.24-8
    I: Validating libcap2-bin 1:2.24-8
    I: Retrieving libestr0 0.1.9-1.1
    I: Validating libestr0 0.1.9-1.1
    I: Retrieving libffi6 3.1-2+b2
    I: Validating libffi6 3.1-2+b2
    I: Retrieving libgcrypt20 1.6.3-2
    I: Validating libgcrypt20 1.6.3-2
    I: Retrieving libgpg-error0 1.17-3
    I: Validating libgpg-error0 1.17-3
    I: Retrieving libidn11 1.29-1+b2
    I: Validating libidn11 1.29-1+b2
    I: Retrieving liblocale-gettext-perl 1.05-8+b1
    I: Validating liblocale-gettext-perl 1.05-8+b1
    I: Retrieving liblogging-stdlog0 1.0.4-1
    I: Validating liblogging-stdlog0 1.0.4-1
    I: Retrieving liblognorm1 1.0.1-3
    I: Validating liblognorm1 1.0.1-3
    I: Retrieving libmnl0 1.0.3-5
    I: Validating libmnl0 1.0.3-5
    I: Retrieving libnetfilter-acct1 1.0.2-1.1
    I: Validating libnetfilter-acct1 1.0.2-1.1
    I: Retrieving libnfnetlink0 1.0.1-3
    I: Validating libnfnetlink0 1.0.1-3
    I: Retrieving libpipeline1 1.4.0-1
    I: Validating libpipeline1 1.4.0-1
    I: Retrieving libpsl0 0.5.1-1
    I: Validating libpsl0 0.5.1-1
    I: Retrieving libselinux1 2.3-2
    I: Validating libselinux1 2.3-2
    I: Retrieving libsemanage-common 2.3-1
    I: Validating libsemanage-common 2.3-1
    I: Retrieving libsemanage1 2.3-1+b1
    I: Validating libsemanage1 2.3-1+b1
    I: Retrieving libsepol1 2.3-2
    I: Validating libsepol1 2.3-2
    I: Retrieving libsigc++-2.0-0c2a 2.4.0-1
    I: Validating libsigc++-2.0-0c2a 2.4.0-1
    I: Retrieving libtasn1-6 4.2-3+deb8u1
    I: Validating libtasn1-6 4.2-3+deb8u1
    I: Retrieving libtext-charwidth-perl 0.04-7+b4
    I: Validating libtext-charwidth-perl 0.04-7+b4
    I: Retrieving libtext-iconv-perl 1.7-5+b2
    I: Validating libtext-iconv-perl 1.7-5+b2
    I: Retrieving libtext-wrapi18n-perl 0.06-7
    I: Validating libtext-wrapi18n-perl 0.06-7
    I: Retrieving libusb-0.1-4 2:0.1.12-25
    I: Validating libusb-0.1-4 2:0.1.12-25
    I: Retrieving logrotate 3.8.7-1+b1
    I: Validating logrotate 3.8.7-1+b1
    I: Retrieving lsb-base 4.1+Debian13+nmu1
    I: Validating lsb-base 4.1+Debian13+nmu1
    I: Retrieving dmsetup 2:1.02.90-2.2
    I: Validating dmsetup 2:1.02.90-2.2
    I: Retrieving libdevmapper1.02.1 2:1.02.90-2.2
    I: Validating libdevmapper1.02.1 2:1.02.90-2.2
    I: Retrieving man-db 2.7.0.2-5
    I: Validating man-db 2.7.0.2-5
    I: Retrieving manpages 3.74-1
    I: Validating manpages 3.74-1
    I: Retrieving mawk 1.3.3-17
    I: Validating mawk 1.3.3-17
    I: Retrieving nano 2.2.6-3
    I: Validating nano 2.2.6-3
    I: Retrieving libncurses5 5.9+20140913-1+b1
    I: Validating libncurses5 5.9+20140913-1+b1
    I: Retrieving libncursesw5 5.9+20140913-1+b1
    I: Validating libncursesw5 5.9+20140913-1+b1
    I: Retrieving libtinfo5 5.9+20140913-1+b1
    I: Validating libtinfo5 5.9+20140913-1+b1
    I: Retrieving ncurses-base 5.9+20140913-1
    I: Validating ncurses-base 5.9+20140913-1
    I: Retrieving ncurses-bin 5.9+20140913-1+b1
    I: Validating ncurses-bin 5.9+20140913-1+b1
    I: Retrieving net-tools 1.60-26+b1
    I: Validating net-tools 1.60-26+b1
    I: Retrieving netbase 5.3
    I: Validating netbase 5.3
    I: Retrieving netcat-traditional 1.10-41
    I: Validating netcat-traditional 1.10-41
    I: Retrieving libhogweed2 2.7.1-5
    I: Validating libhogweed2 2.7.1-5
    I: Retrieving libnettle4 2.7.1-5
    I: Validating libnettle4 2.7.1-5
    I: Retrieving libnewt0.52 0.52.17-1+b1
    I: Validating libnewt0.52 0.52.17-1+b1
    I: Retrieving whiptail 0.52.17-1+b1
    I: Validating whiptail 0.52.17-1+b1
    I: Retrieving nfacct 1.0.1-1.1
    I: Validating nfacct 1.0.1-1.1
    I: Retrieving libssl1.0.0 1.0.1k-3+deb8u2
    I: Validating libssl1.0.0 1.0.1k-3+deb8u2
    I: Retrieving libp11-kit0 0.20.7-1
    I: Validating libp11-kit0 0.20.7-1
    I: Retrieving libpam-modules 1.1.8-3.1+deb8u1
    I: Validating libpam-modules 1.1.8-3.1+deb8u1
    I: Retrieving libpam-modules-bin 1.1.8-3.1+deb8u1
    I: Validating libpam-modules-bin 1.1.8-3.1+deb8u1
    I: Retrieving libpam-runtime 1.1.8-3.1+deb8u1
    I: Validating libpam-runtime 1.1.8-3.1+deb8u1
    I: Retrieving libpam0g 1.1.8-3.1+deb8u1
    I: Validating libpam0g 1.1.8-3.1+deb8u1
    I: Retrieving libpcre3 2:8.35-3.3+deb8u2
    I: Validating libpcre3 2:8.35-3.3+deb8u2
    I: Retrieving perl-base 5.20.2-3+deb8u3
    I: Validating perl-base 5.20.2-3+deb8u3
    I: Retrieving libpopt0 1.16-10
    I: Validating libpopt0 1.16-10
    I: Retrieving libprocps3 2:3.3.9-9
    I: Validating libprocps3 2:3.3.9-9
    I: Retrieving procps 2:3.3.9-9
    I: Validating procps 2:3.3.9-9
    I: Retrieving libreadline6 6.3-8+b3
    I: Validating libreadline6 6.3-8+b3
    I: Retrieving readline-common 6.3-8
    I: Validating readline-common 6.3-8
    I: Retrieving rsyslog 8.4.2-1+deb8u2
    I: Validating rsyslog 8.4.2-1+deb8u2
    I: Retrieving sed 4.2.2-4+b1
    I: Validating sed 4.2.2-4+b1
    I: Retrieving sensible-utils 0.0.9
    I: Validating sensible-utils 0.0.9
    I: Retrieving login 1:4.2-3+deb8u1
    I: Validating login 1:4.2-3+deb8u1
    I: Retrieving passwd 1:4.2-3+deb8u1
    I: Validating passwd 1:4.2-3+deb8u1
    I: Retrieving libslang2 2.3.0-2
    I: Validating libslang2 2.3.0-2
    I: Retrieving startpar 0.59-3
    I: Validating startpar 0.59-3
    I: Retrieving libsystemd0 215-17+deb8u3
    I: Validating libsystemd0 215-17+deb8u3
    I: Retrieving libudev1 215-17+deb8u3
    I: Validating libudev1 215-17+deb8u3
    I: Retrieving systemd 215-17+deb8u3
    I: Validating systemd 215-17+deb8u3
    I: Retrieving systemd-sysv 215-17+deb8u3
    I: Validating systemd-sysv 215-17+deb8u3
    I: Retrieving udev 215-17+deb8u3
    I: Validating udev 215-17+deb8u3
    I: Retrieving initscripts 2.88dsf-59
    I: Validating initscripts 2.88dsf-59
    I: Retrieving sysv-rc 2.88dsf-59
    I: Validating sysv-rc 2.88dsf-59
    I: Retrieving sysvinit-utils 2.88dsf-59
    I: Validating sysvinit-utils 2.88dsf-59
    I: Retrieving tar 1.27.1-2+b1
    I: Validating tar 1.27.1-2+b1
    I: Retrieving tasksel 3.31+deb8u1
    I: Validating tasksel 3.31+deb8u1
    I: Retrieving tasksel-data 3.31+deb8u1
    I: Validating tasksel-data 3.31+deb8u1
    I: Retrieving traceroute 1:2.0.20-2+b1
    I: Validating traceroute 1:2.0.20-2+b1
    I: Retrieving tzdata 2015g-0+deb8u1
    I: Validating tzdata 2015g-0+deb8u1
    I: Retrieving libustr-1.0-1 1.0.4-3+b2
    I: Validating libustr-1.0-1 1.0.4-3+b2
    I: Retrieving bsdutils 1:2.25.2-6
    I: Validating bsdutils 1:2.25.2-6
    I: Retrieving libblkid1 2.25.2-6
    I: Validating libblkid1 2.25.2-6
    I: Retrieving libmount1 2.25.2-6
    I: Validating libmount1 2.25.2-6
    I: Retrieving libsmartcols1 2.25.2-6
    I: Validating libsmartcols1 2.25.2-6
    I: Retrieving libuuid1 2.25.2-6
    I: Validating libuuid1 2.25.2-6
    I: Retrieving mount 2.25.2-6
    I: Validating mount 2.25.2-6
    I: Retrieving util-linux 2.25.2-6
    I: Validating util-linux 2.25.2-6
    I: Retrieving vim-common 2:7.4.488-7
    I: Validating vim-common 2:7.4.488-7
    I: Retrieving vim-tiny 2:7.4.488-7
    I: Validating vim-tiny 2:7.4.488-7
    I: Retrieving wget 1.16-1
    I: Validating wget 1.16-1
    I: Retrieving liblzma5 5.1.1alpha+20120614-2+b3
    I: Validating liblzma5 5.1.1alpha+20120614-2+b3
    I: Retrieving zlib1g 1:1.2.8.dfsg-2+b1
    I: Validating zlib1g 1:1.2.8.dfsg-2+b1
    I: Chosen extractor for .deb packages: dpkg-deb
    I: Extracting acl…
    Aborted.

    when I check the debootstrap.log, it said:

    [root@LS421DE392 debootstrap]# cat debootstrap.log
    dpkg-deb: file `.//var/cache/apt/archives/acl_2.2.52-2_armhf.deb’ contains ununderstood data member data.tar.xz , giving up
    tar: This does not look like a tar archive
    tar: Exiting with failure status due to previous errors

    Do you possibly know what went wrong?

    • #10 by Toha on January 30, 2016 - 1:57 pm

      Maybe a corrupted package, try to start over.

      • #11 by Jackson on January 30, 2016 - 3:56 pm

        I did try, I also tried another mirror as well, same thing…. any other thought?

    • #12 by romiro on March 11, 2016 - 12:37 am

      You should install wheezy because dpkg-deb that installed on NAS does not understand new XZ packages from jessie. After successfully wheezy installation you can upgrade it to jessie.

  6. #13 by Jackson on February 5, 2016 - 10:43 am

    Found the problem. For some reason the script came with “VERSION=jessie” and yours was “VERSION=wheezy”. After I change it to wheezy, then it works.

  7. #14 by Dana on May 3, 2016 - 4:10 pm

    Thank you so much for all the hard work!

    Just finished following your wonderful guide, works perfectly on LS220DE 🙂

  8. #15 by Ryan K on August 11, 2016 - 12:17 pm

    Is there any way we can boot from usb instead of sda?

  9. #16 by ScRe on March 18, 2017 - 11:09 pm

    Will this work on LS421DE with 2 HDDs as RAID1?

    With RAID enabled, there are 4 md devices:

    # cat /proc/mdstat
    Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
    md10 : active raid1 sda6[2]
    473337664 blocks super 1.2 [2/1] [_U]
    bitmap: 4/4 pages [16KB], 65536KB chunk

    md124 : active raid1 sda1[1]
    999872 blocks [2/1] [_U]
    bitmap: 1/1 pages [4KB], 65536KB chunk

    md1 : active raid1 sda2[2]
    4995008 blocks super 1.2 [2/1] [_U]
    bitmap: 1/1 pages [4KB], 65536KB chunk

    md2 : active raid1 sda5[2]
    999424 blocks super 1.2 [2/1] [_U]
    bitmap: 1/1 pages [4KB], 65536KB chunk

    # ls -la /dev/md*
    brw-rw—- 1 root disk 9, 1 Mar 18 16:38 /dev/md1
    brw-rw—- 1 root disk 9, 10 Mar 18 16:38 /dev/md10
    brw-rw—- 1 root disk 9, 124 Mar 18 16:38 /dev/md124
    brw-rw—- 1 root disk 9, 2 Mar 18 16:38 /dev/md2

    # mount | grep md
    /dev/md1 on / type ext3 (rw,relatime,errors=continue,barrier=1,data=writeback)
    /dev/md10 on /mnt/array1 type xfs (rw,noatime,attr2,usrquota,grpquota)

    2 md devices are not mounted, out of the 4.

    So, this is the mapping layout of LS421DE with RAID1

    md1=/ (root)
    md2=swap
    md10=data
    md124 is the boot device

    But setting INITRD_ROOT=”0x90a” seams not to work.

    Any ideas?

  1. Compiling Debian Wheezy Kernel for LinkStation LS421DE | Toha's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: