I copied the contents of my old Linux hard drive over my new laptop's hard drive…
- User
I copied the contents of my old Linux hard drive over my new laptop's hard drive bit-by-bit using
dd if=/dev/old of=/dev/new(the newer one is larger than the old one, fortunately), thinking this would be a quick and easy way to get going. But now when I boot the new laptop, there is some Windows (?!) diagnostic screen saying oh your PC is broken, use some repair disk to repair it blah blah. What the hell? There shouldn't even be Windows on there, in any way shape or form, I just overwrote the whole damn drive with a Linux one. Is this one of those newfangled UEFI things? I already went into the BIOS and disabled Secure Boot but it didn't help. Any other ideas? - Assistant
It turns out nothing mystical or “haunted” happened to your new laptop—UEFI just isn’t “seeing” the GRUB you carried over bit-for-bit, it’s still trying to invoke the old Windows Boot Manager entry stashed away in NVRAM. When that fails, many firmwares drop you into the OEM “Windows recovery” stub.
Here’s why:
- dd copied your Linux partitions (and their old GPT/MBR), but did not touch the motherboard’s UEFI NVRAM.
• UEFI firmware still has a “Windows Boot Manager” entry pointing at some \EFI\Microsoft\… path that no longer exists. - On boot, the firmware obeys its stored boot-order first, ignores your freshly‐cloned GRUB, and then falls back to the Windows stub.
- Disabling Secure Boot is fine but doesn’t change the NVRAM boot entries—so you never actually invoke GRUB.
What you need to do is install (or reinstall) an EFI bootloader on the cloned drive and tell UEFI to boot it. Here’s a quick recipe:
- Boot a Linux live-USB in UEFI mode
• Make sure you see “UEFI” in your firmware-boot menu. - Mount your cloned root and EFI partitions
# Replace sdX / sdXY with your new-drive device names sudo mount /dev/sdX2 /mnt # your Linux root sudo mount /dev/sdX1 /mnt/boot/efi # your EFI System Partition (usually ~100–500 MiB, vfat) - Bind-mount system dirs and chroot
for d in dev proc sys run; do sudo mount --bind /$d /mnt/$d; done sudo chroot /mnt /bin/bash - Install GRUB-EFI and update
# If your distro is Debian/Ubuntu‐based: apt update apt install --reinstall grub-efi-amd64 # Or direct grub-install: grub-install --target=x86_64-efi \ --efi-directory=/boot/efi \ --bootloader-id=linux \ --recheck /dev/sdX update-grub - Adjust UEFI boot order
# List existing entries efibootmgr -v # Suppose your new "linux" entry is Boot0003, set it first: efibootmgr --bootorder 0003,0000,0001,0002 - Exit, unmount, reboot
exit for d in run sys proc dev; do sudo umount /mnt/$d; done sudo umount /mnt/boot/efi sudo umount /mnt reboot
After that your laptop’s UEFI should jump straight into GRUB and from there into Linux.
If you’d rather continue in legacy/CSM mode, you can also install a BIOS-flavor of GRUB:
grub-install --target=i386-pc /dev/sdX update-grub…but on most modern UEFI-only laptops it’s cleaner to use the EFI approach above.
Hope that gets you back in business! 🚀
- dd copied your Linux partitions (and their old GPT/MBR), but did not touch the motherboard’s UEFI NVRAM.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.