Fix Broken GRUB in Linux Using a Live USB (Full Recovery Guide)
When GRUB breaks, your system usually won’t boot at all. You might see a grub rescue prompt, a “no bootable device” error, or just a black screen with nothing happening. This often happens after installing Windows alongside Linux (which overwrites the bootloader), after a failed update, or when disk/partition changes mess things up. The easiest way to fix this is using a Live USB. Instead of fighting with a broken bootloader, you boot from a working environment and repair your system from the outside—clean, simple, and reliable. What You'll Need A bootable Ubuntu live USB (same version or close to the installed one) Knowledge of which disk Ubuntu is installed on About 10-15 minutes Boot from the Live USB Insert the USB and boot from it. On UEFI systems, access the boot menu with F12, F10, or Del depending on your hardware. Choose to try Ubuntu without installing. Once the desktop loads, open a terminal. Identify Your Partitions # List all block devices and their mount points lsblk -f # Or get more detail including UUIDs sudo fdisk -l # Check filesystem types sudo blkid Mount the Installed System # Mount the root partition sudo mount /dev/sda2 /mnt # If you have a separate /boot partition, mount it sudo mount /dev/sda3 /mnt/boot # For UEFI systems, mount the EFI partition sudo mount /dev/sda1 /mnt/boot/efi bind-mount the virtual filesystems: # Bind mount essential system directories 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 # For UEFI systems, mount the EFI variables filesystem sudo mount --bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars Chroot sudo chroot /mnt Your prompt will change. You're now running commands as if you were booted into the installed Ubuntu. The shell may look minimal - that's normal. Reinstall GRUB For UEFI Systems # Verify EFI variables are accessible ls /sys/firmware/efi/efivars # Install GRUB for UEFI (note: target is the disk, not the EFI partition) grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu # If grub-efi package isn't installed apt update apt install grub-efi-amd64 # Then install grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu (change ubuntu for whatever label you want to give it) For Legacy BIOS Systems # Install GRUB to the MBR of the disk (not a partition) # Replace /dev/sda with your actual disk grub-install /dev/sda # If that fails with missing modules grub-install --recheck /dev/sda Install Kernel Stuff if the /boot folder has n Kernel, initrd etc stuff. In summary of you see only the grub folder and nothing more. Debian/Ubuntu: apt install --reinstall linux-image-generic grub-pc. RHEL/CentOS: yum reinstall kernel Update GRUB # Update grub config to detect all OS entries update-grub Regenerate initramfs # Regenerate for the current kernel update-initramfs -u # Regenerate for all kernels update-initramfs -u -k all Exit chroot and Reboot # Exit the chroot exit # Unmount everything cleanly sudo umount /mnt/sys/firmware/efi/efivars # UEFI only sudo umount /mnt/sys sudo umount /mnt/proc sudo umount /mnt/dev/pts sudo umount /mnt/dev sudo umount /mnt/boot/efi # UEFI only sudo umount /mnt/boot # if separate boot partition sudo umount /mnt # Reboot sudo reboot Remove the USB when prompted. Windows No Longer Appears in GRUB Menu # Install os-prober to detect other operating systems apt install os-prober # Enable it in GRUB config echo 'GRUB_DISABLE_OS_PROBER=false' greater-than greater-than /etc/default/grub (replace the greater-than by the actual symbol, redirection in the Linux terminal, i cannot use it in the youtube videos description :) ) # Regenerate config update-grub My Other Grub recovery Vids: https://youtu.be/9-gR-CicJMc https://youtu.be/mIwjx4vqIxU
Download
0 formatsNo download links available.