Tag Archives: Windows 11

How to Log in Windows Safe Mode

Motivation:

  • You get a blank screen after installing graphic driver on Windows 11 (e.g. Intel HD Graphics 520 graphic driver).
  • So you want to log in Windows safe mode to remove or disable the installed graphic driver.

Solution:

  1. Turn on your computer.
  2. When you see the Windows logo and circle progress, press the Power button and hold it for 10 seconds. You computer will be turned off.
  3. Turn on your computer again.
  4. When you see the Windows logo, if you do not see Preparing Automatic Repair or Please Wait message then press the Power button and hold it for 10 seconds again.
  5. Repeat the 3rd and 4th step until you see Preparing Automatic Repair or Please Wait message.
  6. Click Advanced options button.
  7. Click Troubleshoot button.
  8. Click Advanced options button.
  9. Click Startup Settings button.
  10. Click Restart button.
  11. Press number 4 or number 5 to enter Windows safe mode.

Solution for graphic driver issue:

This solution is useful when you want to use your computer as a server without proper Intel HD Graphics 520 graphic driver and control your computer via remote desktop connection.

  1. Log in Windows safe mode without networking.
  2. Install the latest graphic driver.
  3. Open Device Manager.
  4. Disable graphic driver.
  5. Log in Windows normal mode.
  6. Open Device Manager.
  7. Right click your display adapter and select Update driver.
  8. Select Browse my computer for drivers option.
  9. Select Let me pick from a list of available drivers on my computer option.
  10. Select Microsoft Basic Display Adapter.
  11. Enable graphic driver.
  12. Restart your machine.

 

 

Why Can’t You Install Windows 11 on Your Laptop?

Issue:

You have a laptop.
You want to install Windows 11 on the laptop.
However you got an unexpected error saying that you should visit https://aka.ms/WindowsSysReq for detail.
You visited the page but you are unsure what actually happened.

Solution:
  1. The first common reason is that you do not have TPM 2.0 hardware.

    Open Settings Update & Security > Windows Security > Device Security
    – If you do not see a Security processor section on this screen your PC may have a TPM that is disabled.
    – If you do see a Security processor section on this screen then click Security processor details, and verify that your TPM Specification sub-version is 2.0.
    If it is less than 2.0, your device does not meet the Windows 11 requirements.

    Trusted Platform Module (TPM) is an international standard for a secure cryptoprocessor, a dedicated microcontroller designed to secure hardware through integrated cryptographic keys. The term can also refer to a chip conforming to the standard.

    Trusted Platform Module provides
    – A hardware random number generator,
    – Facilities for the secure generation of cryptographic keys for limited uses.

    Usually you can enable or disable TPM in the BIOS of your laptop.
    If you have TPM 1.2, you can often update it to 2.0 by following the guide of your laptop providers. For example if you have a Dell laptop then you can check the guide here.

    If you get “The TPM is Owned.” issue when updating TPM 1.2 to 2.0 then you can check a guide here. (Press F12 after your laptop is reboot.)

  2. The second common reason is that your laptop processor has not been supported by Windows 11.

    Open Settings > System > (scroll down if needed) >  About.
    Search for processor name, e.g. i7-10610U.
    You should find your processor name here if it is supported. For example the Xeon E3-1505M processor has not been supported.

  3. You can also download PC Health Check app to verify these 2 issues or identify other potential issues.

  4. If you plan to install a fresh Windows 11 from an USB then you can ignore the processor support requirement.

 

 

How to Install Ubuntu and Windows as a Dual Boot

Motivation:

You are want to install Windows 10 and Ubuntu 18.04 (or Windows 11 and Ubuntu 22.04) as dual boot for completing some machine learning tasks.

Prerequisites:

You need to have a 8Gb USB stick.

Solution:

Step 1:

  • Note: You can skip this step if you are installing Windows 11 and Ubuntu 22.04.
  • Go to BIOS, select the UEFI option in Boot List Option.
  • Disable the Enable Legacy option ROMS option.
  • Disable Secure Boot.

Step 2:

  • Install Windows 10 or Windows 11.
  • Create a free partition for Ubuntu.

Step 3:

Step 4: Install Ubuntu.

  • Select Minimal installation option, Download updates while installing Ubuntu option on Updates and other software screen.
  • Select Install third-party software for graphics and Wi-Fi hardware option and enter a password on Updates and other software screen. This password will be used on first boot after install.
  • Select Something else on Installation type screen.
  • Select free space partition that you created for Ubuntu.
  • Click the + sign.

  • Create an EFI System Partition and set its size to be 552MB if it does not exist.
  • Create a swap area. Set its size to be twice as your RAM size, e.g. 65536Mb swap area for 32Gb RAM.
  • Create a Root partition. Set its size to be all the remaining free space to optimize your space.

  • Click Install Now button.
  • On first boot after install, select Enroll MOK.
  • Enter the password that you entered to install third party drivers.

 

 

 

How to Install a Clean Windows

Motivation:

Most of Windows machines are delivered with a limited Windows version and unnecessary preinstalled software.

You want to format the hard drive and install a fresh Windows that can be booted from UEFI secure boot to improve machine performance and stability.

Prerequisites:

You need to have a 8Gb USB stick and an ISO file of Windows 10, version 21H2 or Windows 11, version 23H2.

Solution:

Step 1: Backup your machine and create an USB recovery by entering “Create a recovery drive” text to the search box on the task bar and follow the instructions.

Step 2: Create a bootable USB with Windows installation files.

2.A. If you plan to install Windows 11 then you can use Windows 11 Installation Assistant to create a bootable USB (click Download Now link below Create Windows 11 Installation Media section).

2.B. If you plan to install Windows 10 then you can use the commands below to create a bootable USB.

  • Right click Windows logo, click Command Prompt (Admin).
  • Enter diskpart.exe, press Enter.
    DISKPART> list disk
    DISKPART> select disk 1 -- the USB disk should be selected, the number may be different in your machine.
    DISKPART> clean
    DISKPART> create partition primary size=1024
    DISKPART> select partition 1
    DISKPART> active
    DISKPART> format quick fs=fat32
    DISKPART> assign
    DISKPART> create partition primary
    DISKPART> select partition 2
    DISKPART> format quick fs=ntfs
    DISKPART> assign
    DISKPART> exit
  • Double click on the Windows ISO file to create a virtual drive.
    xcopy f:\sources\boot.wim d:\sources\ /s /e
    
    where 
    f: the virtual drive and 
    d: the USB fat32 partition.
    We copy only the f:\sources\boot.wim file to d:\sources\.
    
    robocopy f:\ d:\ /IS /S /XD sources
    
    where 
    
    f: the virtual drive and 
    d: the USB fat32 partition.
    We copy everything from f:\ to d:\ except the sources folder.
    
    xcopy f:* e:\ /s /e 
    
    where 
    f: the virtual drive and 
    e: the USB ntfs partition.

Step 3: Boot your laptop using the USB.

  1. Plug the USB to a machine.
  2. For a Dell laptop, power on the machine, press F12 until a one-time boot up menu appears. Select the option to boot the machine from the USB. (You may need to access BIOS to select the UEFI option for Boot Sequence, and select the AHCI option for SATA operation).
  3. For a Sony VAIO laptop, power off the machine, then press the Assist button to enter VAIOCare. Select the option to boot the machine from the USB. (You may need to access BIOS to enable the option to boot the machine from an USB).
  4. For a ThinkPad laptop, power on the machine, press F12 until a one-time boot up menu appears. Select the option to boot the machine from the USB. Alternatively go to Settings > Update & Security > Recovery, click the Restart now button under the Advanced setup section and follow the instructions to boot the machine from a USB.

Step 4: Install Windows.

  1. If your laptop is NOT officially supported by Windows 11, then on the first screen asking you to choose the language of your install, press Shift + F10 or Fn + Shift + F10 to open Command Prompt. Then type regedit and press Enter. Then locate HKEY_LOCAL_MACHINE\SYSTEM\Setup key. Then create a new LabConfig key. Then click on LabConfig key, and create 3 DWORD (32-bit) Values named BypassTPMCheck, BypassSecureBootCheck and BypassRAMCheck and set each to 1. Then close regedit and the Command Prompt, and continue the setup process.
  2. Follow the instructions to install Windows.
  3. Set Windows partition size to 123748Mb for DellXPS if you want to have a 120Gb C drive, or 614516Mb for DellPrecision if you want to have 600Gb C drive, or 819815Mb for ThinkPad if you want to have a 800Gb C drive.
  4. You can delete all the partitions, including MRP (Microsoft Reserved Partition – this is just a reserved partition for Windows later use if needed), ESP (EFI System Partition – this is where UEFI firmware files are stored to boot Windows), WINRETOOLS (Windows Recovery Environment (WinRE) Tools – this is where files for repairing or recovering Windows are stored), and PBR image (this is where original the manufacture Windows installation file  are stored) because you already created an USB recovery in the Step 1.

Step 5: Configure Windows without the Internet.

  1. Press Shift + F10 or Fn + Shift + F10 to open Command Prompt.
  2. Type oobe\bypassnro.
  3. Press Enter.
  4. Setup will reboot your computer and after reboot, you will get  I don’t have Internet option and Continue with limited setup option to skip the Internet requirement.

Step 6: Configure Windows.

  1. Change Computer Name, turn off System Restore, enable Remote Desktop,
  2. Change Time Zone.
  3. Add Wireless LAN Service feature for Windows Server 2019.
  4. For a Dell laptop, install Dell Wireless 1820A 1830 WiFi Driver. Set battery charge threshold value to 50% in BIOS.
  5. Turn on Network discovery and file sharing by clicking on Network icon on the left side of Explorer.
  6. Activate Windows.
  7. Disable Hibernation (powercfg.exe /h off).
  8. Configure Power options (Hard disk >> Turn of hard disk after: 0, Wireless Adapter Settings >> Power Saving Mode: Maximum Performance, Sleep >> Sleep after: 0).
  9. Uninstall unnecessary applications.
  10. Use the manage-bde -status command to show BitLocker status (There is a space between bde and status). Use the manage-bde -off C: command to turn off BitLocker for the C drive.
  11. Turn on Automatic Logon.
  12. For a Dell laptop, go to Dell Support, scroll down and enter your Dell laptop service tag, click Search button, click Drivers & Downloads tab, expand Find drivers section, install Dell Command Update, and use it to check and install necessary drivers.
  13. For Windows Server 2019, install Chipset Device, Graphics, Audio, Ethernet, Bluetooth, Memory Card Reader, Dynamic Platform and Thermal Framework driver.
  14. For a ThinkPad laptop, install Lenovo Vantage. Set battery charge threshold value to 40% using Lenovo Vantage.

Step 7: Configure Windows for developer’s needs.

  1. Turn the following Windows features on: .NET 3.5, ASP.NET 4.8, Hyper-V, Internet Information Services, Telnet Client.
  2. Install Total Commander, Office 365 Offline, MS Project 2016, MS Visio 2016, MS SQL Server 2016, Visual Studio 2022, Adobe Acrobat Pro DC v15.8, Adobe Photoshop CC 2015, TortoiseSVN 1.14.6
  3. Install Remote Desktop Connection Manager, PuTTY 0.80, WinSCP 6.3.
  4. Create a VPN connection. Configure the VPN connnection.
  5. Prevent normal traffic from going through VPN: Go to Control Panel >> Network and Sharing Center >> Change adapter settings >> Right click VPN Connection >> Properties >> Select the Networking tab:
    – Disable Internet Protocol Version 6 (TCP/IPv6).
    – Select Internet Protocol Version 4 (TCP/IPv4) >> Properties >> Advanced >> IP Settings: Uncheck the Use default gateway on remote network option.
  6. Install Python 3.6.8, TensorFlow, Keras
    1. Install Firefox, MPC-HC.1.7.13. (Go to View >> Options >> Player and turn off all options under the History section. Go to View >> Options >> Playback and disable the Auto-zoom feature.)
    2. Configure secure protocols using IIS Crypto GUI (Select Best Practices, disable TLS 1.0, TLS 1.1, MD5, SHA).
    3. Install Hyper-V, create an external Virtual Switch for Internet access, set Scheduler Type to Core.
    4. Apply Windows updates to the machine.

    Information:

    The bypassnro.cmd which is in \Windows\System32\oobe folder, is a script which contains:

    @echo off
    reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE /v BypassNRO /t REG_DWORD /d 1 /f
    shutdown /r /t 0

     

    Topic 1 – Operating Systems

    Why do I need to learn about operating systems?

    Because you will develop your software using an operating system or for an operating system.

    What can I do after finishing learning operating systems?

    You will be prepared with skills that help you prepare environments for your your programming journey.

    You will be prepared with knowledge that helps you understand programming terminologies.

    You may even be inspired to learn programming to solve problems.

    How many operating systems should I know?

    As many as possible. We recommend that you learn how to work with Windows first. Then you learn about basic concepts of an operating system.

    How do I learn to use operating systems?

    Please read
    – this Andy Rathbone (2015). Windows 10 For Dummies. John Wiley & Sons book, or
    – this Andy Rathbone (2021). Windows 11 For Dummies. John Wiley & Sons book and this Ciprian Adrian Rusen (2022). Windows 11 All-in-One For Dummies. John Wiley & Sons book.

    How about other operating systems such as macOS, Linux or Unix?

    If you have a Mac then you can read this Pogue David (2019). macOS Mojave: The Missing Manual. O’Reilly Media book.

    If you have a PC with Ubuntu, or Linux, or Unix then you can read this Mark G. Sobell (2015). A Practical Guide to Ubuntu Linux. Prentice Hall book.

    After that please read these Introduction to Computing Principles lecture notes.

    After that please read this Abraham Silberschatz et al. (2018). Operating System Concepts. Wiley book.

    Terminology Review:

    • Central Processing Unit (CPU).
    • Random-Access Memory (RAM).
    • Hard Disk Drive (HDD).
    • Solid-State Drive (SSD).
    • Programs.
    • Basic Input/Output System (BIOS)
    • Unified Extensible Firmware Interface (UEFI).
    • Boot Loader.
    • Operating System (OS).
    • Monolithic Structure.
    • Microkernels.
    • User Mode.
    • System Calls.
    • Kernel.
    • Kernel Mode.
    • Processes.
    • Threads.
    • Process Synchronization.
    • Memory Management Unit.
    • Logical Address.
    • Physical Address.
    • Paging.
    • File System.
    • Security and Protection.
    • Networks.
    • Virtual Memory.
    • Virtualization.
    • Virtual Machines.

    Once you finish learning about operating systems please click Topic 2 – Introduction to Computer Networks to continue.