Buffalo Forums
Products => Storage => : kanidrive February 22, 2018, 07:48:26 AM
-
There are many references to other Linkstation models able to run Linux Debian as an OS in lieu of the stock Buffalo Firmware. This would be very useful for a means of extending the lifetime of the aging Linkstation LS441D product line. Yet there seems to be no direct reference found after searching the web with better search engines than "the big G".
There are better search engines than "the big G" - eg. QWANT, Bing, DDG, Ecosia, and many others. Try them. You'll see. Some of them even pay YOU or benefit great causes, unlike "G".
After attempting to post to a few threads that contain tutorials or guides on how to install Linux Debian on other specific models of Linkstation NAS devices, there still has been no clear and definitive answer on whether or not this has ever been done on a LS441D successfully.
Has anyone reading this post been able to accomplish installing Linux Debian (preferably Ubuntu, perhaps CentOS, but vanilla Debian would be just fine too) on a 4-bay Buffalo Linkstation LS441D?
Please share your answers and experience, either way (yes or no).
-
Howdy,
I'm pleased to say that as of the last couple of days the answer is a definitive yes. I've been working for a while now on adapting the process others have written about for getting various flavors of linux running on the ls421de with a custom compiled kernel. As of a few months ago I've been able to modify that process to make it work on Debian Stretch with Debian's vanilla armhf kernel. Apt can even update the kernel using flash-kernel to handle generating the uImage's similar to how mainline support for the V-series devices works.
Once I got that working I adapted the device tree to work on the ls441d, ls421de, ls420d and ts1400r (I went a little overboard on eBay).
I've got a partial write up of the installation process put together and am currently looking for a suitable place to host it and associated device trees (dts/dtb files). I'll probably set up a github account for this purpose in the coming days.
Let me know if you'd be interested on trying it out, I'd appreciate someone other than me walking through it and providing feedback before I publish anything.
Hope to talk to you soon.
Materials I've referenced in the process:
LS421DE dts and build process examples:
https://github.com/tohenk/linkstation-mod/commits/master
dts examples (that I couldn't make work) for the ls441d, ls421de and ls420d
https://sites.google.com/site/shihsung/88fxxxx-soc
ssh-based Debian install image to simplify boot strapping a debian image
http://ftp.nl.debian.org/debian/dists/stretch/main/installer-armhf/current/images/network-console/
another example of packaging debian kernels and bootstraping images
https://github.com/rogers0/OpenLinkstation
-
I would be very glad to know about it as soon as it works.
I'm so sick about this default limited OS... the shares are Ok, but the backup process... Oh man, it sucks, and, everytime that i need to sync data with an usb disk.. I NEED TO DO IT REMOTELY... ie, use a workstation as bridge (network traffic) to copy from raid to usb disk over local lan instead of.... local nas hardware...
CRAZY
-
I'm in the process of writing everything up and making the process as simple and reliable as possible. I setup a GitHub page to house everything, feel free to give it a try:
https://github.com/1000001101000/Debian_on_Buffalo
-
That's just awesome.
Moved to main thread and given out a custom title
-
The method I've put together works just fine on the LS441D running the latest firmware. There is no need to modify U-Boot, downgrade the firmware or change any of the boot parameters. In fact, there is no need to modify the device in any way. You can switch back and forth between Debian and the stock the stock firmware without issue (I do this frequently as part of my testing).
You don't even need to change the partitions on the device, the guide I posted on github describes how to install Debian using the devices existing partitions/raid devices.
Feel free to give it a try: https://github.com/1000001101000/Debian_on_Buffalo
Let me know if you have any questions. I'd love to have some more folks try this out and give me feedback to refine the process, particularly if you're familiar with Toha's work and are already comfortable that process.
-
Getting error while partitioning the disk...
May 10 22:25:27 kernel: [ 1020.942705] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),task=debconf,pid=1237,uid=0
May 10 22:25:27 kernel: [ 1020.942789] Out of memory: Killed process 1237 (debconf) total-vm:19652kB, anon-rss:14396kB, file-rss:2592kB, shmem-rss:0kB, UID:0 pgtables:28kB oom_score_adj:0
May 10 22:25:27 kernel: [ 1020.979027] oom_reaper: reaped process 1237 (debconf), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Please help
-
Is this under Debian?
"Out of memory" presumably means whatever you're doing ran out of memory. Your best bet would be to enable swap.
-
Hello,
Yes, this is with Debian... I do have swap memory allocated.. I manually created the partitions as 8GB boot, 16GB proc & another 8GB swap. But, the stock firmware recreates the partitions as 1GB, 2GB & 1GB respectively. Can you please let me know if I can change it before running the installer or before copying the new images. Or, can I change this during the installation & how?
Appreciate your help in this regard.
-
can you show the output of:
free -h
-
Hello,
Thank you for quick response... Here is the out of free -h
~ # free -h
total used free shared buff/cache available
Mem: 123604 24588 69752 60 29264 69148
Swap: 0 0 0
Surprised that the swap is not showing up. Please let me know how can i enable swap space here... Tried to add swap space from the shell window before starting the install, but again got the OoM error..
# dd if=/dev/zero of=/swapfile bs=1024 count=1048576
Output:
Jan 1 00:13:07 kernel: [ 787.518404] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),task=debconf,pid=1219,uid=0
Jan 1 00:13:07 kernel: [ 787.518485] Out of memory: Killed process 1219 (debconf) total-vm:8912kB, anon-rss:3596kB, file-rss:2580kB, shmem-rss:0kB, UID:0 pgtables:16kB oom_score_adj:0
Jan 1 00:13:07 kernel: [ 787.532359] oom_reaper: reaped process 1219 (debconf), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
-
Please post:
lsblk
and
cat /etc/fstab
-
Hello,
Please see the output as you requesed. The lsblk command was not found...
~ # lsblk
/bin/sh: lsblk: not found
~ # cat /etc/fstab
devpts /dev/pts devpts defaults 0 0
tmpfs /run tmpfs nosuid,size=10%,mode=755 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
~ #
-
oh, this is inside the installer? Anything you do in that installer shell happens in memory, not in the target system. That's why it ran out of memory that time around.
I believe your problem should resolve itself it you specify a swap partition during the install.
Here is an example of what a disk layout for a device using raid:
https://github.com/1000001101000/Debian_on_Buffalo/blob/master/.images/17-all_volumes.png
also, what model is this?
-
Hello,
This is a LS-WTGL/R1. Also, I have configured this to RAID 0. Since, I am testing this, I am using a 500GB & a 160GB drives. Please let me know if this will cause any issue?
Also, the error happens while the installer is checking the drives. I will try on another machine with a lot of memory (20GB) and let you know.
In the meantime, please let me know if I need to check anything else...
thank you and stay safe.
-
ah, ok. I've heard of mixed results running the latest installer with devices running 64mb ram.
I've been working on customizing my installer to deal with this as part of adding support for ls-xl. This has been slow work since I keep running into roadblocks but I should get it working eventually.
In the meantime you may have better luck if you start with Stretch and then upgrade to Buster (I think that installer will require less memory)
-
Hello,
I tried from another machine with more memory and it went past the "scanning the disks" part. But, now after scanning, it listed out the drives available to search for the installation ISO and I picked /dev/sda1 (guessing it would be the /boot partition of my first disk). It came back with the screen asking me to locate the installer ISO Image.
I thought we uploaded the image files. Do i need to download an iso from the debian site?
┤ [!!] Scan hard drives for an installer ISO image ├────────────────────────┐
│ │
│ Installation step failed │
│ An installation step failed. You can try to run the failing item again from the menu, or skip it │
│ and choose something else. The failing step is: Scan hard drives for an installer ISO image │
│ │
│ <Continue> │
│
-
Hello,
Is there a way to update samba alone on the LS-WTGL stock firmware. Currently trying to get this working on SMB2 as a 1st step on another Linkstation Pro Duo, while I try building this on this LS-WTGL.
Thank you for all your help...
laksjan
-
Hello,
I tried from another machine with more memory and it went past the "scanning the disks" part. But, now after scanning, it listed out the drives available to search for the installation ISO and I picked /dev/sda1 (guessing it would be the /boot partition of my first disk). It came back with the screen asking me to locate the installer ISO Image.
I thought we uploaded the image files. Do i need to download an iso from the debian site?
What are you trying to accomplish by doing this?
s there a way to update samba alone on the LS-WTGL stock firmware. Currently trying to get this working on SMB2 as a 1st step on another Linkstation Pro Duo, while I try building this on this LS-WTGL.
Thank you for all your help...
Other folks on this forum have modified devices newer than this to enable SMB2, I do not know if that would work with this model or not.
-
Hi,
Yes, I have made changes to smb.sh to make it work with both SMB2 & SMB3 on my another Ls-WVL NAS. It works fine, no issues. Whereas, this LS-WTGL is not reading the smb.conf file and they say that this could be because of the Samba version (3.x). I am sure it works with Samba (v4.x or above) like a charm.
Going to this thread, I will start with Stretch and see it helps.. Will keep you posted.
Thank you,
laksjan
-
Hello,
I again had the same error OoM while partitioning the disks... Please let me know if I am making any mistake.. would love to get this working. Appreciate your help...
May 15 18:32:42 kernel: [ 1004.727647] active_anon:6691 inactive_anon:14 isolated_anon:0
May 15 18:32:42 kernel: [ 1004.727647] active_file:0 inactive_file:0 isolated_file:0
May 15 18:32:42 kernel: [ 1004.727647] unevictable:20214 dirty:0 writeback:0 unstable:0
May 15 18:32:42 kernel: [ 1004.727647] slab_reclaimable:799 slab_unreclaimable:708
May 15 18:32:42 kernel: [ 1004.727647] mapped:2099 shmem:16 pagetables:167 bounce:0
May 15 18:32:42 kernel: [ 1004.727647] free:1269 free_pcp:36 free_cma:0
May 15 18:32:42 kernel: [ 1004.727693] Node 0 active_anon:26764kB inactive_anon:56kB active_file:0kB inactive_file:0kB unevictable:80856kB isolated(anon):0kB isolated(file):0kB mapped:8396kB dirty:0kB writeback:0kB shmem:64kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
May 15 18:32:42 kernel: [ 1004.727758] Normal free:5076kB min:5408kB low:5736kB high:6064kB reserved_highatomic:0KB active_anon:26764kB inactive_anon:56kB active_file:0kB inactive_file:0kB unevictable:80856kB writepending:0kB present:131072kB managed:123604kB mlocked:0kB kernel_stack:488kB pagetables:668kB bounce:0kB free_pcp:144kB local_pcp:144kB free_cma:0kB
May 15 18:32:42 kernel: [ 1004.727764] lowmem_reserve[]: 0 0 0
May 15 18:32:42 kernel: [ 1004.727789] Normal: 1*4kB (M) 0*8kB 1*16kB (E) 0*32kB 11*64kB (M) 10*128kB (M) 4*256kB (ME) 0*512kB 2*1024kB (ME) 0*2048kB 0*4096kB = 5076kB
May 15 18:32:42 kernel: [ 1004.727897] 20241 total pagecache pages
May 15 18:32:42 kernel: [ 1004.727911] 0 pages in swap cache
May 15 18:32:42 kernel: [ 1004.727926] Swap cache stats: add 0, delete 0, find 0/0
May 15 18:32:42 kernel: [ 1004.727936] Free swap = 0kB
May 15 18:32:42 kernel: [ 1004.727946] Total swap = 0kB
May 15 18:32:42 kernel: [ 1004.727956] 32768 pages RAM
May 15 18:32:42 kernel: [ 1004.727965] 0 pages HighMem/MovableOnly
May 15 18:32:42 kernel: [ 1004.727974] 1867 pages reserved
May 15 18:32:42 kernel: [ 1004.727984] Tasks state (memory values in pages):
May 15 18:32:42 kernel: [ 1004.727995] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name
May 15 18:32:42 kernel: [ 1004.728035] [ 60] 0 60 855 583 10240 0 -1000 systemd-udevd
May 15 18:32:42 kernel: [ 1004.728065] [ 120] 0 120 537 351 10240 0 0 syslogd
May 15 18:32:42 kernel: [ 1004.728094] [ 122] 0 122 537 341 10240 0 0 klogd
May 15 18:32:42 kernel: [ 1004.728122] [ 820] 0 820 1918 1010 14336 0 0 haveged
May 15 18:32:42 kernel: [ 1004.728151] [ 833] 0 833 537 350 10240 0 0 debian-installe
May 15 18:32:42 kernel: [ 1004.728179] [ 840] 0 840 720 474 10240 0 0 screen
May 15 18:32:42 kernel: [ 1004.728207] [ 841] 0 841 892 680 12288 0 0 screen
May 15 18:32:42 kernel: [ 1004.728234] [ 843] 0 843 537 344 10240 0 0 sh
May 15 18:32:42 kernel: [ 1004.728262] [ 844] 0 844 537 365 8192 0 0 sh
May 15 18:32:42 kernel: [ 1004.728290] [ 845] 0 845 537 268 10240 0 0 tail
May 15 18:32:42 kernel: [ 1004.728318] [ 846] 0 846 2098 1372 18432 0 0 debconf
May 15 18:32:42 kernel: [ 1004.728347] [ 847] 0 847 495 353 10240 0 0 main-menu
May 15 18:32:42 kernel: [ 1004.728374] [ 1165] 0 1165 478 333 8192 0 0 udpkg
May 15 18:32:42 kernel: [ 1004.728402] [ 1166] 0 1166 537 396 8192 0 0 network-console
May 15 18:32:42 kernel: [ 1004.728431] [ 1179] 0 1179 1383 774 14336 0 -1000 sshd
May 15 18:32:42 kernel: [ 1004.728459] [ 1195] 0 1195 1383 1095 12288 0 0 sshd
May 15 18:32:42 kernel: [ 1004.728487] [ 1198] 0 1198 537 363 10240 0 0 debian-installe
May 15 18:32:42 kernel: [ 1004.728515] [ 1204] 0 1204 759 508 10240 0 0 screen
May 15 18:32:42 kernel: [ 1004.728543] [ 1205] 0 1205 1192 948 12288 0 0 screen
May 15 18:32:42 kernel: [ 1004.728571] [ 1207] 0 1207 537 363 8192 0 0 sh
May 15 18:32:42 kernel: [ 1004.728599] [ 1208] 0 1208 537 371 8192 0 0 sh
May 15 18:32:42 kernel: [ 1004.728626] [ 1209] 0 1209 537 306 8192 0 0 tail
May 15 18:32:42 kernel: [ 1004.728654] [ 1210] 0 1210 4802 4091 26624 0 0 debconf
May 15 18:32:42 kernel: [ 1004.728682] [ 1211] 0 1211 495 368 10240 0 0 main-menu
May 15 18:32:42 kernel: [ 1004.728711] [ 4917] 0 4917 478 332 10240 0 0 udpkg
May 15 18:32:42 kernel: [ 1004.728739] [ 4918] 0 4918 537 343 10240 0 0 partman-base.po
May 15 18:32:42 kernel: [ 1004.728767] [ 4919] 0 4919 549 407 10240 0 0 partman
May 15 18:32:42 kernel: [ 1004.728795] [ 4931] 0 4931 562 410 10240 0 0 anna
May 15 18:32:42 kernel: [ 1004.728824] [ 5054] 0 5054 478 351 8192 0 0 udpkg
May 15 18:32:42 kernel: [ 1004.728853] [ 5067] 0 5067 586 343 10240 0 0 debconf-loadtem
May 15 18:32:42 kernel: [ 1004.728867] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),task=debconf,pid=1210,uid=0
May 15 18:32:42 kernel: [ 1004.728927] Out of memory: Killed process 1210 (debconf) total-vm:19208kB, anon-rss:13844kB, file-rss:2520kB, shmem-rss:0kB, UID:0 pgtables:26kB oom_score_adj:0
May 15 18:32:42 kernel: [ 1004.772801] oom_reaper: reaped process 1210 (debconf), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
-
I understand your issue now, I keep seeing LS441D in the thread title and get confused how you could be out of memory.
the LS-XL, LS-CHLv2 and LS-WTGL all have only 64MB where all the other devices have 128M+. I have just finished creating a "low memory" version of the installer which side steps the issue you're running into by detecting and activating swap earlier in the install process. I'm going to test it on the LS-CHLv2 shortly, assuming it works I publish it and post a link so you can test it on the LS-WTGL.
-
Great and thank you for your time on this... Can't wait to try it out...
-
I'm still waiting for a Stretch test to finish before trying a Buster build but am hoping you can give it a try on your device as a test.
The files are posted here.
https://github.com/1000001101000/Debian_on_Buffalo/tree/master/Stretch/installer_images/armel_devices/lowmem
There has to be an existing swap device before starting the installer for it to work (it needs swap to even get to the partitioner as you've noticed). Starting with the stock firmware partitions is one way to accomplish this.
This takes longer than a typical install because of the heavy swap usage the whole time.
-
Hello,
Copied the images to the LS. But unable to ssh into the device as installer/install
The authenticity of host '192.168.1.32 (192.168.1.32)' can't be established.
RSA key fingerprint is SHA256:UKl4ykH/waQtt9/5hQXC+spoKn7mu7G2KdxTDs+XPBE.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '192.168.1.32' (RSA) to the list of known hosts.
installer@192.168.1.32's password:
Permission denied, please try again.
installer@192.168.1.32's password:
-
That usually means it’s still in the stock firmware. Does it show up in nasnavigator/etc?
-
Yes, It does show up in the NAS Navigator... Let me try another reboot..
-
Hello,
I rebooted the NAS again and it failed to load (6 RED blinks). Need to revert back to the stock firmware. Any ideas?
FYI, I just copied only the following files to the NAS:
- initrd.buffalo.armel-lowmem
- uImage.buffalo.lswtgl
- vmlinuz-armel
-
vmlinuz-armel is not needed
initrd.buffalo.armel-lowmem should be renamed initrd.buffalo
uImage.buffalo.lswtgl should be renamed uImage.buffalo
-
Yes, did the same and got the 6 "RED" blinks at start-up... Restored the stock firmware back and now back online. Please let me know the next steps we can try... Also, just a note, these 2 custom files are only 88kb in size as opposed to the other images being 6MB & 2MB.
Is that wierd?
-
Instead of right-clicking and selecting “save as”, click on each link and use the “download” button on the page. This will allow you to get the files instead of just downloading the page html.
-
Hello,
I download the new images and uploaded into the LS and still got the 6 RED blinks in the start. After pressing the FUNC button, the LS is not accessible at all.. Rolled back to the stock firmware again...
-
I need more detail about what you're doing to know where things are going wrong.
starting from stock sounds like a good idea, that way you can load the files the way you did originally.
-
Hello, sorry if I had confused you.. Here are the steps followed:
- Stable on the stock firmware with RAID 0 setup
- Downloaded your image files(Not save as, download and the file size looks reasonable)
- From a linux box, copied the files to the /boot folder, renamed the old stock firmware as stock.**
- Renamed your images to *.buffalo
- Typed "sync" and "exit" out of ssh
- Rebooted the LS using acp_commander
- After, reboot, I see 6 RED flashing lights on the status indicator. Not operational even after pressing the "FUNC" button and can't reach the NAS.
-
Gotcha, It might mean the installer is too big for that device's boot loader. I've only tested it on the lsxl/lschlv2 (I don't have a working ls-wtgl), those are both kirkwood devices and are more forgiving than the older orion5x series.
that actually gives me an idea. I'll let you know when I have a new image to try.
-
Sure, please do and I will try...
QQ, Would you be able to create an image with the dpkg or apt-get on a stock firmware? or, let me know how I can get these installed in the existing NAS? If we have these, we can upgrade to any debain full version?
-
There was a process that did that several years ago but it hasn't worked properly since about Debian 7 or 8 (Buster is Debian 10). I believe the person who developed it was the one who created the installer process to replace it.
For reference:
https://github.com/rogers0/OpenLinkstation
I've updated the process to generate smaller archives and confirmed it would boot on the LS-GL which O believe has similar size limits to the ls-gl. The new files are up on the site (now for Stretch and Buster ). Let me know if that works better for you.
-
I'm in the process of writing everything up and making the process as simple and reliable as possible. I setup a GitHub page to house everything, feel free to give it a try:
https://github.com/1000001101000/Debian_on_Buffalo
Thanks for putting this together. I need to rebuild my NAS (LS441D) and was hoping to find something exactly like this. I'll be working on it late next week, after I get my new drives.