Windows: Difference between revisions

From David's Wiki
No edit summary
 
(22 intermediate revisions by the same user not shown)
Line 2: Line 2:


==Bash==
==Bash==
Download [https://gitforwindows.org Git for Windows] to get a copy of Git Bash.


* [https://gitforwindows.org Git for Windows] - this is a modified version of MSYS2
* [https://www.msys2.org/ MSYS2]
* [[Cygwin]]
* [[Windows Subsystem for Linux]] - WSL2 is a full linux VM


==Blue Screen==
==Blue Screen==
How to troubleshoot BSOD (Blue Screen of Death).<br>
How to troubleshoot BSOD (Blue Screen of Death).<br>
* When windows encounters a BSOD, it will create a minidump (.dmp) file in
* When windows encounters a BSOD, it will create a minidump (.dmp) file in <code>C:\Windows\Minidump</code>.<br>
<code>C:\Windows\Minidump</code>.<br>
* Copy out this dump file to somewhere like your desktop.<br>
* Copy out this dump file to somewhere like your desktop.<br>
* There are various software to open the minidump files such as [https://www.microsoft.com/en-us/p/windbg-preview/9pgjgd53tn86 WinDbg Preview] and [https://www.nirsoft.net/utils/blue_screen_view.html BlueScreenView],
* There are various software to open the minidump files such as [https://www.microsoft.com/en-us/p/windbg-preview/9pgjgd53tn86 WinDbg Preview] and [https://www.nirsoft.net/utils/blue_screen_view.html BlueScreenView],
* Typically, blue screens are caused by driver crashes in my experience. Windbg preview will point out the driver which crashed from the minidump.


===WinDbg Preview===
===WinDbg Preview===
Line 16: Line 19:
* Open your minidump
* Open your minidump
* Type <code>!analyze -v</code>
* Type <code>!analyze -v</code>


==Hosts file==
==Hosts file==
[[Wikipedia: hosts (file)]]<br>
[[Wikipedia: hosts (file)]]<br>
<code>%SystemRoot%\System32\drivers\etc\hosts</code>
<code>%SystemRoot%\System32\drivers\etc\hosts</code>
==Changing IDE/RAID/VMD to AHCI==
[http://triplescomputers.com/blog/uncategorized/solution-switch-windows-10-from-raidide-to-ahci-operation/ Reference]<br>
If you are not using Intel RAID, you should be using ACHI instead of IDE or RAID.<br>
* Run <code>bcdedit /set {current} safeboot minimal</code> in a cmd prompt with admin
* Change to ACHI in UEFI. On newer boards, it may be known as Intel VMD.
* Run <code>bcdedit /deletevalue {current} safeboot</code>
;Drawbacks of Intel RAID (also known as Intel VMD)
* It is a proprietary software raid by the Intel driver which does not work with Linux.
* You may run into problems when changing motherboards, and sometimes even just after updating the bios.
==Application Management==
===Winget===
[https://learn.microsoft.com/en-us/windows/package-manager/winget/ Docs]
Winget is included in [https://www.microsoft.com/p/app-installer/9nblggh4nns1#activetab=pivot:overviewtab App Installer]
===Chocolatey===
[https://chocolatey.org/ Chocolatey] is an open source package manager for windows.<br>
Install Chocolatey by following the directions on [https://chocolatey.org/install https://chocolatey.org/install].
<pre>
# Installs ffmpeg
choco install ffmpeg
# Upgrade all
choco upgrade all
# See installed packages
choco list --localonly
</pre>
==Event Viewer==
===See Reason for last Restart===
* Go under <code>Windows Logs</code>-<code>System</code>.
* Filter with Event sources: User32
==Windows Update==
===Prevent Auto-restarts===
Auto-restarts are easily the worst part about windows. They happen even if you're doing something such as training a model or other data processing. 
See the long complaint thread at [https://answers.microsoft.com/en-us/windows/forum/all/disable-windows-10-automatic-restart-after-updates/16f1826d-a796-4de8-ac99-1d625420d265?auth=1 https://answers.microsoft.com/en-us/windows/forum/all/disable-windows-10-automatic-restart-after-updates/16f1826d-a796-4de8-ac99-1d625420d265?auth=1].
From [https://gist.github.com/JimmyAppelt/1b85b518c7fd44b6742fe2aafa17b646 JimmyAppelt/disableWinRestartOnUpdate.md]
# Run <code>gpedit.msc</code>
# In the Local Group Policy Editor, go to
#:<pre>Computer Configuration -> Administrative Templates-> Windows Components-> Windows Update</pre>
# Double-click on “No auto-restart with automatic installations of scheduled updates”.
# Select "Enabled", and then click "OK".
;Notes
* I'm not 100% sure if this works.
* Group policies are only available on Windows 10 Pro.

Latest revision as of 15:30, 3 May 2023


Bash

Blue Screen

How to troubleshoot BSOD (Blue Screen of Death).

  • When windows encounters a BSOD, it will create a minidump (.dmp) file in C:\Windows\Minidump.
  • Copy out this dump file to somewhere like your desktop.
  • There are various software to open the minidump files such as WinDbg Preview and BlueScreenView,
  • Typically, blue screens are caused by driver crashes in my experience. Windbg preview will point out the driver which crashed from the minidump.

WinDbg Preview

How to use WinDbg preview

  • Open your minidump
  • Type !analyze -v

Hosts file

Wikipedia: hosts (file)
%SystemRoot%\System32\drivers\etc\hosts

Changing IDE/RAID/VMD to AHCI

Reference
If you are not using Intel RAID, you should be using ACHI instead of IDE or RAID.

  • Run bcdedit /set {current} safeboot minimal in a cmd prompt with admin
  • Change to ACHI in UEFI. On newer boards, it may be known as Intel VMD.
  • Run bcdedit /deletevalue {current} safeboot
Drawbacks of Intel RAID (also known as Intel VMD)
  • It is a proprietary software raid by the Intel driver which does not work with Linux.
  • You may run into problems when changing motherboards, and sometimes even just after updating the bios.

Application Management

Winget

Docs Winget is included in App Installer

Chocolatey

Chocolatey is an open source package manager for windows.

Install Chocolatey by following the directions on https://chocolatey.org/install.

# Installs ffmpeg
choco install ffmpeg

# Upgrade all
choco upgrade all

# See installed packages
choco list --localonly

Event Viewer

See Reason for last Restart

  • Go under Windows Logs-System.
  • Filter with Event sources: User32

Windows Update

Prevent Auto-restarts

Auto-restarts are easily the worst part about windows. They happen even if you're doing something such as training a model or other data processing.
See the long complaint thread at https://answers.microsoft.com/en-us/windows/forum/all/disable-windows-10-automatic-restart-after-updates/16f1826d-a796-4de8-ac99-1d625420d265?auth=1.

From JimmyAppelt/disableWinRestartOnUpdate.md

  1. Run gpedit.msc
  2. In the Local Group Policy Editor, go to
    Computer Configuration -> Administrative Templates-> Windows Components-> Windows Update
  3. Double-click on “No auto-restart with automatic installations of scheduled updates”.
  4. Select "Enabled", and then click "OK".
Notes
  • I'm not 100% sure if this works.
  • Group policies are only available on Windows 10 Pro.