Thursday, July 19, 2018

Removing disk appeared after big Windows 10 update

After big Windows 10 new disk appeared. This is drive with data needed for Windows Recovery. Earlier it was hidden and now it is visible as normal drive.
Problem is that disk is full of data and Windows regulary warns about no free disk space on it. To solve it you should not delete partition, it is enough to unassign driver letter from it Taken from here.
I just wonder why this 'wanrning' feature is not disabled on this disk?

  1. Select the Start  button, type cmd, select and hold (or right-click) Command Prompt in the list of results, and then choose Run as administrator.
  2. In the Administrator: Command Prompt window, type diskpart, then press Enter.
  3. Type list volume, then press Enter. Note the volume number (Volume ###) for the drive letter (Ltr) you want to remove. 
  4. Type the following command, where [volume number] is the volume number you noted in the previous step, then press Enter:

         select volume [volume number] 
  5. Type the following command, where [drive letter] is the drive letter you want to remove, then press Enter:

         remove letter=[drive letter] 
  6. The drive letter will no longer appear in File Explorer and Disk Management. You may close the command prompt window.

Tuesday, June 26, 2018

Permanent disabling digital signature requirement for drivers in Windows 10

Windows 10 x64 (and also some other versions of  Windows) requires that drivers which are going to be installed must have digital signature. Certificates chain should contains Microsoft Root certificate.
 This is good for security, but not convinient for drivers developers who should build and test drivers.

To disable this requirement temporary (until Windows reboot) Press and hold 'Shift' key, then choose 'Reboot' in Windows main menu. Then in service menu choose 'additional' variants and find option 'Disable driver signature verification'. Again : it will work until next Windows reboot.

In order to make this permenent : open console with Administrator permissions and execute two commands:

> bcdedit /set testsigning on

and

> bcdedit /set nointegritychecks on

Important! If these commans will fail, then reboot, go to BIOS and disable  'Safe Boot' option !

Formats of PublicKey in Eliptic Curve Cryptography (ECC)

In ECC public key is a point on curve with coordinates (x,y)

In uncompressed format it is 65 bytes : [0x04] [32 bytes of X] [32 bytes of Y]

But as long as X can be delivered from Y, you can omit Y. It is called 'compressed format':

[02 if Y is even | 03 if Y is odd] [32 bytes of X]

Total 33 bytes long.

If key is only  32 bytes long -- then it is just point X. If you'll add  02 or 03 in front then you'll get  compressed format - which can be used in different Crypto APIs.

How to start / stop Linux service manually

To start or stop service, execute command:


$ sudo service <service-name>  [ start | stop ]

How to add Linux service to autostartup

If you wish that your service would start during Linux boot, you have to execute following commands:


sudo update-rc.d <service-name> defaults
 
This should add the service to the automatic startup system. But if you get:
System start/stop links for /etc/init.d/<service-name> already exist.

Execute the command:


sudo update-rc.d <service-name> enable

How to add pm2 service (node.js) to autostartup

If you wish that your node.js service which is under monitoring of 'pm2'  tool will be started automatically during system start, you have just to execute following command from service folder:


$ pm2 startup

How to refresh service list on Ubuntu


After adding new service in /etc/init.d/ you should refresh service list by executing following command:


$ systemctl daemon-reload