← Back to Presentations

Dual Boot: Windows + Ubuntu Guide

Complete Step-by-Step Guide — UEFI, Partitioning, GRUB, NVIDIA GPU & ML Setup

1. Prerequisites & Planning

Hardware Requirements

ComponentMinimumRecommended (ML Workloads)
CPU64-bit (x86_64)Intel 13th Gen+ / AMD Ryzen 7000+
RAM8 GB32–128 GB
Storage250 GB SSD1–2 TB NVMe SSD
GPU—NVIDIA RTX 5090 (24 GB VRAM)
USB Drive8 GB+16 GB+ (USB 3.0)
BIOS ModeUEFI (required for GPT)UEFI with Secure Boot support

Pre-Installation Checklist

  • Backup all important data — external drive or cloud (OneDrive, Google Drive)
  • Verify UEFI vs Legacy BIOS: msinfo32 → BIOS Mode: UEFI
  • Check partition table: diskpart → list disk → GPT column has asterisk
  • Ensure Secure Boot status: msinfo32 → Secure Boot State
  • Plan disk space: 100 GB+ free for Ubuntu (200 GB+ recommended for ML)
  • Download Ubuntu 24.04 LTS — ubuntu.com/download/desktop
  • USB drive: 8 GB+ (all data will be erased)
# Check BIOS mode from Windows (PowerShell as Admin)
bcdedit | findstr /i "path"
# If \EFI\ appears → UEFI mode

# Check partition table
diskpart
list disk
# GPT column: * = GPT, blank = MBR

# Check Secure Boot
Confirm-SecureBootUEFI
# Returns True/False

2. Prepare Windows

⚠️ WARNING

Partition changes can cause data loss. Back up everything before proceeding. Ensure your laptop is plugged in — do not shrink partitions on battery power.

Step 1: Disable Fast Startup

Fast Startup locks the NTFS partition and can cause data corruption when accessed from Ubuntu.

# Control Panel → Power Options → Choose what the power buttons do
# → Change settings that are currently unavailable
# → Uncheck "Turn on fast startup"

# Or via PowerShell (Admin):
powercfg /hibernate off

Step 2: Disable BitLocker (if enabled)

# Check BitLocker status
manage-bde -status C:

# Disable BitLocker (takes time to decrypt)
manage-bde -off C:

# Monitor decryption progress
manage-bde -status C:

Step 3: Disable Hibernation

# PowerShell as Admin
powercfg /hibernate off

Step 4: Defragment & Optimize

# Optimize the drive before shrinking
defrag C: /O /V

Step 5: Shrink Windows Partition

  1. Open Disk Management: diskmgmt.msc
  2. Right-click the Windows (C:) partition → Shrink Volume
  3. Enter shrink amount: 102400 MB (100 GB) minimum, 204800 MB (200 GB) for ML
  4. Click Shrink — the free space will show as "Unallocated"
  5. Do NOT format the unallocated space — Ubuntu installer will handle it

⚠️ WARNING

If Windows can only shrink a small amount, unmovable files (pagefile, hibernation) are in the way. Disable hibernation, move pagefile temporarily, defrag, then try again. Third-party tools like GParted (from live USB) can also help.

# Check partition table type (PowerShell Admin)
Get-Disk | Select-Object Number, PartitionStyle
# Should show "GPT" for UEFI systems

3. Create Bootable USB

Option A: Rufus (Windows — Recommended)

  1. Download Rufus: rufus.ie
  2. Insert USB drive (8 GB+)
  3. Open Rufus → Select Ubuntu ISO
  4. Configure:
    • Partition scheme: GPT
    • Target system: UEFI (non CSM)
    • File system: FAT32
    • Write mode: ISO Image mode (Recommended)
  5. Click START — wait for completion

Option B: balenaEtcher (Cross-platform)

  1. Download: etcher.balena.io
  2. Flash → Select ISO → Select USB → Flash

Option C: Ventoy (Multi-ISO USB)

Ventoy lets you boot multiple ISOs from one USB — just copy ISO files to the drive.

# Download from https://ventoy.net
# Install Ventoy to USB drive
# Then simply copy Ubuntu ISO to the USB
# Ventoy presents a boot menu with all ISOs

Verify ISO Checksum

# Windows (PowerShell)
Get-FileHash ubuntu-24.04-desktop-amd64.iso -Algorithm SHA256

# Linux / macOS
sha256sum ubuntu-24.04-desktop-amd64.iso

# Compare with official checksum from:
# https://releases.ubuntu.com/24.04/SHA256SUMS

4. BIOS/UEFI Configuration

⚠️ WARNING

Incorrect BIOS changes can prevent your system from booting. Take a photo of current settings before making changes.

Enter BIOS/UEFI

ManufacturerBIOS Key
ASUSF2 or DEL
MSIDEL
GigabyteDEL or F2
DellF2
HPF10 or ESC
LenovoF2 or Fn+F2
AcerF2 or DEL

Required Changes

  1. Disable Secure Boot — Security tab → Secure Boot → Disabled

    Ubuntu supports Secure Boot, but disabling avoids driver signing issues (especially NVIDIA)

  2. Set USB Boot Priority — Boot tab → Move USB to first position
  3. Disable Fast Boot — Boot tab → Fast Boot → Disabled
  4. Intel RST → AHCI (Critical for NVMe drives!)

    If your NVMe is set to Intel RST (RAID) mode, Ubuntu cannot see it

⚠️ WARNING

Switching Intel RST to AHCI can make Windows unbootable. Before switching: open CMD as Admin in Windows, run bcdedit /set safeboot minimal, then change BIOS to AHCI, boot Windows (it will enter Safe Mode), then run bcdedit /deletevalue safeboot and restart normally.

# Windows: Prepare for RST → AHCI switch (Admin CMD)
bcdedit /set {current} safeboot minimal

# After switching BIOS to AHCI and booting into Safe Mode:
bcdedit /deletevalue {current} safeboot
# Reboot normally — Windows now works with AHCI

Save BIOS settings (F10) and reboot with the USB drive inserted.

5. Ubuntu Installation

Boot from USB

  1. Restart and press boot menu key (F12 / F8 / ESC) — select USB drive
  2. Select "Try Ubuntu" first to verify hardware works (WiFi, display, etc.)
  3. If everything looks good, double-click "Install Ubuntu" on the desktop

💡 TIP

Always choose "Try Ubuntu" first. This lets you verify hardware compatibility without making any changes to your disk. Check WiFi, display resolution, and GPU detection before committing.

Installation Steps

  1. Language & Keyboard layout
  2. Connect to WiFi (or use Ethernet)
  3. Select "Normal installation" + check "Install third-party software for graphics and Wi-Fi"
  4. Installation type: select "Something else" (manual partitioning)

⚠️ WARNING

Do NOT select "Erase disk and install Ubuntu" — this will delete Windows! Always choose "Something else" for dual boot.

Manual Partition Layout

Click on the "free space" (unallocated from Windows shrink) and create these partitions:

PartitionSizeTypeMount PointNotes
EFI System512 MBFAT32/boot/efiSkip if EFI partition already exists (from Windows)
Root (/)50–80 GBext4/OS, packages, system files
HomeRemaining spaceext4/homeUser data, projects, ML datasets
Swap8–16 GBswap area—Or skip and use swapfile (see below)

💡 TIP

For ML workloads with large models (e.g., 70B parameter LLMs), allocate generous space to /home — model files can be 50–150 GB each. Swap of 16 GB is recommended for 32 GB+ RAM systems.

Bootloader Location

At the bottom of the partition dialog: "Device for boot loader installation" — select the EFI System Partition (usually /dev/sda1 or /dev/nvme0n1p1).

Using Swapfile Instead of Swap Partition

# After installation, create a swapfile instead:
sudo fallocate -l 16G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

# Make permanent — add to /etc/fstab:
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

# Verify
swapon --show

Complete the installation: set timezone, username, password, hostname. Click Install Now and wait for completion. Reboot and remove the USB drive when prompted.

6. GRUB Bootloader

GRUB (GRand Unified Bootloader) is installed automatically and presents a menu to choose between Ubuntu and Windows at boot time.

Configuration File

# Main config file
sudo nano /etc/default/grub

# Key settings:
GRUB_DEFAULT=0                    # 0 = first entry (Ubuntu), "saved" for last-used
GRUB_TIMEOUT=10                   # Seconds to wait before auto-boot
GRUB_TIMEOUT_STYLE=menu           # "menu", "countdown", or "hidden"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_DISABLE_OS_PROBER=false      # IMPORTANT: detect Windows

# After changes, ALWAYS run:
sudo update-grub

Common GRUB Operations

# Update GRUB after any config change
sudo update-grub

# Enable os-prober to detect Windows
sudo apt install os-prober
echo 'GRUB_DISABLE_OS_PROBER=false' | sudo tee -a /etc/default/grub
sudo update-grub

# Set Windows as default boot OS
# First, find Windows entry name:
grep -i windows /boot/grub/grub.cfg
# Then set it:
sudo sed -i 's/GRUB_DEFAULT=0/GRUB_DEFAULT="Windows Boot Manager (on /dev/nvme0n1p1)"/' /etc/default/grub
sudo update-grub

# Or use "saved" to remember last choice:
sudo sed -i 's/GRUB_DEFAULT=0/GRUB_DEFAULT=saved/' /etc/default/grub
echo 'GRUB_SAVEDEFAULT=true' | sudo tee -a /etc/default/grub
sudo update-grub

GRUB Rescue — When Things Go Wrong

# If you see "grub rescue>" prompt:
ls                          # List available partitions
ls (hd0,gpt2)/              # Find the one with /boot
set root=(hd0,gpt2)
set prefix=(hd0,gpt2)/boot/grub
insmod normal
normal                      # Should boot to GRUB menu

# Permanent fix: boot into Ubuntu and run
sudo grub-install /dev/nvme0n1    # or /dev/sda
sudo update-grub

Reinstall GRUB from Live USB

# Boot from Ubuntu live USB → "Try Ubuntu"
# Open terminal:

# Find your Ubuntu root partition
sudo fdisk -l
# Look for Linux filesystem partition (e.g., /dev/nvme0n1p5)

# Mount it
sudo mount /dev/nvme0n1p5 /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi    # EFI partition
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

# Chroot and reinstall
sudo chroot /mnt
grub-install /dev/nvme0n1
update-grub
exit

# Unmount and reboot
sudo umount -R /mnt
sudo reboot

7. Post-Install Ubuntu Setup

System Update

# Update package lists and upgrade all packages
sudo apt update && sudo apt upgrade -y

# Install essential development tools
sudo apt install -y build-essential git curl wget vim htop   net-tools software-properties-common apt-transport-https   ca-certificates gnupg lsb-release unzip jq tree tmux

# Install Python development
sudo apt install -y python3-pip python3-venv python3-dev

Enable Firewall

# Enable UFW (Uncomplicated Firewall)
sudo ufw enable
sudo ufw default deny incoming
sudo ufw default allow outgoing

# Allow SSH
sudo ufw allow ssh

# Check status
sudo ufw status verbose

Set Hostname & Timezone

# Set hostname
sudo hostnamectl set-hostname my-workstation

# Set timezone
sudo timedatectl set-timezone Europe/Zurich

# Verify
hostnamectl
timedatectl

Configure Swap Performance

# Check current swappiness (default: 60)
cat /proc/sys/vm/swappiness

# For desktop/workstation with lots of RAM, reduce to 10:
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Install Docker

# Add Docker GPG key and repository
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg]   https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |   sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Add user to docker group (logout/login required)
sudo usermod -aG docker $USER

# Verify
docker --version
docker compose version

8. NVIDIA GPU Setup (Ubuntu)

🎯 Critical Section for ML/AI Workloads

This section covers NVIDIA driver installation, CUDA, cuDNN, and Docker GPU support — essential for running vLLM, PyTorch, and other ML frameworks on your RTX 5090.

Step 1: Identify Available Drivers

# Check what GPU is detected
lspci | grep -i nvidia

# List recommended drivers
ubuntu-drivers devices

# Example output:
# == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
# vendor   : NVIDIA Corporation
# model    : GeForce RTX 5090
# driver   : nvidia-driver-570 - third-party non-free recommended
# driver   : nvidia-driver-570-server - third-party non-free

Step 2: Install NVIDIA Driver

# Option A: Auto-install recommended driver (easiest)
sudo ubuntu-drivers autoinstall

# Option B: Install specific version
sudo apt install -y nvidia-driver-570

# Reboot required!
sudo reboot

Step 3: Verify Driver Installation

# Check driver is loaded
nvidia-smi

# Expected output:
# +-----------------------------------------------------------------------------------------+
# | NVIDIA-SMI 570.xx.xx    Driver Version: 570.xx.xx    CUDA Version: 12.8               |
# |-------------------------------+----------------------+----------------------+
# | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
# | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
# |===============================+======================+======================|
# |   0  NVIDIA GeForce RTX 5090  |   00000000:01:00.0   |                  N/A |
# | 30%   35C    P8    25W / 575W |    128MiB / 32768MiB |      0%      Default |
# +-------------------------------+----------------------+----------------------+

# Check kernel module
lsmod | grep nvidia

# Check driver version
cat /proc/driver/nvidia/version

⚠️ WARNING

Black screen after reboot? The nouveau (open-source) driver may conflict. Boot to recovery mode (hold SHIFT at GRUB), then: sudo apt purge ~nnvidia, reboot, and reinstall the driver. To blacklist nouveau permanently, see troubleshooting below.

Step 4: Blacklist Nouveau (if needed)

# Create blacklist file
sudo bash -c 'cat > /etc/modprobe.d/blacklist-nouveau.conf << EOF
blacklist nouveau
options nouveau modeset=0
EOF'

# Regenerate initramfs
sudo update-initramfs -u

# Reboot
sudo reboot

Step 5: Install CUDA Toolkit

# Option A: Via apt (recommended for Ubuntu)
# Add NVIDIA CUDA repository
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update

# Install CUDA Toolkit 12.8
sudo apt install -y cuda-toolkit-12-8

# Add to PATH — append to ~/.bashrc
echo 'export PATH=/usr/local/cuda-12.8/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-12.8/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc

# Verify CUDA installation
nvcc --version
# cuda_12.8.x ...

Step 6: Install cuDNN

# Install cuDNN via apt (with CUDA repo already added)
sudo apt install -y libcudnn9-cuda-12 libcudnn9-dev-cuda-12

# Verify cuDNN
dpkg -l | grep cudnn

Step 7: NVIDIA Container Toolkit (Docker GPU)

# Add NVIDIA Container Toolkit repository
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey |   sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg

curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list |   sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' |   sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

sudo apt update
sudo apt install -y nvidia-container-toolkit

# Configure Docker runtime
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

# Verify GPU access in Docker
docker run --rm --gpus all nvidia/cuda:12.8.0-base-ubuntu24.04 nvidia-smi

Step 8: Test with PyTorch & vLLM

# Test PyTorch GPU access
python3 -c "
import torch
print(f'PyTorch version: {torch.__version__}')
print(f'CUDA available: {torch.cuda.is_available()}')
print(f'CUDA version: {torch.version.cuda}')
print(f'GPU count: {torch.cuda.device_count()}')
print(f'GPU name: {torch.cuda.get_device_name(0)}')
print(f'GPU memory: {torch.cuda.get_device_properties(0).total_mem / 1e9:.1f} GB')
"

# Test vLLM serving (Docker)
docker run --gpus all   -v ~/.cache/huggingface:/root/.cache/huggingface   -p 8000:8000   --ipc=host   vllm/vllm-openai:latest   --model meta-llama/Llama-3.1-8B-Instruct   --max-model-len 8192

Troubleshooting NVIDIA Issues

ProblemSolution
Black screen after driver installBoot recovery → purge nvidia → blacklist nouveau → reinstall
nvidia-smi: command not foundDriver not installed or PATH missing: sudo apt install nvidia-driver-570
NVIDIA-SMI has failed...Driver/kernel mismatch: sudo apt install --reinstall nvidia-driver-570 && reboot
CUDA out of memoryReduce model size, use quantization (AWQ/GPTQ), or check gpu-memory-utilization
Docker: could not select device driverInstall nvidia-container-toolkit, run nvidia-ctk configure, restart docker
Kernel update broke driversudo apt install --reinstall nvidia-driver-570 && sudo reboot
Secure Boot blocks driverDisable Secure Boot in BIOS or enroll MOK key during driver install

Monitoring GPU Usage

# Real-time GPU monitoring (updates every 1 second)
watch -n 1 nvidia-smi

# GPU monitoring with processes
nvidia-smi pmon -i 0 -s um -d 1

# Install nvitop for better monitoring
pip install nvitop
nvitop

9. Shared Storage Between OS

Auto-Mount NTFS Partition

Create a shared NTFS partition accessible from both Windows and Ubuntu:

# Install NTFS support (usually pre-installed)
sudo apt install -y ntfs-3g

# Identify the NTFS partition
sudo blkid | grep ntfs
# Example: /dev/nvme0n1p4: UUID="1234ABCD" TYPE="ntfs"

# Create mount point
sudo mkdir -p /mnt/shared

# Add to /etc/fstab for auto-mount
# Get the UUID first:
sudo blkid /dev/nvme0n1p4

# Add this line to /etc/fstab:
echo 'UUID=1234ABCD /mnt/shared ntfs-3g defaults,uid=1000,gid=1000,dmask=022,fmask=133 0 0' | sudo tee -a /etc/fstab

# Test mount without reboot
sudo mount -a

# Verify
df -h /mnt/shared
ls /mnt/shared

⚠️ WARNING

If Windows was not shut down cleanly (Fast Startup, hibernation), the NTFS partition may be mounted read-only. Ensure Fast Startup and hibernation are disabled in Windows (Section 2).

Symlink Shared Folders

# Create symlinks for convenient access
ln -s /mnt/shared/Documents ~/Documents-Shared
ln -s /mnt/shared/Downloads ~/Downloads-Shared
ln -s /mnt/shared/Projects ~/Projects-Shared

exFAT for External Drives

# exFAT support (for external USB drives)
sudo apt install -y exfatprogs

# Mount exFAT drive
sudo mount /dev/sdb1 /mnt/usb

💡 TIP

Avoid writing to the Windows system partition (C:) from Ubuntu. Use a dedicated shared partition or external drive instead.

10. Network & SSH

Install & Configure SSH Server

# Install OpenSSH Server
sudo apt install -y openssh-server

# Enable and start
sudo systemctl enable ssh
sudo systemctl start ssh

# Check status
sudo systemctl status ssh

# Allow through firewall
sudo ufw allow ssh

# Check your IP
ip addr show | grep "inet " | grep -v 127.0.0.1

Static IP with Netplan

# Edit netplan config
sudo nano /etc/netplan/01-network-config.yaml

# Example static IP configuration:
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s31f6:          # Your interface name (check with: ip link)
      dhcp4: no
      addresses:
        - 192.168.1.100/24
      routes:
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses:
          - 8.8.8.8
          - 8.8.4.4

# Apply
sudo netplan apply

# Verify
ip addr show

SSH Key Authentication

# Generate SSH key pair (on client machine)
ssh-keygen -t ed25519 -C "[email protected]"

# Copy public key to Ubuntu server
ssh-copy-id [email protected]

# Or manually:
cat ~/.ssh/id_ed25519.pub | ssh [email protected]   'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys'

# Disable password authentication (more secure)
sudo sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo systemctl restart ssh

Wake-on-LAN

# Install ethtool
sudo apt install -y ethtool

# Check WoL support
sudo ethtool enp0s31f6 | grep Wake-on

# Enable WoL
sudo ethtool -s enp0s31f6 wol g

# Make persistent — create systemd service
sudo bash -c 'cat > /etc/systemd/system/wol.service << EOF
[Unit]
Description=Enable Wake-on-LAN
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/ethtool -s enp0s31f6 wol g

[Install]
WantedBy=multi-user.target
EOF'
sudo systemctl enable wol.service

# Send WoL packet from another machine:
# Install: sudo apt install wakeonlan
wakeonlan AA:BB:CC:DD:EE:FF

11. Windows Recovery & Repair

Windows Update Broke GRUB

Windows updates sometimes overwrite the EFI boot entry, booting directly to Windows. Fix:

# Boot from Ubuntu live USB → "Try Ubuntu" → Terminal

# Mount Ubuntu root partition
sudo mount /dev/nvme0n1p5 /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

# Chroot and reinstall GRUB
sudo chroot /mnt
grub-install /dev/nvme0n1
update-grub
exit

sudo umount -R /mnt
sudo reboot

Repair Windows Boot Manager

If Windows won't boot, use a Windows installation USB:

# Boot from Windows USB → "Repair your computer"
# → Troubleshoot → Command Prompt

# Fix boot records
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

# If bootrec /fixboot gives "Access denied":
diskpart
list disk
select disk 0
list partition
select partition 1    # EFI partition
assign letter=Z
exit

cd /d Z:\EFI\Microsoft\Boot
ren BCD BCD.bak
bcdboot C:\Windows /s Z: /f UEFI

EFI Boot Order Management

# From Ubuntu — view boot entries
efibootmgr -v

# Example output:
# BootCurrent: 0001
# BootOrder: 0001,0000,0002
# Boot0000* Windows Boot Manager
# Boot0001* ubuntu
# Boot0002* USB Drive

# Change boot order (Ubuntu first)
sudo efibootmgr -o 0001,0000,0002

# Delete an entry
sudo efibootmgr -b 0002 -B

Boot-Repair Tool (Easy Fix)

# From Ubuntu live USB — install boot-repair
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install -y boot-repair

# Run it
boot-repair
# Click "Recommended repair" — fixes most GRUB issues

12. Tips & Best Practices

Fix Time Sync Issue (Windows Shows Wrong Time)

Windows and Ubuntu handle hardware clock differently. Windows uses local time, Ubuntu uses UTC. This causes the clock to be wrong when switching OS.

# Fix Option A: Tell Ubuntu to use local time (easier)
timedatectl set-local-rtc 1 --adjust-system-clock

# Fix Option B: Tell Windows to use UTC (better)
# In Windows, run as Admin:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f
# Restart Windows

When to Use Which OS

🪟 Use Windows For

  • Gaming (best driver/anti-cheat support)
  • Adobe Creative Suite
  • Microsoft Office (native)
  • Vendor-specific software
  • Video conferencing (Teams, Zoom)

🐧 Use Ubuntu For

  • ML/AI development (PyTorch, vLLM)
  • Docker & container workloads
  • Server administration
  • Software development (native tooling)
  • NVIDIA CUDA/GPU computing

Backup Strategies

# Ubuntu: Timeshift (system snapshots)
sudo apt install -y timeshift
sudo timeshift --create --comments "Fresh install" --tags D

# Schedule automatic snapshots
sudo timeshift --schedule

# Restore from snapshot
sudo timeshift --restore

# Windows: Built-in Backup
# Settings → Update & Security → Backup
# Or create System Image: Control Panel → Backup and Restore (Windows 7)

Maintenance Checklist

  • ▸After Ubuntu kernel upgrades, run sudo update-grub to update boot menu
  • ▸After NVIDIA driver updates, verify with nvidia-smi and restart Docker
  • ▸Keep both OS updated — Windows Update + sudo apt update && sudo apt upgrade
  • ▸Create Timeshift snapshots before major changes (driver installs, kernel upgrades)
  • ▸If Windows update breaks GRUB, boot from live USB and reinstall GRUB (Section 11)
  • ▸For laptops: Ubuntu may drain battery faster — install tlp for power management

Laptop Power Management

# Install TLP for better battery life
sudo apt install -y tlp tlp-rdw
sudo systemctl enable tlp
sudo tlp start

# Check status
sudo tlp-stat -s