MSDN installation files

I just learned, that MSDN installation files (at least for Windows) are not full installation files, but (apparantly) crippled ones.

If for instance, you need a Windows 10 installation media, you should not normally use the one from MSDN, but download it from microsoft.com instead.

My specific problem, was that the package from MSDN would not accept the product-key which was embedded in BIOS, whereas the installation media from microsoft.com used the embedded key without any complaints at all.

I have no idea if this is also the case beyond Windows installations.

Zyxel NAS542

This is a collection of information on the net regarding how to handle the Zyxel NAS542

Upgrade HDDs on Zyxel NAS542

Zyxel forum

Removing disks from Zyxel NAS542 RAID array

can be troublesome

https://homeforum.zyxel.com/discussion/2407/nas542-how-to-remove-disks-from-raid-1

iSCSI

wp.bizoir.dk

How to configure iSCSI settings

Enable extra packages

zyxel.diskstation.eu

https://github.com/Entware/Entware/wiki/Install-on-Zyxel-NAS542

Installing git on ANOTHER ZYXEL MODEL: https://tungchingkai.blogspot.com/2011/06/how-to-install-git-repo-in-zyxel-nsa.html

RSync

https://homeforum.zyxel.com/discussion/comment/1715#Comment_1715

http://ujelang.com/2015/11/rsync-support-on-zyxel-nsa325-v2-nas/

Add disk to NAS542 (and optionally change RAID level)

https://kb.zyxel.com/KB/searchArticle!viewDetail.action?articleOid=015008&lang=EN

In general, in the GUI, you can change from

  • no RAID(Basic) to RAID-1
  • RAID-1 to RAID-5
  • RAID-5 to RAID-6

(including some combinations with hot spares)

iSCSI without CHAP on NAS542

https://homeforum.zyxel.com/discussion/356/nas542-iscsi-without-chap-authentication

I have a different model, but I suspect your model uses the same underlying logic for iscsi. You can do the following:

  1. create the LUN(s) and target via the webgui
  2. login to your zyxel via ssh ([email protected]), BTW if your pass is longer than 14 chars, only use the first 14 chars, for some reason Zyxel allows you to choose a pass longer then 14 but only uses the first 14 chars.
  3. $ sudo -i (to get root)
  4. targetcli (this will open a shell where you can manage iscsi, use tab completion to get around in it)
  5. ls (to get an overview)
  6. cd /iscsi/iqn.2018-03.com.zyxel:targetname.randomstring/tpg1/ (again use tab completion, so cd /iscsi/iqn<tab<tab etc. etc.)
  7. set attribute authentication=0
  8. set attribute generate_node_acls=1
  9. set attribute demo_mode_write_protect=0
  10. I also deleted the ACLS by doing; cd acls, delete iqn
  11. exit
  12. targetcli saveconfig (normally if you exit targetcli, it will autosave, so this is just in case)

and that should be it, though a reboot of your nas wouldn’t hurt now. note that the above config is incredibly insecure, since anybody that can connect to your nas on port 3260 (default iscsi) can read/write to your iscsci portal. so you need some additional network level protection (my own nas is on a separate network, directly connected to my proxmox nodes via a switch).

I also had problems after I was able to add the iscsi storage (which I used as a volume for lvm), and I had to to do a vgchange -a y and a lvchange -a y /dev/MyLVMiSCSIStore/LUN-1 but that may be unrelated and caused by own futzing around.

More info:
http://atodorov.org/blog/2015/04/07/how-to-configure-iscsi-target-on-red-hat-enterprise-linux-7/
http://linux-iscsi.org/wiki/Targetcli#Startup

Code vulnerabilities

The Twonky Server version 7.0.11-8.5 has a vulnerability ( CVE-2018-7171 ), which allows an attacker to access all files on the NAS542.

The version that is installed on firmware V5.21(ABAG.1) is Twonky_8.3-19_Release20161209

The suggestion is to password-protect the Twonky Server and disallow access from the internet

fun_plug

HDD-Installation of the fun_plug 0.7 on NAS-devices

The file named fun_plug must be in the topmost directory of Volume_1 of your NAS and must be marked as executable (chmod 777)

Compiling for the NAS542

Links to the GPL source package are here (http://gpl.nas-central.org/ZYXEL/NAS542_GPL/)

Request Zyxel for GPL source here

https://groups.google.com/forum/#!msg/uk.comp.os.linux/zDGBcPx_O-I/9f1xyahCAgAJ

Linux Device Tree for a NSA325 – may or may not be relevant

Compiling for NSA210

Fix high cpu usage on NAS

https://support.zyxel.eu/hc/en-us/articles/360001390314-How-to-fix-High-CPU-Issues-on-Zyxel-NAS-

Copy files internally on NAS542 (Not via the PC)

https://homeforum.zyxel.com/discussion/869/copy-speed-on-nas542

Another way is used terminal to telnet/SSH to NAS, then use command “mv” to move the files you want to modify, and before the process finish, you only can wait or stop it by Ctrl+C.
The store folder will be here: /i-data/sysvol/, you can follow these steps to move files:
/#cd /i-data
/#ls
partition1 partition2
/#cd /i-data/sysvol/
/i-data/partition1/#mv file ../partition2/target folder

Performance

https://www.itpro.co.uk/nas/27123/zyxel-nas542-review

three 2TB WD Enterprise SATA, a RAID5 array

Performance is unimpressive: our 25GB test file was read and written at disappointing speeds of 104MB/sec and 53MB/sec respectively. And the NAS542 really struggled with our backup test: a 22.4GB folder of 10,500 small files was written at just 27MB/sec average.

The NAS542 also supports thick and thinly provisioned iSCSI LUNS, although it isn’t straightforward to set up. ZyXEL insists on CHAP authentication and presents the target to only one iSCSI initiator, which must be declared using its full IQN.

Performance was again disappointing. Running Iometer against a 250GB target, we saw read and write speeds of only 74MB/sec and 56MB/sec respectively. The cause may not be a mystery: CPU utilisation maxed out at 100% more than once during the test.

Subversion – check state of local work copy

Using “SlikSvn” (and most other svn clients), you can relatively easily check the state of your locally checked out copy on a Windows pc.

  • Are some objects not yet committed
  • Are some objects not yet added to Subversion

Add this to a .CMD file in Windows. In the output it will list objects that needs to be handled – most likely:

  • Commit Add/Change to Subversion
  • Release lock
CheckSVNState.CMD
——————————-
@ECHO OFF
SET DT=%DATE: =0%
SET TT=%TIME: =0%

SET OUTFILE=EDI_Local_Svn_%DT:~-4%%DT:~3,2%%DT:~0,2%.txt
C:\bin\SlikSvn\bin\svn status S:\SVNLocal | FIND /V “? ” > c:\temp\%OUTFILE%
——————————-

You can also check for objects that should have been added to Subversion, but have been missed:

CheckSVNMissingAdd.CMD
——————————-
@ECHO OFF

REM
REM Find all files in a given local working-copy that are NOT under version-control
REM

C:\bin\SlikSvn\bin\svn status S:\SVNLocal | find “? ” | find /v “\bin” | find /v “\obj” | find /v “.vs” | find /v “btproj.user” | find /v “csproj.user” | find /v “\UpgradeLog” | find /v “.btp.cs” | find /v “.xsd.cs” | find /v “.btm.cs” | more
——————————-

The files excluded by the various FIND commands needs to be adapted to the type of files you work with. The command above was create for Biztalk development.

Inspired by SO

Limit number of simultaneous connections to a WCF host

General method (works also for HTTP)

BizTalk MaxConnections

BizTalk enables users to configure WCF host to limit the maximum connections to a particular address.

The connectionManagement element in the btsntsvc.config file is designed to specify the number of connections to a given address. By default BizTalk allows for 2 connections for any given WCF host.

How to limit number of connections

https://stackoverflow.com/questions/3591283/biztalk-how-to-limit-number-of-connections-to-a-wcf-service

Throttling

https://docs.microsoft.com/en-us/biztalk/technical-guides/optimizing-biztalk-server-wcf-adapter-performance

Add the ServiceThrottlingBehavior service behavior to a WCF-Custom or WCF-CustomIsolated Receive Location and use the following settings:

PDF generation from C#

The free (MIT License) library PDFSharp can generate PDFs programmatically using C#.

It cannot (itself) convert HTML to PDFs, but some 3rd party solutions exist for that purpose

HTML to PDF using PDFSharp

It can also handle some CSS (but it requires a specific syntax – ie. not all valid CSS is usable here)


Another option is Essential Objects PDF which contains an inbuilt HTML->PDF converter. This is NOT free, but an evaluation version is available.

It works very well, but contains an entire HTML engine, and hence, consumes quite a lot of memory. So much in fact, that you have to put a limit to the amount of simultaneous executions if you use it in an integration-scenario

On the positive side, it generates PDFs which looks very nice

Subversion – get latest file but do NOT checkout

You may want to get the latest version of a file in a subversion repository, but NOT checking the file out (which will then create the .svn directory, enabling you to later on updating and committing changes)

To get the latest version of a Subversion file – enabling you to update and commit afterwards:

svn checkout URL PATH

To only get the latest version of a Subversion file – NO updates and commits possible (a so-called unversioned tree):

svn export URL PATH

Where are Windows Sticky Notes stored in the filesystem

Windows Sticky Notes in the filesystem / How to back them up

In Windows 7, they were stored in a propritary binary format here:

%AppData%\Microsoft\Sticky Notes\StickyNotes.snt

In Windows 10 they are stored in a SQLite database her:

%LocalAppData%\Packages\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe\LocalState\plum.sqlite

https://www.winhelponline.com/blog/recover-backup-sticky-notes-data-file-windows-10/