For those with UEFI system: also have to mount the efi, in my case I did: mount /dev/sda3 /mnt mount /dev/sda1 /mnt/boot/efi (if you don't have the folder, create one) arch-chroot /mnt ... if your command grub-mkconfig does not found a linux kernel img (my case): mkinitcpio -p linux (should create one, if still don't find it, update your packages: pacman -Syyu grub-install --target=x86_64-efi --efi-directory=/boot/efi grub-mkconfig -o /boot/grub/grub.cfg reboot and good luck.
Man, that was an awesome video on restoring Grub. You sure make stuff look easy. Will definitely want to keep this video bookmarked for future reference.
In case your viewers have the same problems as me also add these commands before you chroot sudo mount -t proc proc /mnt/proc and sudo mount --rbind /dev /mnt/dev plus also sudo mount --rbind /sys /mnt/sys this will help your devices be recognized when chrooted. I always use those commands every time grub won't recognise devices within a live distro. I had the grub issue a lot when using UEFI within Virtualbox. Its ok as long as the ISO is installed once you extract it there is no grub menu. Maybe you could do a video about solutios to that. I think that is normally if I manually create the EFI partition. Great video.
I need to watch this a few hundred times more so that it becomes hard-wired into my brain and I can get to do it in my sleep. Thanks. I copied and saved the notes on your website to a pdf file tucked away safely on my Google Drive ...and also backed up on my tablet. I'm ALMOST looking forward to seeing either of those two Grub errors ...ALMOST! :D
Damn... I went trough this hell over the weekend and took me serveral hours to figure it out and fix it... If I only had this video before... anyhow, Thanks a lot for the video mate!
Thanks! Great video. I've never been able to understand grub command line. I always use the live cd approach. Now I switch from grub to boot directly from UEFI. It is faster and is easier to do dual boot if your BIOS have UEFI OS selector. If I mess up UEFI variables I probably only need efibootmgr from a liveCD to restore my boot configuration. Another unsual configuration in my boot process is having all drivers (and firmware) built-in in kernel. This allows you to avoid use initramfs image. Avoiding initramfs speeds up disk reading from SSD or HD because you have everything you need inside the kernel. The fastest you bring up your devices the fastest init/systemd starts. The fastest you start init/systemd the fastest you get to login prompt. You can archive very fast boot times (3 seconds) if you do that.
thank you so much for this video, i screwed up grub trying to make a dual boot system, been trying for over an hour to fix it and this is the only solution that worked. wish I'd found it sooner...
aye i think i have the same problem tried installing kali linux as dual boot on windows and everytime kali finishes installing it doesnt restart on the kali menu
Great, informative video. I normally end up reinstalling or deleting my install because I don't know how to fix the problem. This video is getting book-marked!
This was going to be a life saver. I had moved part of a partition, from my W7 install, and I received the dreaded Grub Rescue. I learnt that I should have just used GParted... Sadly, this video didn't work for me, even after booting up with a Mint install DVD and using GParted there to complete the partition job. So, in the end, I took a slightly different route and just installed Solus Linux into the 100GB partition I had created for it and let the installer take care of Grub. I'm now triple booted...
My os is linux mint set boot=(hd0,msdos3) set prefix=(hd0,msdos3)/boot/grub insmod normal normal Ok my linux starting up.. Reboot Grub rescue again.. what? So i should type the command every boot? if i type 'set' the display partition is (hd0,msdos2) boot and prefix, but actually this is incorrect, my system and boot and prefix actually in (hd0,msdos3) partition. What i can do this? Every boot, grub rescue again and i should type the command again too.. Sorry if my english is bad :(, i hope your answer..
@@kdbama4 well like I said, from the AUR, and since you cant use yay or makepkg as root you'll have to type it out the old fashioned way "grub-mkconfig -o /boot/grub/grub.cfg"
What if I don't remember the label of my disks? You did it easy and fast because you knew the path of your drive, how can I find that out from the GRUB console?
Great work CT! This is by far the farthest I've gotten with grub cl. Question: What about adding extra things to this boot covered in the first portion so as to add things like noacpi or things like that? How would I type that and where? Thanks so much for your encouragements and insights CT
to know what disk you have just type, #sudo fdisk -l if you are using a hardware raid it will be something like "md126p" or similar For Raid0, you need to reload #GRUB_PRELOAD_MODULES="... mdraid09 mdraid1x" UEFI #grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB *the UEFI portion need to be in fat file format. Recommended when shutting down, will make the system power off faster #sudo umount -a All this information can be found here, you should read it. wiki.archlinux.org/index.php/GRUB well it always help to have some visual conformation also =P thx Chris ^^
Yes! This is probably what I need! I re-installed Windows today, unplugged all my other drives so there could be no mistake... But it overwrote NVRAM and removed my Linux. I can still see the Drive from Windows and can see the EFI partition so I know it is still there, I just need to find a way to get GRUB to put the entry back in NVRAM again.
The boot loader on my PC got corrupted when installing Ubuntu on a second disk. I just wanted each disk to be self-contained in terms of booting. Means, when I change the boot drive in BIOS, it should boot the other disk. Of course, due to the OS auto-detection, in the Grub-menu you can still select the other installation, but when removing the one or the other disk, it should still boot. However, even if I specified the one or the other disk as a boot-loader drive, I end up not being able to boot from both disks. I don't understand what is going on. I has happened several times. So your video was really helpful. Didn't want to follow procedures that mess with chroot etc. I understand, that no EFI or DOS partition is needed, because its all in MBR. But maybe, you could elaborate on how a good system looks like, and what partition/size should be in place to make it future-proof. Thanks anyway.
If you found out the answer to this, could you please share a link or something with me? I need to figure out which one, but im stuck figuring out how.
I watched this while I used Garuda's live DVD to fix Grub (I installed an old version of Ubuntu, for reasons, onto another partition and it reinstalled old Grub and didn't recognize Garuda). I feel like I should do this stuff in the video for practice...
Hi, I installed Rocky Linux 8.5 on VMware after installation I am not able to boot into the OS as when I select the kernel from the grub menu I get a kernel panic error it reads "Kernel panic - not syncing: Fatal exception" it also does not boot into the rescue in the grub menu. I used an iso to boot into the rescue mode & tried to fix/repair the initramfs file using Dracut but that did not fix the issue. I tried the above steps you showed but in my case tab completion does not work properly sometimes it works & sometimes it does not. It's something related to vmlinuz which is causing it but I am not sure what to do or configure in the grub to fix it. can you kindly help. I don't think its an issue with the initramfs because one of my colleagues had fixed this issue using the grub rescue/CLI by passing some parameters like you did
So I just installed linux on a hp laptop, and the install seems to have completed. However now it won't boot, and it goes strait to a menu with two options ( Linux mint 21.1 cinnamon, with linux 5.15.0-56 generic) and Linux mint 21.1 cinnamon, with linux 5.15.0-56 generic (recovery mode) if I select either it goes to loading linux 5.15.0-56 generic ... then directly under it, it says error: bad shim signature, then below that loading initial Ramdisk ....then below that error: you need to load the kernel first. what do I do? I am lost. Thank you in advance for your help.
Ummm I have dual booted windows and kali linux and my problem is that windows is not showing in my grub. And os-prober command will only detect my FreeDOS which was my initial os when I bought my laptop. What should I do?
Oh man thank you so much. Saving this video for sure since it saved me. I was very close to eiping the drive and just using it as extra storage space after linux just stopped booting. But I'm back in again. Well sort of. For some reason it keeps doing this after rebooting but repeating the same commands at the end of the simple one to mount the kernal works fine each time without problem. But I don't want to have to keep doing those commands every time I boot my pc. And I still can't get the normal grub selection screen to show up. I have to switch to windows on a seperate drive by changing the bios boot order. Windows boots fine and normally. I have linux mint on an external ssd which is what's having issues.
Thanks I had the Grub crash all UEFI systems had and managed to fix it but I get a black screen the shows the enter decryption password. My LUKS password still works but there is no prompt what could the cause be?
Questions. When big brother Microsoft overwrites the bootloader with their bootloader (allegedly that happens occasionally with W10 after an update when you dual boot from the same SSD), what is the best way to fix Grub then? You don't get that Grub recovery tool when that happens. Could you boot up with a live-USB and then install the bootloader again? I once bricked my Linux system by installing certain AMD proprietary software for my graphics card which apparently is not supported by those drivers. The same question, I guess. How would you install the proper software when you access your partition via a live-USB? Reinstalling Linux (ideally with some backup-utility) is the easiest solution but that isn't fun. ;)
one thing you could try is using easyBCD from windows, and just use the MS bootloader to boot your linux partition. Not quite as nice as just grub, but it works.
@@dylanstoesz1324 Not for me. I like my nice picture, the ability to configure GRUB (timer and sequence of items) and the ability to load the distro with another kernel. If it happens to my system in the future then I will try out two SSD's with two bootloaders but then it is a bit more clumsy because you have to load the bootmenu first when you start the bootloader for Windows. Or possibly run Windows with PCIe-passthrough with the downside to have a higher power draw and the advantage of Windows not being able to take your system hostage when it updates again..
@@dylanstoesz1324 I'll have to try that again, not sure if it will work though, now you have to purchase it. My m.2 nvme seems to have complicated things, or my mb bios, even updated bios. I have to go into bios settings change things around, then it will see the grub, where ever it is now, but wont linux wont even see windows to list it in grub, spent days once trying to fix this!
Hey bro i have a linux distro and somehow that partition is corrupt and i wont able to load grub and wont able to access bios and bootmenu. It stucks on lenovo logo and after black screen .how to solve it
On non-Arch systems it might not be enough just to mount root and chroot into it in order to reinstall grub from a live medium. Before chrooting you may also have to `mount --bind ` /dev, /sys and /proc from the live medium to their correspondents in the local root directory (in this case to /mnt/dev, etc.).
Hi all, when I type Linu and press tab there are so many choices, and the newest one says incorrect magic number... or something like that. Any suggestions?
I installed Lubuntu 18.04 and it crashed on the final portion which is installing grub. I tried another distro....FreeSpire 6.0, but same issue. I reboot and get to the grub prompt. I'm not sure why the sudo update-grub is not repairing the files in my case.
Im trying to install arch on a usb stick. Its x86 architecture and a uefi bios. If all i need to do is setup the configuration for x86/uefi from i386, van that be done from grub-rescue?
Hi Chris... When I get to the point of entering 'grub-install' and 'grub-mkconfig' in the grub console (prompt is 'grub>') I get told that both commands cannot be found, despite the fact that I have verified that grub is installed and that both commands run in a 'normal' terminal. What am I doing wrong? Distro is XeroLinux (arch based). Thanks.
It’s been a long time since I had to do a grub recovery. But took no problem, I’ve seen a command short cut you can type into grub and it will automatically point to where the file is your recovering..do u know what that is? Gracias
Very helpful Chris Titus Tech, thank you so much! Somehow during a LMDE install Grub got hosed and when I repaired Grub with a Live Debian USB it still booted to grub rescue. Found out in the BIOS the distros somehow got switched around.When I put the devices back in order sda, sdb and sdc and rebooted from the BIOS I had Grub again. Any idea how the /etc/default/grub got mis-configured?
I accidentally deleted my /boot folder for kali linux...... It is showing the same error '/boot/grub/i386-pc/normal.mod' not found. Can you help me? PLEASE ASAP
Sir please answer this. I am using ubuntu 20.04 I tried to install some packages which includes kernel headers as well. Now I see two kernels. And I am getting this boot error. I have checked the error by pressing ESC at the booting time all services boot properly at the end I see "grub failed boot detection". Is this video can help me ? Because I have data in root directory and users directory as well. And I have GPT file system.
Thanks - great vid BUT, when executing (in Ubuntu 22.04 terminal) "sudo chroot /mnt" I get the following response: "chroot: failed to run command '/bin/bash' : No such file or directory. Any suggestions from anyone would be greatly appreciated.
Hey chris i have got the issues with kali linux, i am new to kali and a day ago i installed it and the problem that i have got is i cant login to kali when i am in a normal mode or advance mode, to login into kali always i have to use recovery mode . so, if their is any solutions to fix it please let me know
How do I reset parrot os back to fresh install or like in windows as I am new and some of my frn got access to my os and messing with me ... Pls aid me
THANK YOU THANK YOU THAAANK YOU!!!111 srsly, BUT.... i needed that info YESTERDAY ^^ i spent my whole day to figure out why the hell my ubuntu grub bootloader resets to the grub-recovery "shell" everytime i rebooted... the TAB "help" was not helping at all, so i just used trial&error to find out which command could help... after a few failures because i was supposed to give that specific command a file/folder or that i needed to load a kernel first, my first success came when i used the fwsetup command, which reset my pc and opened the UEFI bios, there i didn't do anything, just hit F10 and the pink ubuntu grub menu magicially appeared... BUT, when choosing the normal ubuntu boot, it froze during boot, so i tried the recovery kernel, ended up in a recovery menu. there i selected grub repair, got a msg that several files couldn't be found, they were recreated, after that i could hit resume and ubuntu would boot normally... until the next reboot ^^ at one point i just typed "exit" from the grub rescue and that saved me from going through the bios and instead the grub bootloader appeared immediately, but i still had to recover, repair, resume.... FYI: i installed the ubuntu distro on top of 2 windows 10 installations (one RTM, one skip-ahead-insider-preview) and these had no problems booting after getting to the ubuntu grub menu... for my ubuntu i intentionally didn't use the SSD i used for my Win10 setups, but shrunk an old 2 TB HDD and formatted the unused space with ext4. mainly because i didn't want to stress my SSD with all the read/writes that i knew would happen in ubuntu (i installed bionic beaver, updated, upgraded, dist-upgraded and then did a do-release-upgrade to ubuntu cosmic, alongside with a bunch of other software packages, beginning with aptitude, then other essential stuff and after that lutris, wine, etc. because my goal was to test if i could get my favourite games (mainly Overwatch, which seems to be a troublemaker on linux) to work and how good the experience was when compared to gaming on win10. this is btw the second time you uploaded information i did need the day before about linux problems, can't remember what it was, but omg i like your content anyway, keep going dude :*
I experieced a weird situation with ubuntu 22.04. I had my os installed in a usb stick, which already came with an efi partition, but after a system update the bootloader somehow started to use another efi partition on the cmputer ssd. Not sure these two thing are related. I set ubuntu as the first entry of uefi boot list, so when I boot my computer without ubuntu usb pluged, it loads ubuntu efi file but can't find the os, then ends up getting into grub. Solved this by copying everything under efi partition of ssd into that of the usb, then configuring it mannually with efibootmgr
Sir i deleted grub.cfg now am not able to boot ubuntu... As soon as i switch on i get grub loader and i exit it it goes to boot options there is i choose windows it works properly and if i choose Ubuntu again grub loader comes... Its kind of loop. Plz help me i have important documents in Ubuntu
Actually, I managed to fix mine from grub rescue. First as you did you need to find which msdos contains your OS. ls (hd0,msdos6)\ for example, if it shows your root file directory then that's the one. set boot=(hd0,msdos6) set prefix=(hd0,msdos6)/boot/grub insmod normal normal Then you are back on grub, boot to linux and run from the terminal update-grub grub-install /dev/sda Edit: i keep mixing up update-grub
Hi Chris, Not sure you'll be able to help, but I'm desperate and I'm throwing a hail Mary in your direction. Will try to keep it short: 1) I installed Manjaro 20.0 KDE a few days ago and have been LOVING it. I had one complete screen freeze the first day (and learned to switch off the power saving settings). Couple days problem free and configured it to my liking. 2) Today I was simply watching a youtube video (one of yours with CLI suggestions) and put it on hold for one minute. When I came back, my screen was completely frozen again and the only way I could reboot was using a hard reset (turning off the machine). From that point onwards, any attempt to reboot has given me END KERNEL PANIC. I've spent the past 5 hours attempting to reboot using the iso pendrive in order to get into terminal (from live) and restore grub. I ran across your video about this subject as was able to proceed all the way through your commands right up to the point where you enter "grub> boot" (minute 4:56 of the video above). But instead of booting, I get another ---[ END KERNEL PANIC not syncing: Fatal exception in interrupt ]--- Any chance I can recover, or any suggestions ? I could send you an image of the screen code that might help you identify the issue (can't upload it here...) Hope you see this and can help. Kind regards, Steve (from Italy and going on month number 3 of lockdown)
i am in this grub i got dual boot windows and linux mint. i need help. can someone help me im stuck i dont know how i find my driver but i found mine on gpt 3 but dont now were to get it
Hi i have accidentally deleted and allocated the hidden 50gb drive which is Linux grub stored drive and stored my 25gb file in that drive. When i restart the laptop it came to entering rescue mode... grub rescue> command page. Now the problem is i can't able to repair my windows because of the 25gb file which i stored in linux grub hidden drive. How to solve this problem pls help me.
Does anyone know where I can find a video that explains how to fix the “unable to install grub” issue, I’ve been trying to find the answer and fix this problem for four months now, please! any help would be greatly appreciated!
I seem to have an unsolvable issue no one else has. Nothing is in my (hd0, msdos1) or (hd0, msdos2) partitions. When I list the contents I get the message, "filesystem is unknown". The 3rd partition is (proc) and when I list the contents I just get "Filesystem is procfs". And the road ends there. I can not set this as the root directory. BACKGROUND: I had a dual boot Windows 10 and Manjaro. The Windows 10 update knocked out Manjaro and I was in the midst of successfully installing from the Manjaro .iso. But I noticed that Manjaro had taken over all but some 400MB of my hard drive space (regular hard drive and not a SSD) and I only later learned about how to manually extend the Windows partition space. Bottom line: Now Windows 10 doesn't have enough space to boot and Manjaro has gone to Grub Rescue and will not recognize the .iso from the USB. I'm on a Dell Lattitude and FINE with reformatting the hard drive if I could access an OS. Any sound suggestions would be appreciated!
In my VMware, in Kali Linux, I did this sudo apt-get upgrade command and it was downloading . After some time the screen was off and I itried to wake but only Black Screen with a Flashing Cursor, so I shutdown it and restarted but it didn't starting. please help me out.... The host is starting but the virtual is not. Please please help anyone....
If you get a kernel panic after fixing grub DO NOT PANIC sometimes the filesystem partition changes of hd value so reboot the machine and press "c" on the grub menu and execute the "ls" command again and verify if the name has change if it has change redo the tutorial and it will fix it
Tip :: Every Linux user, especially new users should keep a live usb with them.
True words ❤️...I have done many times this
not only new users tbh everyone needs to hv one
I keep 6😂
I got that lesson today
@@deezz244 lol
"Only takes 30 seconds to a minute..." I'm on day two...
I'm on this a week later.
I started using Linux one month ago. This is way above my head. I don't know what you are talking about.
For those with UEFI system:
also have to mount the efi, in my case I did:
mount /dev/sda3 /mnt
mount /dev/sda1 /mnt/boot/efi (if you don't have the folder, create one)
arch-chroot /mnt
...
if your command grub-mkconfig does not found a linux kernel img (my case):
mkinitcpio -p linux (should create one, if still don't find it, update your packages: pacman -Syyu
grub-install --target=x86_64-efi --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
reboot and good luck.
Hey I have a problem in grub reinstall in my fedora 😢
I just had one of my systems boot to Grub Rescue. You could not have posted this a better time. Thank you.
Man, that was an awesome video on restoring Grub. You sure make stuff look easy. Will definitely want to keep this video bookmarked for future reference.
update-grub is available on Manjaro by default, too.
After your explanation, it becomes so easy, it was a nightmare to me.
6:12 notice the excitement when he is about to mess up the grub real bad
Bro 4:07
In mine it says
Unknown command 'linux'
@@samratpandey5131 Are you in Rescue? If not try replacing the command with "load"
😮
This video has saved me multiple times from destruction caused by my shenanigans, thanks Chris!
In case your viewers have the same problems as me also add these commands before you chroot sudo mount -t proc proc /mnt/proc and sudo mount --rbind /dev /mnt/dev plus also sudo mount --rbind /sys /mnt/sys this will help your devices be recognized when chrooted. I always use those commands every time grub won't recognise devices within a live distro. I had the grub issue a lot when using UEFI within Virtualbox. Its ok as long as the ISO is installed once you extract it there is no grub menu. Maybe you could do a video about solutios to that. I think that is normally if I manually create the EFI partition. Great video.
This is awesome, i spent like 4 hours trying every possible solution, and only this one worked! Thank you very much!
You're so helpful Chris with all your videos, thank you so much for all the effort you put into them.
I need to watch this a few hundred times more so that it becomes hard-wired into my brain and I can get to do it in my sleep. Thanks. I copied and saved the notes on your website to a pdf file tucked away safely on my Google Drive ...and also backed up on my tablet. I'm ALMOST looking forward to seeing either of those two Grub errors ...ALMOST! :D
😆😆
@@mTrader1 what is your rating
@@Sakuraigi 2050
@@Sakuraigi what color is your buggati
thank god someone who isnt having a harsh indian accent
I agree but they speak 8 to 15 languages, if you try to speak their language you will sound even harsher.
@@ksl927 damn this was a bad comment i left 2 years ago, how times have changed
Damn... I went trough this hell over the weekend and took me serveral hours to figure it out and fix it... If I only had this video before... anyhow, Thanks a lot for the video mate!
Thank you! I was having an issue getting AntiX to install grub and thanx to it's chroot tool and your tutorial, I got grub working again!
I checked a few resources, this is the process that finally worked for me. Thanks Chris
Thanks! Great video. I've never been able to understand grub command line. I always use the live cd approach.
Now I switch from grub to boot directly from UEFI. It is faster and is easier to do dual boot if your BIOS have UEFI OS selector.
If I mess up UEFI variables I probably only need efibootmgr from a liveCD to restore my boot configuration.
Another unsual configuration in my boot process is having all drivers (and firmware) built-in in kernel. This allows you to avoid use initramfs image.
Avoiding initramfs speeds up disk reading from SSD or HD because you have everything you need inside the kernel.
The fastest you bring up your devices the fastest init/systemd starts. The fastest you start init/systemd the fastest you get to login prompt.
You can archive very fast boot times (3 seconds) if you do that.
thank you so much for this video, i screwed up grub trying to make a dual boot system, been trying for over an hour to fix it and this is the only solution that worked. wish I'd found it sooner...
aye i think i have the same problem tried installing kali linux as dual boot on windows and everytime kali finishes installing it doesnt restart on the kali menu
Great, informative video. I normally end up reinstalling or deleting my install because I don't know how to fix the problem. This video is getting book-marked!
Well, today the second part of the video saved my main arch computer after an update. Thanks Chris!
This was going to be a life saver. I had moved part of a partition, from my W7 install, and I received the dreaded Grub Rescue. I learnt that I should have just used GParted... Sadly, this video didn't work for me, even after booting up with a Mint install DVD and using GParted there to complete the partition job.
So, in the end, I took a slightly different route and just installed Solus Linux into the 100GB partition I had created for it and let the installer take care of Grub. I'm now triple booted...
great job including your notes. this is very helpful. hope you do this on all your great videos - thanks old tony
THANKS A LOT, GOD FINALLY A TUTORIAL ACTUALLY USEFUL
I need to destroy my Grub now just to use this very useful information. Thanks :)
My os is linux mint
set boot=(hd0,msdos3)
set prefix=(hd0,msdos3)/boot/grub
insmod normal
normal
Ok my linux starting up..
Reboot
Grub rescue again.. what? So i should type the command every boot?
if i type 'set' the display partition is (hd0,msdos2) boot and prefix, but actually this is incorrect, my system and boot and prefix actually in (hd0,msdos3) partition. What i can do this? Every boot, grub rescue again and i should type the command again too..
Sorry if my english is bad :(, i hope your answer..
Great video. I had to do this awhile back to my server. Thanks!
for people on arch, there is a "update-grub" package in the aur if your lazy like me
and can you please explain how to use it!?
@@ALPHONSO_NANOOK install the package and you can run "sudo update-grub" on arch
@@lemler3337 Not from the live CD
@@kdbama4 well like I said, from the AUR, and since you cant use yay or makepkg as root you'll have to type it out the old fashioned way "grub-mkconfig -o /boot/grub/grub.cfg"
lemler 3 yes that’s what I ended up doing
What if I don't remember the label of my disks?
You did it easy and fast because you knew the path of your drive, how can I find that out from the GRUB console?
Great work CT! This is by far the farthest I've gotten with grub cl.
Question:
What about adding extra things to this boot covered in the first portion so as to add things like noacpi or things like that?
How would I type that and where?
Thanks so much for your encouragements and insights CT
to know what disk you have just type,
#sudo fdisk -l
if you are using a hardware raid it will be something like
"md126p" or similar
For Raid0, you need to reload
#GRUB_PRELOAD_MODULES="... mdraid09 mdraid1x"
UEFI
#grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB
*the UEFI portion need to be in fat file format.
Recommended
when shutting down, will make the system power off faster
#sudo umount -a
All this information can be found here, you should read it.
wiki.archlinux.org/index.php/GRUB
well it always help to have some visual conformation also =P
thx Chris ^^
Great video, still working like a charm in 2024.
How can you build a custom .iso for installing OS and apps
what partition has grub
what apps are good to have on a usb to use for a rescue USB
Thanks for this!.....I've always wanted to have a better understanding of the whole "grub" thing!
Yes! This is probably what I need! I re-installed Windows today, unplugged all my other drives so there could be no mistake... But it overwrote NVRAM and removed my Linux. I can still see the Drive from Windows and can see the EFI partition so I know it is still there, I just need to find a way to get GRUB to put the entry back in NVRAM again.
How do you do this on Debian with a separate boot partition,though?
Nice walk through Chris, great channel
Chris, why do you run grub-mkconfig before grub-install? Are there ever scenarios where grub-mkconfig should be run **after** grub-install ?
The boot loader on my PC got corrupted when installing Ubuntu on a second disk. I just wanted each disk to be self-contained in terms of booting. Means, when I change the boot drive in BIOS, it should boot the other disk. Of course, due to the OS auto-detection, in the Grub-menu you can still select the other installation, but when removing the one or the other disk, it should still boot. However, even if I specified the one or the other disk as a boot-loader drive, I end up not being able to boot from both disks. I don't understand what is going on. I has happened several times.
So your video was really helpful. Didn't want to follow procedures that mess with chroot etc. I understand, that no EFI or DOS partition is needed, because its all in MBR. But maybe, you could elaborate on how a good system looks like, and what partition/size should be in place to make it future-proof.
Thanks anyway.
I installed windows 10in a spearate partitions but it doesnt work grub boot lader is not even opening and linux boots automatically how to fix it?
At 4.15 you say you'll tell us how to figure out which drive to enter sda1 sda2 etc - soooo is there going to be a follow up video for that?
If you found out the answer to this, could you please share a link or something with me? I need to figure out which one, but im stuck figuring out how.
I watched this while I used Garuda's live DVD to fix Grub (I installed an old version of Ubuntu, for reasons, onto another partition and it reinstalled old Grub and didn't recognize Garuda). I feel like I should do this stuff in the video for practice...
Hi, I installed Rocky Linux 8.5 on VMware after installation I am not able to boot into the OS as when I select the kernel from the grub menu I get a kernel panic error it reads "Kernel panic - not syncing: Fatal exception" it also does not boot into the rescue in the grub menu. I used an iso to boot into the rescue mode & tried to fix/repair the initramfs file using Dracut but that did not fix the issue. I tried the above steps you showed but in my case tab completion does not work properly sometimes it works & sometimes it does not. It's something related to vmlinuz which is causing it but I am not sure what to do or configure in the grub to fix it. can you kindly help.
I don't think its an issue with the initramfs because one of my colleagues had fixed this issue using the grub rescue/CLI by passing some parameters like you did
So I just installed linux on a hp laptop, and the install seems to have completed. However now it won't boot, and it goes strait to a menu with two options ( Linux mint 21.1 cinnamon, with linux 5.15.0-56 generic) and Linux mint 21.1 cinnamon, with linux 5.15.0-56 generic (recovery mode) if I select either it goes to loading linux 5.15.0-56 generic ... then directly under it, it says error: bad shim signature, then below that loading initial Ramdisk ....then below that error: you need to load the kernel first. what do I do? I am lost. Thank you in advance for your help.
I can do it on every linux version? I can't install linux mint and Lubuntu after a dumb thing I did
Ummm I have dual booted windows and kali linux and my problem is that windows is not showing in my grub. And os-prober command will only detect my FreeDOS which was my initial os when I bought my laptop. What should I do?
Thank you, i can go back to my Linux after windows update
Oh man thank you so much. Saving this video for sure since it saved me. I was very close to eiping the drive and just using it as extra storage space after linux just stopped booting. But I'm back in again. Well sort of.
For some reason it keeps doing this after rebooting but repeating the same commands at the end of the simple one to mount the kernal works fine each time without problem. But I don't want to have to keep doing those commands every time I boot my pc. And I still can't get the normal grub selection screen to show up. I have to switch to windows on a seperate drive by changing the bios boot order. Windows boots fine and normally. I have linux mint on an external ssd which is what's having issues.
I had to check. First you said "grub-update" then later you said "update-grub." It appears to be "update-grub" which must be run with "sudo."
Thanks I had the Grub crash all UEFI systems had and managed to fix it but I get a black screen the shows the enter decryption password. My LUKS password still works but there is no prompt what could the cause be?
Questions.
When big brother Microsoft overwrites the bootloader with their bootloader (allegedly that happens occasionally with W10 after an update when you dual boot from the same SSD), what is the best way to fix Grub then? You don't get that Grub recovery tool when that happens. Could you boot up with a live-USB and then install the bootloader again?
I once bricked my Linux system by installing certain AMD proprietary software for my graphics card which apparently is not supported by those drivers. The same question, I guess. How would you install the proper software when you access your partition via a live-USB? Reinstalling Linux (ideally with some backup-utility) is the easiest solution but that isn't fun. ;)
Great Question, and yes, you use live installation media and simply do the chroot, update-grub, install-grub and done.
one thing you could try is using easyBCD from windows, and just use the MS bootloader to boot your linux partition. Not quite as nice as just grub, but it works.
@@dylanstoesz1324
Not for me. I like my nice picture, the ability to configure GRUB (timer and sequence of items) and the ability to load the distro with another kernel. If it happens to my system in the future then I will try out two SSD's with two bootloaders but then it is a bit more clumsy because you have to load the bootmenu first when you start the bootloader for Windows. Or possibly run Windows with PCIe-passthrough with the downside to have a higher power draw and the advantage of Windows not being able to take your system hostage when it updates again..
@@dylanstoesz1324 I'll have to try that again, not sure if it will work though, now you have to purchase it. My m.2 nvme seems to have complicated things, or my mb bios, even updated bios. I have to go into bios settings change things around, then it will see the grub, where ever it is now, but wont linux wont even see windows to list it in grub, spent days once trying to fix this!
Hey bro i have a linux distro and somehow that partition is corrupt and i wont able to load grub and wont able to access bios and bootmenu. It stucks on lenovo logo and after black screen .how to solve it
On non-Arch systems it might not be enough just to mount root and chroot into it in order to reinstall grub from a live medium. Before chrooting you may also have to `mount --bind ` /dev, /sys and /proc from the live medium to their correspondents in the local root directory (in this case to /mnt/dev, etc.).
You saved my butt... Thank you.
My boot screen only has the word grub nothing more nor will it boot a live USB. Any thoughts? Need help.
Hi all, when I type Linu and press tab there are so many choices, and the newest one says incorrect magic number... or something like that. Any suggestions?
Hello,
It saying that init command not found.
Can tell what I am doing wrong?
I installed Lubuntu 18.04 and it crashed on the final portion which is installing grub. I tried another distro....FreeSpire 6.0, but same issue. I reboot and get to the grub prompt. I'm not sure why the sudo update-grub is not repairing the files in my case.
Im trying to install arch on a usb stick. Its x86 architecture and a uefi bios. If all i need to do is setup the configuration for x86/uefi from i386, van that be done from grub-rescue?
Hi Chris... When I get to the point of entering 'grub-install' and 'grub-mkconfig' in the grub console (prompt is 'grub>') I get told that both commands cannot be found, despite the fact that I have verified that grub is installed and that both commands run in a 'normal' terminal. What am I doing wrong? Distro is XeroLinux (arch based). Thanks.
4:17 I got error: file '/boot/vmlinuz-linux' not found
Help quickly plz!
You got an asnwer?
It’s been a long time since I had to do a grub recovery. But took no problem, I’ve seen a command short cut you can type into grub and it will automatically point to where the file is your recovering..do u know what that is? Gracias
??
Helo, i have some problem, ls result only shown (proc) and (hd0), i cant found ubuntu partition wich contain boot loader. Cant you help me
Very helpful Chris Titus Tech, thank you so much! Somehow during a LMDE install Grub got hosed and when I repaired Grub with a Live Debian USB it still booted to grub rescue. Found out in the BIOS the distros somehow got switched around.When I put the devices back in order sda, sdb and sdc and rebooted from the BIOS I had Grub again. Any idea how the /etc/default/grub got mis-configured?
I accidentally deleted my /boot folder for kali linux...... It is showing the same error '/boot/grub/i386-pc/normal.mod' not found. Can you help me? PLEASE ASAP
Im stuck on linux /boot/linuz-linux root=/dev/sda1 it says file not found someone help
How do I do the second option but on Mint?
You are the best my friend. Thanks a lot.
Sir please answer this.
I am using ubuntu 20.04 I tried to install some packages which includes kernel headers as well. Now I see two kernels. And I am getting this boot error. I have checked the error by pressing ESC at the booting time all services boot properly at the end I see "grub failed boot detection". Is this video can help me ? Because I have data in root directory and users directory as well. And I have GPT file system.
Thanks - great vid BUT, when executing (in Ubuntu 22.04 terminal) "sudo chroot /mnt" I get the following response: "chroot: failed to run command '/bin/bash' : No such file or directory.
Any suggestions from anyone would be greatly appreciated.
Hey chris i have got the issues with kali linux, i am new to kali and a day ago i installed it and the problem that i have got is i cant login to kali when i am in a normal mode or advance mode, to login into kali always i have to use recovery mode . so, if their is any solutions to fix it please let me know
Thank you so much, worked great!!!
Thank you sir it really help me to fix my grub menu
How do I reset parrot os back to fresh install or like in windows as I am new and some of my frn got access to my os and messing with me ... Pls aid me
THANK YOU THANK YOU THAAANK YOU!!!111 srsly, BUT.... i needed that info YESTERDAY ^^
i spent my whole day to figure out why the hell my ubuntu grub bootloader resets to the grub-recovery "shell" everytime i rebooted... the TAB "help" was not helping at all, so i just used trial&error to find out which command could help... after a few failures because i was supposed to give that specific command a file/folder or that i needed to load a kernel first, my first success came when i used the fwsetup command, which reset my pc and opened the UEFI bios, there i didn't do anything, just hit F10 and the pink ubuntu grub menu magicially appeared... BUT, when choosing the normal ubuntu boot, it froze during boot, so i tried the recovery kernel, ended up in a recovery menu. there i selected grub repair, got a msg that several files couldn't be found, they were recreated, after that i could hit resume and ubuntu would boot normally... until the next reboot ^^
at one point i just typed "exit" from the grub rescue and that saved me from going through the bios and instead the grub bootloader appeared immediately, but i still had to recover, repair, resume.... FYI: i installed the ubuntu distro on top of 2 windows 10 installations (one RTM, one skip-ahead-insider-preview) and these had no problems booting after getting to the ubuntu grub menu...
for my ubuntu i intentionally didn't use the SSD i used for my Win10 setups, but shrunk an old 2 TB HDD and formatted the unused space with ext4. mainly because i didn't want to stress my SSD with all the read/writes that i knew would happen in ubuntu (i installed bionic beaver, updated, upgraded, dist-upgraded and then did a do-release-upgrade to ubuntu cosmic, alongside with a bunch of other software packages, beginning with aptitude, then other essential stuff and after that lutris, wine, etc. because my goal was to test if i could get my favourite games (mainly Overwatch, which seems to be a troublemaker on linux) to work and how good the experience was when compared to gaming on win10.
this is btw the second time you uploaded information i did need the day before about linux problems, can't remember what it was, but omg i like your content anyway, keep going dude :*
ls command and insmod normal both returns "error : no such partition". What can I do? How can i boot to windows?
Wow finnally got that ancient grub was pretty hard but the cloak helped me.
Verry helpful. Thank you! Chris
okay so what if you accidentally ruined most of the system? (missing mtab and fstab, kernel images, and a bunch of other stuff)
I experieced a weird situation with ubuntu 22.04. I had my os installed in a usb stick, which already came with an efi partition, but after a system update the bootloader somehow started to use another efi partition on the cmputer ssd. Not sure these two thing are related. I set ubuntu as the first entry of uefi boot list, so when I boot my computer without ubuntu usb pluged, it loads ubuntu efi file but can't find the os, then ends up getting into grub. Solved this by copying everything under efi partition of ssd into that of the usb, then configuring it mannually with efibootmgr
Sir i deleted grub.cfg now am not able to boot ubuntu... As soon as i switch on i get grub loader and i exit it it goes to boot options there is i choose windows it works properly and if i choose Ubuntu again grub loader comes... Its kind of loop. Plz help me i have important documents in Ubuntu
Actually, I managed to fix mine from grub rescue.
First as you did you need to find which msdos contains your OS.
ls (hd0,msdos6)\ for example, if it shows your root file directory then that's the one.
set boot=(hd0,msdos6)
set prefix=(hd0,msdos6)/boot/grub
insmod normal
normal
Then you are back on grub, boot to linux and run from the terminal
update-grub
grub-install /dev/sda
Edit: i keep mixing up update-grub
You saved my life bro
What if you want to move the boot folder in a boot partition?
How can you do it?
Hi Chris,
Not sure you'll be able to help, but I'm desperate and I'm throwing a hail Mary in your direction.
Will try to keep it short:
1) I installed Manjaro 20.0 KDE a few days ago and have been LOVING it. I had one complete screen freeze the first day (and learned to switch off the power saving settings). Couple days problem free and configured it to my liking.
2) Today I was simply watching a youtube video (one of yours with CLI suggestions) and put it on hold for one minute. When I came back, my screen was completely frozen again and the only way I could reboot was using a hard reset (turning off the machine).
From that point onwards, any attempt to reboot has given me END KERNEL PANIC.
I've spent the past 5 hours attempting to reboot using the iso pendrive in order to get into terminal (from live) and restore grub.
I ran across your video about this subject as was able to proceed all the way through your commands right up to the point where you enter "grub> boot" (minute 4:56 of the video above).
But instead of booting, I get another ---[ END KERNEL PANIC not syncing: Fatal exception in interrupt ]---
Any chance I can recover, or any suggestions ?
I could send you an image of the screen code that might help you identify the issue (can't upload it here...)
Hope you see this and can help.
Kind regards,
Steve (from Italy and going on month number 3 of lockdown)
Just curious but Did you ever fix it man ?
i am in this grub i got dual boot windows and linux mint. i need help. can someone help me im stuck i dont know how i find my driver but i found mine on gpt 3 but dont now were to get it
Hi i have accidentally deleted and allocated the hidden 50gb drive which is Linux grub stored drive and stored my 25gb file in that drive. When i restart the laptop it came to entering rescue mode... grub rescue> command page. Now the problem is i can't able to repair my windows because of the 25gb file which i stored in linux grub hidden drive. How to solve this problem pls help me.
"Cuz that's what most people do, they go and install grub and just don't pay attention"
You don't gotta call me out like that man.
Looks like the btrfs module is missing. „Unknown filesystem“
Does anyone know where I can find a video that explains how to fix the “unable to install grub” issue, I’ve been trying to find the answer and fix this problem for four months now, please! any help would be greatly appreciated!
I seem to have an unsolvable issue no one else has. Nothing is in my (hd0, msdos1) or (hd0, msdos2) partitions. When I list the contents I get the message, "filesystem is unknown". The 3rd partition is (proc) and when I list the contents I just get "Filesystem is procfs". And the road ends there. I can not set this as the root directory.
BACKGROUND: I had a dual boot Windows 10 and Manjaro. The Windows 10 update knocked out Manjaro and I was in the midst of successfully installing from the Manjaro .iso. But I noticed that Manjaro had taken over all but some 400MB of my hard drive space (regular hard drive and not a SSD) and I only later learned about how to manually extend the Windows partition space. Bottom line: Now Windows 10 doesn't have enough space to boot and Manjaro has gone to Grub Rescue and will not recognize the .iso from the USB. I'm on a Dell Lattitude and FINE with reformatting the hard drive if I could access an OS. Any sound suggestions would be appreciated!
Best video on youtube
i messed my debian installation and was landed to grub page. Thank u very much
How should i find with ada is my system ?
will these work on Linux mint , i also got an error "no such partition" when i deleted a partition .
damn bro, i have watched so many videos, but ty so much for help me
but i accidently deleted my ubuntu (yes i am very dumb) not the partition but the linux.. please help me :'( and the grub is still there
Waht is the method for windows .? If same case we face fo windows
Thank you so much..... I found it really helpful
In my VMware, in Kali Linux, I did this sudo apt-get upgrade command and it was downloading . After some time the screen was off and I itried to wake but only Black Screen with a Flashing Cursor, so I shutdown it and restarted but it didn't starting. please help me out.... The host is starting but the virtual is not. Please please help anyone....
If you get a kernel panic after fixing grub DO NOT PANIC sometimes the filesystem partition changes of hd value so reboot the machine and press "c" on the grub menu and execute the "ls" command again and verify if the name has change if it has change redo the tutorial and it will fix it
Excellent!, the first method worked for me just fine =D, thanks for share.