How to Reinstall GRUB (Alternate Method)

preview_player
Показать описание
In this video, I show you another, better way to reinstall the GRUB bootloader on Linux.

Prerequisites:
1. A Linux install media (any GRUB-based distribution with a live ISO should do)
THAT'S IT!

Commands used in this video:
Mount root partition: sudo mount /dev/sdXY /mnt (example: sudo mount /dev/sda3 /mnt)
Mount boot partition (if applicable): sudo mount /dev/sdXY /mnt/boot (example: sudo mount /dev/sda2 /mnt/boot)
Mount EFI System partition (if applicable): sudo mount /dev/sdXY /mnt/boot/efi (example: sudo mount /dev/sda1 /mnt/boot/efi)
Setup "bind" mounts:
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
Chroot into your Linux installation: sudo chroot /mnt
Reinstall GRUB (in chroot): grub-install /dev/sdX (example: grub-install /dev/sda)
Regenerate GRUB configuration file (in chroot): update-grub
Exit chroot: exit

Join this channel to get access to perks:
Рекомендации по теме
Комментарии
Автор

All my drives were wiped by accident, I wanted to fully wipe Linux and reinstall Windows 11. But I can't get Windows installed because the installer doesn't recognize Linux partitions.

SakugaAsu
Автор

show de bola! I shall try here if my Linux boot ; greetings from Brazil!

laikanoother
Автор

God bless you 🙏

Simple and effective explanation, with all minor details

Thanks for saving life

hrushigawade
Автор

When i try to mount my dev sda 3 or 2 it says

mount: /mnt: wrong fa type, bad option, bad superblock on dev/sda3, missing codepage or helper program, or other error. dmesg(1) may have more information after failed mount system call

Stevenagetheidlegame
Автор

At 4:44, when I run
'grub-install /dev/sda'
I get an error:
Cannot find EFI directory.

I've dual-booted Ubuntu Jammy with Windows 10, both on separate partitions in Legacy. What should I do?

pegasuszarafa
Автор

Drew - Good job. But I'm still not getting a menu for me to select my windows or linux mint (22) install. However, I should note that my BIOS is not showing any linux in the boot order. I had installed LM a couple weeks ago from a USB stick and it ran fine. Not sure if it is pertinent, but I had not rebooted until I needed to do something in Windows. And when I rebooted into Windows, it said it had a security update it wanted to do, and I let it. Soon after, I tried to reboot into LM, but could not find any way - other than booting again from my (live?) USB. Then, if I bring up a Files app, I can see the partition (84 GB /dev/sda8) and the LM files in it. But no way to boot into it. I've tried grub-repair, and been thru several youtube vids inclucing this one, but nada. I did get a cpl of Warnings during your "grub-install /dev/sda" step stating "EFI variables cannot be set on this system." and "You will have to complete the GRUB setup manually". I didn't know what I had to do at that point. I don't have any data to speak of on that install yet - just setup of printers, etc, so I'm seriously thinking of redoing the install. (sorry for the long post...) Any suggestions?

johnthomas
Автор

whenever i try to chroot it says failed to run command '/bin.bash' : no such file or directory. im trying to recover a digital ocean droplet after it was destroyed by an angry ex-admin

jamesmarsh
Автор

I get a chroot segmentation fault error do u happen to know what this is?

panayiotispetousis
Автор

I tried your method on a VM of Jammy Jellyfish and it seemed to work well, but when I tried it on my SSD I still get the following error: Error: invalid environment block. 452: out of range pointer: 0xcfff020 Aborted. Press any key to exit. Hitting a key on the keyboard continues the boot process but I never had to hit a key for the OS to boot. If you know what is happening could you give me a hand on trying to fix this? Thanks!

michaelcanino
Автор

The problem for me is that with the other video you don't show how to do it if you've got a separate boot partition like you mentioned. So I'm guessing that it only works for ubuntu based systems or certain installation methods.

luigiprovencher
Автор

This looks identical to your first video.

imacmill
Автор

Just as my caddy broke, thx for the vid

FlamingSwordful
Автор

I need help. It won’t work. I need this. computer! Please help

SkinnyThekittycat
Автор

Followed everything. No errors. Didn't work.

marcooos
Автор

when I try "grub-install /dev/XXY" I got "grub-install: command not found". Any idea?

riccardowanke
Автор

I started facing this issue today, when i was installing figlet-fonts
How do i reach to terminal as you suddenly reach from this grub rescue place

neelchaudhary