NSA325-v2 - How to reset configuration/packages on NSA325 v2 without losing data?

Options
Elinx
Elinx Posts: 3 image  Freshman Member
First Comment
edited March 23 in Personal Cloud Storage

I’ve used my NSA325 v2 for years without issues, but a recent power failure caused some stability problems.

The NAS is back online, but Samba (SMB) fails to start automatically. I currently have to start it manually via PuTTY. I suspect the boot process is hanging because it’s searching for old SMB2 / EntwareNG packages that are now corrupted or missing. The file "USRPKG_DEPS_START" containing the name EntwareNG

Since a standard factory reset only affects the flash memory, the "broken" configuration files on the hard drives remain.

My goal: I want to perform a "fresh start" by clearing the configuration and package data from the drives, but without formatting my actual data partitions. I want to avoid a full restore from backup if possible.

Does anyone know which specific partitions or directories I should clear to reset the system environment while keeping my files intact?

edit:

If I delete everything from /zyxel/mnt/sysdisk exept sysdisk.img and also the following folders like .system, .media, zy-pkgs, opt and then perform a factory reset, will this work? Or is this not the way to go but another possibility?

FYI There is a 350MB swapfile (swap_ul6545p) inside sysdisk, but I don't know which process this handles every time after removal and reboot.

All Replies

  • Mijzelf
    Mijzelf Posts: 3,049 image  Guru Member
    250 Answers 2500 Comments Friend Collector Eighth Anniversary

    On /zyxel/mnt/sysdisk a small (512MB?) partition on the first disk is mounted. AFAIK this partition only contains sysdisk.img (which contains an ext2 filesystem blob) and a swapfile.

    AFAIK there are no other files there. Which ones do you see?

    A factory reset does a bit more than only wiping flash, it also deletes some files on the system partition. Can't remember which ones, but if you execute

    find /usr | grep btn
    

    or

    find /usr | grep button
    

    you can find the script which is executed on factory reset via the reset button.

    It's almost impossible that the firmware searches for an added smb2 package. The firmware is mostly embedded in the kernel, and so fresh at every boot, and partly on a read-only filesystem in sysdisk.img.

    Apart from the package system the only way I am aware of to get your own software started, is via USRPKG_DEPS_START. In your case that contains EntwareNG, which means it will execute a script/binary with that name in the same directory (/i-data/md0/.system/?) when it exists and it executable.

    At that moment the firmware smb is already started. Maybe your EntwareNG script kills samba, and then fails to start a new one due to a corrupted Entware installation?

  • Elinx
    Elinx Posts: 3 image  Freshman Member
    First Comment

    Thanks for your reply

    I have found that S08samba was still deactivated after the reset. S09Zyxelreplacent was still active, but did nothing.

    After activation of S08samba, samba is running automatic again. I have now installed the replacement packages again and samba is replaced. Next step is to activate S09ZyxelReplacement again.

Consumer Product Help Center