Restoring Windows on a Dell Precision 5490 often overwrites the EFI System Partition, breaking Ubuntu’s GRUB bootloader. The solution requires booting from an Ubuntu Live USB, manually mounting your Linux partitions to the host system, and reinstalling GRUB using the chroot environment. This process restores the boot menu without affecting your Windows installation or data.
Understanding the Boot Failure
When you use Windows Recovery or a factory reset image on a Dell Precision 5490, the utility typically reformats or reclaims the EFI System Partition (ESP). This partition is small, usually around 100-500 MB, and sits at the start of the disk. It contains the bootloader files for both operating systems in a UEFI setup. By wiping this area, Windows removes the GRUB configuration that tells the firmware how to find the Ubuntu kernel and initramfs.
The immediate symptom is that the computer boots directly into Windows, skipping the GRUB menu entirely. You may also notice that the "Ubuntu" option has disappeared from the BIOS boot order list. This is not a corruption of your Linux files; they remain intact on their respective partitions. The issue is purely that the bridge between the hardware firmware and the Linux kernel has been severed. To fix this, you must rebuild that bridge by restoring the necessary files to the ESP and updating the NVRAM entries.
Preparation and Live Environment Setup
Before attempting any repairs, ensure you have a bootable Ubuntu Live USB created with tools like Rufus or Etcher. Connect your laptop to power and internet if possible, as some steps require downloading packages. Boot from the USB by pressing F12 during startup to access the One-Time Boot Menu, then select the USB device. Once the Live session loads, open a terminal window to begin the diagnostic phase.
First, identify your partitions. Run the command lsblk or sudo fdisk -l. You are looking for your root partition (usually ext4) and the EFI partition (type ef00 or fat32). Note the device names, such as sda1 for EFI and sda2 for root. If you use LVM or encryption, note those logical volumes instead. Accurate identification here prevents accidental data loss on other drives.
Mounting Partitions for Chroot
The core of the repair involves creating a temporary view of your installed system inside the Live environment. This is achieved through bind mounts. Start by mounting your root partition to /mnt. Replace sdXn with your actual root partition identifier.
sudo mount /dev/sdXn /mnt
Next, mount the EFI partition. This is critical because GRUB needs to write its binaries back to this specific location. Create a mount point and attach the EFI partition.
sudo mount /dev/sdY1 /mnt/boot/efi
Now, bind the essential virtual filesystems. These allow the chrooted environment to interact with the hardware and network correctly. Execute the following commands in sequence:
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
If you have a separate boot partition, mount it to /mnt/boot before proceeding. Without these bind mounts, subsequent commands will fail because the chroot environment cannot see devices or processes.
Reinstalling GRUB via Chroot
With all partitions mounted, enter the chroot environment. This changes your root directory to the installed Ubuntu system, making it appear as if you are logged into that installation.
sudo chroot /mnt
Inside the chroot, update the package lists to ensure you have the latest versions of GRUB components. Then, reinstall GRUB specifically targeting the EFI platform and your disk device. Do not specify a partition number for the target disk, only the disk itself (e.g., /dev/sda).
apt-get update
apt-get install --reinstall grub-efi-amd64-signed shim-signed
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --recheck
The --recheck flag forces GRUB to rescan the disk for existing installations, which helps resolve issues where the previous entry was corrupted. After successful installation, update the GRUB configuration file to reflect current kernels.
update-grub
Exit the chroot environment with exit, then unmount the partitions in reverse order to avoid errors: umount /mnt/sys, umount /mnt/proc, etc. Finally, reboot the machine. The GRUB menu should now appear, allowing you to select Ubuntu.
Verifying and Troubleshooting
After rebooting, check if the system boots normally. If it does, verify that the Windows Boot Manager still appears in the GRUB menu. If Windows fails to boot, you may need to repair the Windows bootloader separately using a Windows Installation Media. However, in most cases, restoring GRUB does not affect the Windows EFI entry, as they reside in different folders within the same ESP.
If the system hangs after selecting Ubuntu, check the kernel parameters in /etc/default/grub. Sometimes, after a major restore, secure boot settings in the BIOS might interfere. Ensure Secure Boot is enabled if you used signed packages, or disabled if you are using custom kernels. For more details on preserving partitions during dual-boot setups, see Preserving Windows Partitions.
Frequently Asked Questions
Will this process delete my Windows data?
No, reinstalling GRUB only modifies the EFI System Partition and the boot configuration files. Your Windows user files, applications, and registry remain untouched. The operation is limited to the bootloader sector, ensuring data safety.
What if I don't know which partition is EFI?
Use the sudo blkid command in the Live USB terminal. Look for the partition labeled TYPE="vfat" and LABEL="EFI" or similar. It is typically the smallest partition, under 500MB. Mounting the wrong partition will cause errors, so double-check the size and label.
Can I fix this using Windows Command Prompt?
Generally, no. Windows recovery tools do not understand the Linux Ext4 filesystem or the specific structure of GRUB. While you can repair the Windows bootloader using bcdboot, you cannot restore the Linux boot entry from within Windows. A Linux Live environment is required.
Why did my BIOS boot order change after the restore?
Dell’s factory restore process often resets the UEFI NVRAM to default settings, prioritizing the Windows Boot Manager. Reinstalling GRUB updates the NVRAM entries to include Ubuntu again. If Ubuntu still doesn't appear in the boot order, enter BIOS (F2) and manually add the Ubuntu entry from the EFI File System selector.
Is it safe to disable Secure Boot for this fix?
It is not recommended unless you are using unsigned third-party drivers. The guide uses shim-signed and grub-efi-amd64-signed, which are compatible with Secure Boot. Keeping Secure Boot enabled provides better protection against bootkit malware and is the standard for modern Ubuntu installations on Dell hardware.