Install VFS Samba module on Zyxel NAS540

MarkusDesk
MarkusDesk Posts: 31  Freshman Member
First Comment First Anniversary
Hello,

How can I install a VFS Samba module on NAS540?
I need to use the dirsort module. But when I try to use I get the following error(Samba log):
Error loading module '/usr/lib/samba/vfs/dirsort.so': /usr/lib/samba/vfs/dirsort.so: cannot open shared object file: No such file or directory

All Replies

  • Mijzelf
    Mijzelf Posts: 2,790  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    Don't know much about Samba modules, but I suppose they have to be compiled against exact that samba binary, which will be an challenge.
    Alternatively you could look if Entware provides that plugin for it's samba package. Then you might be able to inject the Entware samba in the firmware. I wrote a package for that for the fw4 ZyXEL devices, and I know no reason why it's wouldn't work on your fw5 device. (Which doesn't guarantee it does work, of course).

  • MarkusDesk
    MarkusDesk Posts: 31  Freshman Member
    First Comment First Anniversary
    Hi, Thanks for replying. I installed the Entware samba4-server 4.13.4-1. I didn't try your script yet, but I can stop the factory installed samba manually and start the Entware one manually.
    It works, but it doesn't have the dirsort module too.

    The tutorial shown here https://techdudes.de/1930/zyxel-nas-520-540-542-mit-debian-und-openmediavault-omv/  for installation of OMV have all modules in the image(including the dirsort), but as it requires flashing, and I am a bit concerned about it.
    Do you know if is possible to follow this tutorial without flashing and run it directly from the SD Card or Thumb drive? Or do you think it would be safe to flash it?



  • Mijzelf
    Mijzelf Posts: 2,790  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    edited June 2021
    AFAIK flashing is optional.Without flashing the box will run the stock kernel, and chrooted Debian. When you remove the USB stick or SD card the box will run stock firmware again.

    Don't know if flashing is safe. If you search this forum, you will find several people who got in trouble after their Debian rootfs was damaged. But I don't know how many people have no problems.
  • MarkusDesk
    MarkusDesk Posts: 31  Freshman Member
    First Comment First Anniversary
    Thanks for replying. So the Kernel on the USB thumb drive will not be used with Debian? Are there any advantage of flashing as the tutorial says the USB thumb drive is still needed after flashing?
  • Mijzelf
    Mijzelf Posts: 2,790  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    There are several advantages in flashing. The stock kernel is as-is, and you can't add all possible functionality by compiling&loading modules. For instance, you can't enable ip-tables.
    Further a Debian kernel has some custom config, but I don't know which problems could arise when using just a random kernel. I have chrooted Debian on a lot of systems, and never found any problems. But there must be a reason for the diverging Debian config.
    And last, on the download page you can see that SCP managed to upgrade the kernel from 3.2.54 to 3.2.102. So there must be some bugs squashed.

  • MarkusDesk
    MarkusDesk Posts: 31  Freshman Member
    First Comment First Anniversary
    edited June 2021
    Thanks again for replying. So seems that flashing is a good option.
    Do you know if the LEDs and Fan will still work the way they supposed to work after the flashing?

    Last question: After flashing using the tutorial I linked above, If I decide to go back to the original firmware, I just need to connect the serial console and set the env next_bootfrom to the one before the flashing?

  • Mijzelf
    Mijzelf Posts: 2,790  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    If I decide to go back to the original firmware, I just need to connect the serial console and set the env next_bootfrom to the one before the flashing?
    I wouldn't count on that. According to the installation instructions you linked to SCP has written something like that, but if I look in the kernel package I see instructions to change the bootbox settings. And when you read the threads in this forum about bricked boxes, you can see that the bootbox environment was severely damaged (from the firmware point of view).
  • MarkusDesk
    MarkusDesk Posts: 31  Freshman Member
    First Comment First Anniversary
    Hi, do you know if it is possible to backup/dump the factory firmware and configuration and how to do it? So if anything goes wrong, I could restore the factory firmware and configuration.
  • Mijzelf
    Mijzelf Posts: 2,790  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    It is possible, somehow. At least the backing up. Restoring is a different story. You should assume only the bootloader is still working. I don't know if the bootloader supports tftpboot or something like that, which is needed to get such an enormous blob in the box' memory. Maybe it can mount an USB thumb disk. Just don't know.
    For knowing how to restore from firmware you could study the upgrade script. But take in account, normally only the nand partitions are overwritten at upgrade, while the bootloader and it's environment are in nor.

Consumer Product Help Center