Author Topic: Installing Debian on LS220D - manual method  (Read 4621 times)

mas94

  • Calf
  • *
  • Posts: 10
Installing Debian on LS220D - manual method
« on: September 25, 2020, 04:06:48 PM »
Hello,

I'd like to install 1000001101000's Debian_on_Buffalo on my LS220D.  Rather than write over the Buffalo software, I would like to install it on a spare 500GB drive as a dry run and to give it a try.

The instructions for doing this are quite brief and I suspect I have done something wrong.

What I've done:
Formatted the disk with an MBR, added a single 1024MB partition, formatted it as ext3 (default settings from gparted), created a single directory /boot/ and written into it two files: initrd.buffalo and uImage.buffalo from the locations as per the hyperlinks.

Powered off and removed both original drives from the unit.  Inserted my new drive in bay 1.  Powered on.  Light flashes white for a second or so, then red in groups of 7 flashes.  It does not respond to pings.  It does the same thing if I remove the drive altogether.  (If I replace the original drives, it works fine and boots back into the Buffalo software.)

What I've tried:
  • Put my new drive in bay 2 instead
  • Put my drive in bay 1, and a seond (unpartitioned) drive in bay 2
  • Put my drive in bay 2, and a seond (unpartitioned) drive in bay 1
All with no effect: white flashes, then 7 reds.

Am I on the right lines?  I am unsure whether it's getting as far as attempting to boot from the disk, but if it is, have I put on all the files I need, in the right places?

(I don't have a spare caddy for the spare disk, so it's possible it's not seating properly in the unit, although I think it is.))

Many thanks!
-Mark

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Installing Debian on LS220D - manual method
« Reply #1 on: September 25, 2020, 04:57:00 PM »
It sounds like you're close.

The boot loader will look for the files as just uImage.buffalo and initrd.buffalo not /boot/uImage.buffalo and /boot/initrd.buffalo. If you remove the boot folder and place the files in the root of the filesystem that should help.

What you described sounds like proper partitioning but the blink codes concerns me somewhat. Usually if it is able to read the boot partition but not the boot files it gives 6 red instead of 7. 7 usually indicates failure to read the boot partition at all. Maybe it's the same code if the files aren't in the right place (not sure if I've tried that).

If you still have trouble let me know and we can look closer.


mas94

  • Calf
  • *
  • Posts: 10
Re: Installing Debian on LS220D - manual method
« Reply #2 on: September 27, 2020, 09:29:21 AM »
Thanks very much for the quick reply! Putting the files in the root did indeed solve the problem and I've been able to run the installer, reboot into Debian and get a few tools installed.

If I make this a bit clearer in the instructions, are you interested in a pull request?

Debian-on-Buffalo looks like an excellent project -- thanks for making it available!

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Installing Debian on LS220D - manual method
« Reply #3 on: September 27, 2020, 11:11:20 AM »
I’m always open to pull requests.

I’m not sure you can do PRs for wiki pages, but I’m always open to wiki content too!

mas94

  • Calf
  • *
  • Posts: 10
Re: Installing Debian on LS220D - manual method
« Reply #4 on: October 02, 2020, 03:48:57 PM »
Why do the boot files have to be in the root directory for the manual install method, but in /boot/ when the device is running stock firmware, please?  Does the bootloader look in a different place for some reason?

Thanks!

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Installing Debian on LS220D - manual method
« Reply #5 on: October 02, 2020, 07:51:43 PM »
The reason is that the bootloader and Linux access filesystems in different ways.

The rootfs and boot filesystems physically exist on separate disk partitions. When Linux starts it mounts the rootfs as "/" and then mounts the boot partition at "/boot". From within Linux this makes the boot file appear under /boot.

The boot loader is less sophisticated and just loads the files directly from the partition:
Code: [Select]
ext2load ide 0:1 0x1200000 /$kernel
I believe the boot loader is the main reason the boot files are stored in a separate partition. Older versions would crash if you tried to read partitions larger than ~768MB. I haven't explored the limits of the newer version but imagine they also have limits.


mas94

  • Calf
  • *
  • Posts: 10
Re: Installing Debian on LS220D - manual method
« Reply #6 on: October 05, 2020, 10:01:24 AM »
Thanks -- that took me a while to get my little brain around.  Do I understand correctly then, that both methods require the files to be in the same place on the disk (i.e. in the first, small, partition) but because the first partition is mounted as /boot/ by the stock firmware, in order to get them to the right place, the files need to be placed in /boot/?

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Installing Debian on LS220D - manual method
« Reply #7 on: October 05, 2020, 11:06:22 AM »
That is exactly correct.

The same setup is used within Debian. One of the things the installer does is make the necessary configuration changes required to have Debian automatically place its boot files in that same place whenever new ones are generated.

mas94

  • Calf
  • *
  • Posts: 10
Re: Installing Debian on LS220D - manual method
« Reply #8 on: November 03, 2020, 09:08:47 AM »
Hello again,

At last I have some time to carry on with this.  The Debian installer is installed and running but I have a question about partitioning.

The three partitions for /boot, / and swap I am happy I have set up correctly, as follows:
* RAID1 device #0 1.0GB ext3 /boot
* RAID1 device #1 5.1GB ext3 /
* RAID1 device #2 1.0 GB swap swap

But the large partition, with all my data on it, I am not sure about.

It shows up in the installer as
RAID1 device #10 2.0TB xfs
I didn't check what format it was before running the installer, but I presume it has correctly detected it as xfs.
When I go to configure it, in the "How to use this partition" menu there is no xfs option.  (Options are Ext3, Ext3, Ex2, btrfs, JFS, FAT16, FAT32, swap area, physical volume for encryption, physical volume for LVM, do not use.)

I took a backup, of course (several in fact!) but if possible I would like to use the existing filesystem as-is.

What's the trick here please?

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Installing Debian on LS220D - manual method
« Reply #9 on: November 03, 2020, 09:17:45 AM »
It should be safe to select the "do not use" option to prevent the installer from doing anything with it during the install. I've got instructions in the post-installation steps about how to set the existing array up when you boot into Debian.


I think there may be a missing xfs installer module, if so I'll try to add it next time I work on the installer.

mas94

  • Calf
  • *
  • Posts: 10
Re: Installing Debian on LS220D - manual method
« Reply #10 on: November 03, 2020, 11:07:38 AM »
Thanks very much, that sorted it and the post-install instructions are good -- I'd read them previously but forgotten that was there  :-[

There's a small bug: /sbin/ is not in the path which means mdadm and update-initramfs don't work.  I've submitted an issue (#66).

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Installing Debian on LS220D - manual method
« Reply #11 on: November 03, 2020, 11:57:10 AM »
I believe this was a deliberate change in Buster (I also think it was standard in other distros like RHEL):
https://wiki.debian.org/NewInBuster

I assume it has some sort of security benefit.

mas94

  • Calf
  • *
  • Posts: 10
Re: Installing Debian on LS220D - manual method
« Reply #12 on: November 10, 2020, 03:44:10 PM »
Thanks. So it was. Any security benefit it has seems to be offset by the fact that it breaks everything :-/

My NAS is back up and running now, with Debian -- at last, proper NFS support. OpenMediaVault runs nicely (I tried Webmin, which worked and which I quite liked, but it was extremely slow -- took literally about 5 minutes to serve the front page).

Do you have any recommendations for a media server to replace Twonky in the original firmware?  I have put Gerbera on and it seems to work fine, but it's a little limited (no searching, no thumbnails).

1000001101000

  • Debian Wizard
  • Big Bull
  • *****
  • Posts: 1128
  • There's no problem so bad you cannot make it worse
Re: Installing Debian on LS220D - manual method
« Reply #13 on: November 10, 2020, 04:39:50 PM »
I've never done anything with DLNA/etc personally. Really only vaguely aware of what they are to be honest.

You should be able to test out anything in the Debian repository or otherwise available for armhf devices. Let me know if you end up with a recommendation I should add to the wiki.

mas94

  • Calf
  • *
  • Posts: 10
Re: Installing Debian on LS220D - manual method
« Reply #14 on: November 22, 2020, 09:10:19 AM »
I tried minidlna and Gerbera, both from the archive.  Both worked fine, but for the time being I have settled on minidlna for two reasons: it supports searching (Gerbera does not); and I find its configuration method (config file in /etc/ rather than Gerbera's web interface) slightly easier to really understand what I'm getting, but that's a matter of taste.  Seems to serve video to my Samsung TV and audio to my Pure streaming devices fine.

Another question: do you know what sensible CPU temperature thresholds for fancontrol/pwmconfig are? I've got...
Code: [Select]
MINTEMP= hwmon1/pwm1=60
MAXTEMP= hwmon1/pwm1=75
(meaning the fan comes on at lowest speed at 60, and reaches highest speed at 75).  Perhaps that results in the fan being on a bit more than it used to be under stock firmware (sounds like it) but I don't have the stock firmware to compare to and naturally I don't want to cook the device.

Thanks once again!