Common Issues
- GRUB overwritten after installing Windows, boots directly into Windows
- Windows boot entry disappears after installing Ubuntu
- GRUB menu does not show or reports “error: no such partition”
- Boot order changes after updates
Repairing GRUB from a Live USB
Preparation
- Boot from an Ubuntu 26.04 Live USB
- Select “Try Ubuntu” to enter the Live environment
Confirm Partition Layout
# List all partitions
sudo fdisk -l
# Confirm Ubuntu root partition and EFI partition
# EFI partition is typically FAT32, around 100-512MB
# Ubuntu root partition is typically ext4
lsblk -fMount and chroot
# Mount Ubuntu root partition (replace sdXn with actual partition)
sudo mount /dev/sdX2 /mnt
# Mount EFI partition
sudo mount /dev/sdX1 /mnt/boot/efi
# Bind necessary virtual filesystems
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /run /mnt/run
# Enter chroot environment
sudo chroot /mntReinstall GRUB
# UEFI systems
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu
# Update GRUB configuration
update-grub
# Exit chroot
exit
sudo umount -R /mnt
sudo rebootUsing the boot-repair Tool
A simpler graphical repair method:
# In the Live USB environment
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair
# Launch boot-repair
boot-repairClick “Recommended repair” for automatic repair.
Manually Managing EFI Boot Entries
Using efibootmgr
# View all boot entries
efibootmgr -v
# Adjust boot order (ubuntu first)
sudo efibootmgr -o 0001,0000,0002
# Delete a boot entry
sudo efibootmgr -b 0003 -B
# Add a new boot entry
sudo efibootmgr -c -d /dev/sda -p 1 -L "Ubuntu" -l "\EFI\ubuntu\shimx64.efi"Common Boot Entry Paths
| System | EFI Path |
|---|---|
| Ubuntu | \EFI\ubuntu\shimx64.efi or \EFI\ubuntu\grubx64.efi |
| Windows | \EFI\Microsoft\Boot\bootmgfw.efi |
GRUB Configuration
Make GRUB Detect Windows
# Ensure os-prober is installed
sudo apt install os-prober
# Enable os-prober (may be disabled by default in Ubuntu 26.04)
sudo nano /etc/default/grubEnsure the following line is included:
GRUB_DISABLE_OS_PROBER=falseUpdate GRUB:
sudo update-grubThe output should show something like “Found Windows Boot Manager”.
Adjust GRUB Timeout
sudo nano /etc/default/grubGRUB_TIMEOUT=10 # Menu wait time in seconds
GRUB_TIMEOUT_STYLE=menu # Always show the menusudo update-grubSet Default Boot Entry
# View menu entry numbers
grep -E "menuentry|submenu" /boot/grub/grub.cfg | head -20
# Set default entry (0 is the first entry)
sudo nano /etc/default/grub
# GRUB_DEFAULT=0
# Or use a name:
# GRUB_DEFAULT="Windows Boot Manager (on /dev/sda1)"
# Remember last selection
# GRUB_DEFAULT=saved
# GRUB_SAVEDEFAULT=true
sudo update-grubWindows Update Overwrites GRUB
Major Windows updates may rewrite the EFI boot order. Fix methods:
- Enter BIOS/UEFI settings and set Ubuntu/GRUB as the first boot entry
- Or use a Live USB to reinstall GRUB following the steps above
Time Sync Issues
In a dual boot setup, Windows and Ubuntu may show different times:
# Make Ubuntu use local time (consistent with Windows)
timedatectl set-local-rtc 1
# Or make Windows use UTC (recommended)
# In Windows, run:
# reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /t REG_DWORD /d 1Secure Boot
If Secure Boot is enabled, make sure GRUB uses a signed bootloader:
# Check Secure Boot status
mokutil --sb-state
# Ubuntu uses shimx64.efi by default to handle Secure Boot
# Confirm shim is installed
dpkg -l | grep shim-signedLast updated on