-
Notifications
You must be signed in to change notification settings - Fork 21
/
howto
1040 lines (652 loc) · 27.3 KB
/
howto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Note: These are my internal howto receipes, some of them might
be obsolete while others just work in my setting. If you need
help installing windrbd, please see the file INSTALL or contact
[email protected] for professional support.
- Johannes
---------------------------------------------------------------------
Building and "insmod" DRBD windows driver:
1.) Run
make
on the Linux box (from $HOME/Linbit/Work/wdrbd9)
2.) Run
make
on the Windows box (from $HOME/Linbit/Work/wdrbd9 (takes some while)
3.) Run
make install
on the Windows box (from $HOME/Linbit/Work/wdrbd9/converted-sources/drbd)
4.) Run (in an Administrator cmd.exe Console: to open it go to
C:\Windows\System32 in Explorer, Cmd-Click on cmd.exe
and select Run as Administrator)
INSTALL-DRBD-admin.bat
5.) To load the driver, do (from Adminstrator Console)
sc start drbd
DbgViewer will show output. To start DbgViewer go to
C:\drbd\DebugViewer and start DbgView.exe as Administrator
from Windows to Mac:
Start -> In Text field:
\\192.168.56.1
Right click: Cmd+Click
Gruppenrichtline: Start, type Gruppenrichtlinie
search cmd.exe - right click (Cmd+click) and select run as administrator
then
pnputil -a drbd.inf
eventvwr linbit-wdrbd
DebugView
C:\drbd\dbgview\DbgView.exe as Administrator
---
List physical (also non partitioned) drives:
wmic diskdrive list
wmic diskdrive list brief
---
Reconnect z: (/home/johannes/Linbit on Ubuntu 14.03 machine):
net use z:
---
partition manager:
System und Sicherheit / Verwaltung / Festplattenpartitionen erstellen und formatieren
---
BSOD:
codes at https://www.lifewire.com/blue-screen-error-codes-4065576
1 Memory referenced
2 IRQL at time of reference
3 0: Read 1: Write 8: Execute
4 Address that referenced memory
----
Disable checksum offloading:
sudo ethtool -K eth1 rx off
sudo ethtool -K eth1 tx off
----
Resolve split brain:
sudo drbdadm connect --discard-my-data w0
jt/fix-multipage-io
Linux invalidate read cache (sync does push write cache)
sudo blockdev --flushbufs /dev/drbd26
sudo blockdev --flushbufs /dev/sdb1
Windows self extracting EXE generator:
iexpress.exe
device minor 5 name "C:\\foo\\bar";
device minor 5 name "H:";
drbd_sender.c:make_resync_request()
----
Make versioninfo work:
change path specs in .git file (not dir) in submodules to
relative path.
----
Sign with Linbit certificate (now integrated in Makefile, ignore this
section):
copy unsigned drbd.sys and drbd.cat to Windows 10: C:\to-sign
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\signtool.exe" sign /v /ac "C:\cert\DigiCert High Assurance EV Root CA.crt" /a /t http://timestamp.digicert.com "c:\to-sign\drbd.cat"
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\signtool.exe" sign /v /ac "C:\cert\DigiCert High Assurance EV Root CA.crt" /a /t http://timestamp.digicert.com "c:\to-sign\drbd.sys"
copy files back to $LINBIT_COMPILE_DIR/signed
Use windrbd-install-signed.SED.in to build package (will take drbd.sys and
drbd.cat from signed directory).
-----
Make releases
-------------
Update: Driver signing has changed. We use Microsoft partner
center and HLK Studio to obtain a Microsoft signature, this
makes WinDRBD also load on SecureBoot systems. So most of
the following can be ignored.
Update: can now be built with Windows 10 physical machine, which
makes everything much more easy.
Run cygwin update
Update cygwin1.dll to newest version (in inno-setup/cygwin-binaries)
git checkout master
git merge jt/latest-feature-branch
On Linux:
make clean && make V=1
And check in converted-sources if source changed (git diff)
Document changes in WHATSNEW.md
Add entry to README.md
git add README.md
git commit -m "Release 1.0.X"
git tag windrbd-1.0.X
git describe --tags
(should display the version number)
build drbd-utils-windows (make package takes drbdadm, ... from build dir)
On Windows 10 physical machine (with USB dongle attached):
mount ewdk (double click EWDK_rs5_... ISO on Desktop)
make clean && make package R=1
upload install-windrbd-1.0.X-signed.exe to google drive windrbd-in folder
git push --all origin
git push --tags origin
phil:
git push master github
git push master github --tags
copy signed exe to website
johannes:
EMail to [email protected]
-----
Upgrade DRBD
cd drbd
git checkout drbd-9.0
git pull
git checkout <hash of version msg is prepare ...>
cd drbd/drbd-headers
git checkout master
git pull
git submodule update
cd ..
git commit -a
and adapt patches to new version.
----
Partitionieren:
Windows+R:
diskmgmt.msc
----
Delete NTFS partition
dd if=/dev/zero of=/dev/sdXY bs=512 count=1
/dev/sd muss stimmen!! Achtung bei alten windows versionen aendert sich
das zwischen reboots.
-----
Disconnect network share:
net use y: /delete
-----
View Generic Script Failover Clustering logs:
Event Viewer (Start / Windows Administrative Tools / EventViewer)
In the tree, select:
Event Log / Applications and Services Log / Microsoft / Windows / Failover Clustering / Diagnostics
-------
make new windows boot menu entry:
bcdedit /copy {default} /d "DRBD"
bcdedit /enum all
-----
Diskless client over TCP/IP
When booting directly (image mounted as disk): remove windrbd.sys driver:
cd Linbit/tmp
sudo mount /dev/sdf2 mnt/
rm mnt/Windows/System32/drivers/windrbd.sys
sudo umount mnt
Installing driver via Linux:
cd Linbit/tmp
sudo mount /dev/sdf2 mnt/
cp ../windrbd/converted-sources/drbd/windrbd.sys mnt/Windows/System32/drivers/windrbd.sys
sudo umount mnt
(or:
cp ../inf-files/windrbd-bootc.sys mnt/Windows/System32/drivers/windrbd.sys
)
(does not touch registry)
# create a small text file to make sure it is the right image:
# copy con xxx.txt
# 123^Z
sudo chmod o+rw /dev/sdf
sudo drbdadm up tiny-windows-disk
# adjust IP address of peer in DRBD config:
sudo vi /etc/drbd.d/tiny-windows-boot.res
sudo drbdadm up tiny-windows-boot
sudo drbdadm up tiny-windows-system
# linux:
# nc -p 5000 -l -k | tee /tmp/ipxe.log
Power on Diskless Client VM
Press Ctrl-B to interrupt iPXE
dhcp net1
boot http://192.168.56.102/~johannes/ipxe/ipxework.pxe
Press Ctrl-B again
dhcp net1
sanboot http://192.168.56.102/cgi-bin/drbd.cgi
-----
Build ipxe
make DEBUG=drbd && cp bin/ipxe.pxe ~/public_html/ipxe/ipxework.pxe
# make DEBUG=sanboot,int13,httpcore:2,httpblock,blocktrans:2,xfer,xferbuf && cp bin/ipxe.pxe ~/public_html/ipxe/ipxework.pxe
# 64 bit version can boot 32 GB images
make bin-x86_64-pcbios/ipxe.pxe
# Use this from now on:
make && cp bin/ipxe.pxe ~/public_html/ipxe/ipxework.pxe
iPXE is configured via header files in src/config
make DEBUG=ibft:3,iscsi:3
sudo cp bin/ipxe.pxe /var/www/html/ipxe/ipxe-iscsi.pxe
make DEBUG=ibft:3,iscsi:3,int13:3,drbd:3
make DEBUG=ibft:3,drbd:3
-----
Windows Server 2016: empty password: Start->Windows Verwaltungstools->Lokale Sicherheitsrichtlinie->Kontorichtlinien->Kennwortrichtlinien->Alter auf 0, Komplexit ausschalten.
-----
Change hostname
sysdm.cpl → Computer Name → Change → More... has a "Primary DNS suffix" option, which might be helpful here.
(and reboot)
--------
Disable automatic upgrades on Ubuntu:
$ sudo -e /etc/apt/apt.conf.d/10periodic
Add line:
APT::Periodic::Unattended-Upgrade "0";
-------
Enable kernel serial console logging
vi /etc/default/grub
GRUB_CMDLINE_LINUX="console=ttyS0,38400n8"
sudo update-grub
sudo reboot
And log /dev/pts/X on much/vamp to file (Simon)
----------
Dump memory from virtual box VM:
/usr/local/bin/vboxmanage debugvm "WinDRBD 2" dumpvmcore --filename Win7Lockup.elf
Then look for SPINLOCK:
strings Win7Lockup.elf | grep SPINLOCK -A 5 | tee spinlocks-win7.txt
-----
Dump memory from DisklessClient (has a terminating space):
/usr/local/bin/vboxmanage debugvm {d3dc244a-ad1f-47c2-a774-7bf04576541d} dumpvmcore --filename DisklessBootNoRootDevice.elf
-----
Enable driver verifier:
verifier /standard /driver windrbd.sys
-------
Installing and configuring DHCP server (Ubuntu)
sudo apt-get install isc-dhcp-server
(sudo apt-get -o Acquire::ForceIPv4=true install isc-dhcp-server)
sudo vi /etc/dhcp/drbdd.conf
Add:
The options from
http://ipxe.org/howto/dhcpd#pxe_chainloading
And further down:
# solution works 'for me'. It tests for iSCSI, where sanboot http://...
# is sufficient. iscsi seems to be closely related to sanboot. The
# off the shelf VirtualBox iPXE build does not have iscsi enabled,
# therefore we load a custom built image which then executes the
# sanboot command.
if exists ipxe.iscsi {
filename "";
option root-path "http://192.168.56.102/cgi-bin/drbd.cgi";
} else {
filename "http://192.168.56.102/~johannes/ipxe/ipxework.pxe";
}
Also add windrbd-root option:
option ipxe.windrbd-root code 196 = string;
After changes restart dhcp server with
sudo service isc-dhcp-server restart
DisklessClient should now boot into windows without need to type
boot commands.
Configure fixed IP Address:
host diskless-client {
hardware ethernet 08:00:27:b2:a9:32;
fixed-address 192.168.56.150;
}
Configure dynamic range (don't do this, DRBD needs a fixed address):
subnet 192.168.56.0 netmask 255.255.255.0 {
range 192.168.56.160 192.168.56.250;
}
Not sure yet how it works with 2 networks (iPXE of VirtualBox seems
not to try the second network if something with the first network
fails, however this works with the custom built iPXE)
To make dhcp work the network adapter must be allowed promiscious
mode (see advanced settings of network adapter in VirtualBox network
adapter settings).
-------
Disable page file with Windows (captions may differ I have a German
Windows):
Open cmd.exe as Administrator
SystemPropertiesAdvanced.exe
Then under Advanced Tab click the Performance button (topmost)
Then under Advanced Tab / Virtual Memory / No page file
----
Avoid chmod of /dev/sdf:
Add www-data user to group disk
Or better add an extra group for drbd devices and use udev(?) to
control the device node.
-----
Temporary format of 'drbd' URI: no colons since they are used by
IPv6 addresses.
drbd:<res>;<proto>;<num-nodes>;<my-ip>;<my-minor>;<my-volume>;<peer-name>;<peer-node-id>;<peer-address>
----
Build documentation:
make tech-guides-pdf-finalize-docker
View documentation
evince tech-guides/output-pdf/windrbd.pdf
-----
Booting
See the tech-guide on booting
Neccessary steps:
Install WinDRBD Bus driver
Device manager: add legacy hardware: windrbd.inf
Install WinDRBD Disk driver
(else will not call START_DEVICE PnP request)
To do so install windrbd with boot device and wait for
primary disabled and do Update driver software in
device manager (windrbd-disk.inf).
Do a drbdadm up of a dummy device (does not need to
have backing storage or connection)
TODO: Maybe it is also possible to just doubleclick the
inf file which makes things far more easier.
Install windrbd driver with boot and wait for primary in
windrbd I/O requests (not windrbd_pnp, but windrbd_create)
# Also: Disable UDP logging (NO_NET_PRINTK) in printk-to-syslog
Enable NIC driver
E1 something for my VirtualBox
Enable AFD driver (unclear if really needed)
Enable Broadcom drivers (unclear if really needed)
Currently: Assign a fixed IP address (must match the one in DRBD
config). TODO: which driver to load on boot to make
DHCP work?
Also Disable Network Discovery (else there is a short time gap
in which network is down and Windows needs to access
boot device in order to continue):
(from https://social.technet.microsoft.com/Forums/en-US/675520ed-fe25-455e-a86e-fdb833903b10/windows-takes-an-exceptionally-long-time-to-establish-a-network-connection-after-booting
Control Panel\Network and Internet\Network and Sharing Center\Advanced sharing settings
Turn OFF network discovery
Disable NDIS lightweight filter for boot NIC:
https://support.microsoft.com/en-us/help/976042/windows-may-fail-to-boot-from-an-iscsi-drive-if-networking-hardware-is
Not clear if that really helps .. still there is a 90 seconds
(at least) delay.
----
Windows 10: to access network share as guest:
Windows-R gpedit.msc
Computer Configuration -> Administrative Templates -> Network -> Lanman Workstation Enable insecure guest logons Set to Enabled and click Ok
-----
Windbg:
Connect Windows VMs via host pipe serial port.
On target (see https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/setting-up-a-null-modem-cable-connection)
bcdedit /debug on
bcdedit /dbgsettings serial debugport:1 baudrate:115200
Start windbg on debug host (it crashes on connect, just restart
it with Kernel debug ... (Ctrl-K)) after it crashed, then it should
connect.
File -> Symbol search path (net use y: \\192.168.56.102\Linbit):
srv*;Y:\windrbd\windrbd\src;Y:\windrbd\converted-sources\drbd
srv*;Y:\windrbd-debug\win4lin\src;Y:\windrbd-debug\converted-sources\drbd
srv*;Y:\windrbd-backing-dev-cache\windrbd\windrbd\src;Y:\windrbd-backing-dev-cache\windrbd\converted-sources\drbd
srv*;Y:\windrbd-1.0.0-rc13-45\windrbd\src;Y:\windrbd-1.0.0-rc13-45\converted-sources\drbd
srv*;Y:\windrbd-1.1-branch\windrbd\windrbd\src;Y:\windrbd-1.1-branch\windrbd\converted-sources\drbd
srv*;Y:\windrbd-32bit-server2003\windrbd\windrbd\src;Y:\windrbd-32bit-server2003\windrbd\converted-sources\drbd
srv*;Y:\windrbd-1.1.6\windrbd\windrbd\src;Y:\windrbd-1.1.6\windrbd\converted-sources\drbd
Set the homedir:
!homedir C:\Windows\Temp
(and redo .reload to load symbols from server)
Very useful:
!stacks
List all thread contexts.
.thread fffxxxxxxx
Switch context to thread (number displayed in !stacks)
then
k
will display the new thread's backtrace.
print C expression
?? x
Force load of mismatched PDB:
.reload /i /f /v windrbd.sys
search memory
s -a 0xfffff804`11746100 0xfffff804`11846100 "RtlZ"
-----
netsh:
Turn off firewall:
NetSh Advfirewall set allprofiles state off
Check status:
Netsh Advfirewall show allprofiles
# Turn off firewall in Windows PE:
wpeutil disablefirewall
-----
kpartx -a /dev/drbdN
creates a /dev/dm-X for each partition on /dev/drbdN
those then can be mounted like any other disk.
kpartx -d /dev/drbdN
removes /dev/dm-X for each partition on /dev/drbdN
needed before drbdadm down.
Document this is some user's guide.
----
iISCSI:
sudo apt-get install istgt
copy config files from /usr/share/doc/istgt/examples/
gunzip istgt.cont
dd if=/dev/zero of=filename bs=1024 size=$[ 50*1024 ]
edit in /etc/istgt/istgt.conf
PortalGroup1 IP Address
InitiatorGroup1 Netmask
LogicalUnit1 Storage (filename and size)
sudo istgt -D
sudo istgt -D -t all
sudo apt-get open-iscsi
sudo iscsi_discovery 192.168.56.102
sudo iscsistart -i test -t iqn.2007-09.jp.ne.peach.istgt:disk1 -g 1 -a 192.168.56.102
sudo iscsiadm -m node -T iqn.2007-09.jp.ne.peach.istgt:disk1 -p 192.168.56.102:3260
sudo iscsiadm -m node -T iqn.2007-09.jp.ne.peach.istgt:disk1 -p 192.168.56.102:3260 --login
Then /dev/sdm exists: can mount it:
sudo mount /dev/sdm mnt
sudo iscsiadm -m node -T iqn.2007-09.jp.ne.peach.istgt:disk1 -p 192.168.56.102:3260 --logout
----
iSCSI via iPXE:
dhcp net0
sanboot -k iscsi:192.168.56.102::::iqn.2007-09.jp.ne.peach.istgt:disk1
# sanboot iscsi:192.168.56.102::::iqn.2007-09.jp.ne.peach.istgt:disk1
# sanboot iscsi:192.168.56.102:::1:iqn.2007-09.jp.ne.peach.istgt:disk1
----
clone vdi:
vboxmanage clonevdi '/Volumes/Linbit WDRBD/Linbit/WinDRBDNew2019/Snapshots/{b83d7f0d-2a91-49be-b876-bed6fb3fe20e}.vdi' ./WinDRBDRemoteBoot/WinDRBDRemoteBoot.vdi
Where the source is the latest snapshot VDI.
-----
debugger load symbols:
.reload /i windrbd.sys
forces symbols that do not match (they match but WinDbg thinks they don't
match).
-------
Create failover cluster (Windows HA)
https://docs.microsoft.com/en-us/windows-server/failover-clustering/create-failover-cluster#install-the-failover-clustering-feature
Active Domain:
https://www.whitewinterwolf.com/posts/2017/09/26/how-to-create-an-active-directory-domain/
In the Server Manager (it should automatically open when opening a session, otherwise it can be found in the Start menu), click on Add roles and features, and enable both Active Directory Domain Services and DNS Server roles.
Once the new roles have been installed, you must promote the server as a Domain Controller. On the top bar of the Server Manager you should see a warning sign (➀), click on it then on the Promote this server to a domain controller link (➁).
Must configure DNS when adding Computers to domain (Windows uses DNS to find
the Domain Controller). (Adapter Settings / IPv4 Properties)
------
https://answers.microsoft.com/en-us/windows/forum/windows_10-update/can-i-disable-updates-using-windows-10-enterprise/1b4bb42d-355f-41f7-9954-8b2a78a4debc
Windows 10 Enterprise includes advanced options for disabling Windows Updates.
Press the Windows key + R then type gpedit.msc and click OK.
Go to Computer Configuration > Administrative Templates > Windows Components > Windows Update.
Double-click Configure Automatic Updates.
Select Disabled in Configured Automatic Updates on the left, and click Apply and OK to disable the Windows automatic update feature.
--------
Find ethernet address:
virsh dump-xml <domain>
plug/unplug network cable:
virsh domif-setlink meine-windoof-vm de:ad:ba:ba:06:66 down
---------
create large backing devices (up to 512? tb):
VBoxManage createhd --filename 64tb-win10-diskless-boot.vdi --size $[ 64*1024*1024 ] --format VDI --variant Standard
---------
Install DigiCert SafeNetAuthentication Client:
https://www.digicert.com/kb/code-signing/safenet-client-installation.htm
------
From support chat:
https://www.digicert.com/StaticFiles/SafeNetAuthenticationClient-x64.msi
2:24
https://www.digicert.com/StaticFiles/SafeNetAuthenticationClient-x32.msi
Few things to note:
1) Make sure you are not on a Virtual Machine or remote accessing the device you are installing the token.
2) With the token plugged into the device go to Device manager and uninstall all Aladdin, Rainbow Microsoft USBCCID, Safenet and the USB token under “Universal Bus Controllers” and any related categories ("Smart Card Readers").
3) Unplug Token.
4) Uninstall Safenet drivers from the programs.
5) Reboot the device
6) Reinstall the latest Safenet drivers as administrator.
7) Re plug in token.
-------------------
From:
https://www.tenforums.com/tutorials/69012-enable-disable-bsod-automatic-restart-windows-10-a.html
Disable reboot after blue screen.
Press the Win + R keys to open Run, type SystemPropertiesAdvanced.exe into Run, and click/tap on OK to open advanced System Properties.
Click/tap on the Settings button under Startup and Recovery
Check (enable - default) or uncheck (disable) the Automatically restart box under System failure for what you want, and click/tap on OK.
-----------------------
Run a test from testsuite:
./run.py wintestubuntu linbit-wdrbd-2020 -r resize
right now fails because lvs does not exist on cygwin.
-------------------------
Control firewall: enable IPv4 pings:
netsh advFirewall Firewall add rule name="OSRadar Rule PING IPv4" protocol=icmpv4:8,any dir=in action=allow
------------------------
Install HLK controller:
Make a snapshot
Must be an English Server 2016
Download file: make sure it is the version for Windows Server 2016
Run as Administrator
Revert to snapshot if installation failed (else a follow up
installation will fail).
-----------------------
Allow a port from command line:
netsh advfirewall firewall add rule name=test1 protocol=tcp dir=in localport=5000 action=allow
------------------------
DigiCert change password:
https://www.digicert.com/kb/code-signing/ev-code-signing-secure-token-set-up.htm
------------------------
Make mouse work:
Goto Windows Contol Panel / Mouse Properties / Pointer Options / Enhance Pointer Precision
Or Settings / Mouse / Additional Mouse Options / Pointer Options / Enhance Pointer Precision
Uncheck it and click Apply
------------------------
Howto disable automatic updates in Server 2016:
open cmd
sconfig
press 5<enter>
press m<enter>
press 15<enter> to exit sconfig
---------------------------
Howto disable Internet Explorer safety checks:
Close all IE Windows.
Open Server Manager / Local Machine / Internet explorer safety (or so) turn off.
----------------------------
socat via network:
on one node (example vamp.linbit):
socat /dev/pts/1,raw,echo=0,crnl TCP4-LISTEN:5567,crnl,forever
on other node:
socat /dev/pts/2,raw,echo=0,crnl TCP4:vamp.linbit:5567,crnl,forever
----------------------------
How to show parameters of BSOD crash (Windows 10 / Server 2016 and 2019)
Windows 10 disable bsod smiley
Open the Registry editor.
Navigate to the following registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\CrashControl
Tip: See how to open the desired registry key with one click.
Create a new DWORD value named DisplayParameters and set to 1.
-----------------------------
DRBD manpage
man /home/johannes/Linbit/drbd-utils-build-manpages/drbd-utils/documentation/v9/drbd.conf.5
-----------------------------
Build drbd on Ubuntu Linux:
Need cocci must build cocci from source (for most distros)
# Ubuntu 16.04:
sudo apt install pkg-config ocaml-native-compilers ocaml-findlib menhir libmenhir-ocaml-dev libpcre-ocaml-dev libparmap-ocaml-dev
# Ubuntu 18.04:
sudo apt-get install pkg-config ocaml-native-compilers ocaml-findlib menhir libmenhir-ocaml-dev libpcre-ocaml-dev libparmap-ocaml-dev libncurses5-dev ocaml-base-nox-4.05.0 ocaml-interp dpkg-dev libdpkg-perl libfindlib-ocaml ocaml-compiler-libs libparmap-ocaml-7sma4 libpcre-ocaml-2h5n2 linux-headers-4.15.0-141 linux-modules-4.15.0-141-generic libtinfo-dev
git clone https://github.com/coccinelle/coccinelle.git
cd coccinelle
git checkout 1.0.8
./autogen
./configure
make
sudo make install
cd ..
git clone --recursive https://github.com/LINBIT/drbd.git
cd drbd
make
sudo make install
-------------
Howto tar without old installers (they take 2GB meanwhile):
tar cfz windrbd-1.0.0.rc16.tar.gz windrbd --exclude=install*.exe
--------------
Howto update cygwin binaries:
cd inno-setup/cygwin-binaries
for i in * ; do cp `which $i` . ; done
----------------
Network debugging:
On target computer: (Must do this everytime for each debug session)
Administrator@win02 /cygdrive/f/Program Files/Windows Kits/10/Debuggers/x64
$ ./kdnet 192.168.74.1 50000
Enabling network debugging on Intel(R) PRO/1000 MT Network Connection.
Manage-bde.exe not present. Bitlocker presumed disabled.
To debug this machine, run the following command on your debugger host machine.
windbg -k net:port=50000,key=t4kmmq9hibab.dq0ex0dbg0d4.3czg54idmf6fr.31v3hnule3b
3i
Then reboot this machine by running shutdown -r -t 0 from this command prompt.
windbg -k net:port=50000,key=t4kmmq9hibab.dq0ex0dbg0d4.3czg54idmf6fr.31v3hnule3b3i
windbg -k net:port=50000,key=t4kmmq9hibab.dq0ex0dbg0d4.3czg54idmf6fr.31v3hnule3b3i
New key:
./windbg -k net:port=50000,key=3lpt1rb2i2bk.st9arsvxn17s.4a1zuzyjj9ts.138h5jxsk3slg
Server 2016 VMs:
./windbg -k net:port=50000,key=340y3z0bxwz4a.1cu44q9m1w02m.jiwlyjmzhhzs.17py80bu9e99r
./windbg -k net:port=50000,key=340y3z0bxwz4a.1cu44q9m1w02m.jiwlyjmzhhzs.17py80bu9e99r
!! disable firewall or at least allow port (but most likely UDP it didn't work
with TCP !!
windbg -k net:port=50001,key=2bk3901yipjbz.3qxt07itly92e.2uwuwqzmrvhkg.2v7kvjtmzce9d
If there are more hosts to be debugged on the same network the port numbers
must differ (for example 50000 for a and 50001 for b). Then two hosts can
net debug each other ...
windbg -k net:port=50001,key=1wjw9rosga3jy.p1udlipefkas.u2pwjrtgy1g4.rxx8mttfmsdk
HLK client (from server 2019 datacenter jaenner 3)
windbg -k net:port=50000,key=2z1io9ycxxh2v.emxijaabaq01.spzt9bxb3lyc.3smqj0injt3d6
# New in June 2022:
'/cygdrive/e/Program Files/Windows Kits/10/Debuggers/x64/kdnet.exe' 192.168.77.2 50000
netsh advfirewall firewall add rule name=test1 protocol=udp dir=in localport=50000 action=allow
netsh advfirewall firewall add rule name=test1 protocol=tcp dir=in localport=50000 action=allow
windbg -k net:port=50000,key=2d7c6ijqer5sh.2i4twokqtuaj2.175m5lbeohllp.2gmbkv8c8
8r1o
10.43.224.48 (from 10.43.224.32):
windbg -k net:port=50001,key=1x44vmzro2dc4.1idcsmmecsg50.34pdqj7eo7pj9.22ocd7148g8qw
-----
Install HLK Client
net use w: '\\10.43.6.194\HLKInstall'
w:
cd Client
set TEMP='C:\Windows\Temp'
set TMP='C:\Windows\Temp'
setup.cmd
Open TCP/IP Port 1771 (or disable firewall)
------
Device mapper delay target:
echo "0 `blockdev --getsz /dev/mapper/slow_green-jt--delay--backingdev` delay /dev/mapper/slow_green-jt--delay--backingdev 0 500" | dmsetup create delayed
------
Cygwin for ReactOS:
https://morganwu277.github.io/2017/06/04/Setup-Cygwin-in-Windows-XP-2003/
start setup with -X from command line (ignores signatures (*.sig) which do
not exist in the archive. Then use
http://ctm.crouchingtigerhiddenfruitbat.org/pub/cygwin/circa/2016/08/30/104223
as mirror (must have to add it manually)
------
Start Windows 2003 32 bit build env (must install WinDDK 7.1 from Microsoft
homepage):
cmd /k 'C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ fre x86 WNET'
--------
Disable Screen blanking:
powercfg.cpl
then Change Plan settings / Turn off the display to Never and Save changes
--------
Disable prompt for trusting Linbit:
certutil -addstore "TrustedPublisher" linbit-trusted-cert.cer
-------
Run task on system startup:
schtasks /create /sc ONSTART /tn WinDRBD\StartHLKTest /tr C:\WinDRBD\starthlk.ba
t /ru system
schtasks /create /sc ONSTART /tn WinDRBD\CloudInitFake /tr C:\WinDRBD\cloudinitfake.bat /ru system
# or from bash:
schtasks /create /sc ONSTART /tn WinDRBD\\CloudInitFake /tr C:\\WinDRBD\\cloudinitfake.bat /ru system
be sure to set the path in the cmd file first:
set PATH=C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\cygwin64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\WinDRBD;C:\WinDRBD\usr\sbin;C:\WinDRBD\usr\bin;C:\WinDRBD\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
or so ...
---------------
Add swapspace to a Linux machine:
johannes@jt-ubuntu2021C:~$ sudo fallocate -l 16G /swapfile
johannes@jt-ubuntu2021C:~$ sudo chmod 600 /swapfile
johannes@jt-ubuntu2021C:~$ sudo mkswap /swapfile
Setting up swapspace version 1, size = 16 GiB (17179865088 bytes)
no label, UUID=fd5e0600-3335-47e7-b51f-4de2c227fc5d
johannes@jt-ubuntu2021C:~$ sudo swapon /swapfile
johannes@jt-ubuntu2021C:~$ htop
johannes@jt-ubuntu2021C:~$ vi /etc/fstab
johannes@jt-ubuntu2021C:~$ sudo vi /etc/fstab
(add line: