Disaster Recovery when GRUB dies

  Рет қаралды 9,074

DorianDotSlash

DorianDotSlash

Күн бұрын

Preparation, and knowing how to restore GRUB, can save you from an unbootable system. Here's a couple tips on recovery, and how to chroot into your broken system to restore GRUB.
---- Commands to chroot ------------------------------------------------------------------
sudo mount /dev/(DEVICE HERE) /mnt
sudo mount --bind /proc /mnt/proc
sudo mount --bind /dev /mnt/dev
sudo mount --bind /sys /mnt/sys
ALSO don't forget to mount your BOOT EFI partition if you have a UEFI System
finally to get internet working (I made a typo in the video, there no 'e' in resolv):
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
---------------------------------------------------------------------------------------------------------------------
Links:
TimeShift video : • Backup Linux with TIME...
Recovery with TimeShift : • How I fixed my bootloa...
Gparted Live : gparted.org/livecd.php
Arch-based Distros : wiki.archlinux.org/index.php/...
Patreon support : / doriandotslash
Music by MrGamer (@AndreasRohdin): / gamermachine

Пікірлер: 37
@novikovPrinciple
@novikovPrinciple 4 жыл бұрын
Basically me everytime Windows 10 rolls out another "necessary" update and screws up my dual boot
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Hah yeah that can happen. I completely got rid of Windows not that long ago. No regrets!
@Selbstdenkender
@Selbstdenkender 3 жыл бұрын
That's why I stopped using Windows and started using qemu/KVM to run Windows programs in a VM in Linux. I recommend it.
@mamartin2966
@mamartin2966 4 жыл бұрын
Great video and a plus for the commands in the description. 1) why do you use ./ before the path when removing grub catalog? (rm -rf ./grub) 2) how do you screen capture when a PC is rebooting to see BIOS booting, Grub, and so forth - is it like some external recorder/grabber? 3) couldn't you just recreate a grub config without installing it? 4) I think you can also use in Mint/Ubuntu/Debian when booting grub (if you have other problems than grub itself) to use Advance Options -> recovery (or similar) to fix some system issues, no to reinstall the system as advised in the end of the video. Thanks
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Thanks! 1) The dot slash ./ means the current directory you're in. It's force of habit for my to use it all the time and just ensures I'm calling the right file. There isn't always a need for it. 2) Yes and external screen recorder. 3) Yes you could, but reinstalling it also helps in case grub itself is corrupt. You could skip that step and see if it works, and if not, then reinstall grub. But I find it just saves time to do both. 4) Correct. Most distros give you a recovery option, however, that doesn't help if grub won't even start at all.
@GuyPipili
@GuyPipili 4 жыл бұрын
You should also talk about ventoy where it's easy to put multiple iso on one thumbdrive very easily.
@maxsilvester1327
@maxsilvester1327 4 жыл бұрын
I think the kernel unmounts everything automatically on reboot/shutdown
@hammerheadcorvette4
@hammerheadcorvette4 4 жыл бұрын
I'd like to see systemd-boot video if possible
@thenextpoetician6328
@thenextpoetician6328 4 жыл бұрын
Good to know the CLI solution. I gave myself major problems within days as a noob late last winter, and went with SuperGrub2 because it's just too easy. Saved my system many times. In the last few weeks I've installed Regolith, then i3wm alongside Mint Cinnamon, then ArcoLinux with i3, xfce, and OpenBox. I'm in a bit over my head, but that's one way to learn to swim. It's the space-efficiency and compartmentalization, and inherent focus. Without tiling, every window starts in competition with every other to be in front. Tiling is shoulder to shoulder. Small t truth is that set of inter-locking universalizable principles of Reason governing all relations and actions. So it fits. It's a way of thinking. I'm finding quirks of the system. :-o)
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Getting in over your head is sometimes the best way to learn ;) I find i3 ok, but it's just a personal preference to not use it. I tend to forget keybindings easily lol
@thenextpoetician6328
@thenextpoetician6328 4 жыл бұрын
@@Doriandotslash The thing is they're not universal. First Rule for me is refresh the system don't reload it. If I had a memory for CLI procedures that would be my preference. You make it easy to follow along. Great choice on the new CPU.
@Doriandotslash
@Doriandotslash 4 жыл бұрын
@@thenextpoetician6328 Thanks! The real appeal was being able to upgrade to a newer/better CPU without having to change the motherboard :)
@thenextpoetician6328
@thenextpoetician6328 4 жыл бұрын
@@Doriandotslash Right arm. Saves bucks for now, and it's a chip which will be supported for years if you just decide you can't live without some fancy new features down the road. :)
@maxsilvester1327
@maxsilvester1327 4 жыл бұрын
If you use an arch live cd, you can just mount the partitions and do arch-chroot. This will do all bind mounts automaticaly and then chroot. I think manjaro-chroot works as well but I haven't used it
@Doriandotslash
@Doriandotslash 4 жыл бұрын
True. But even though I am an Arch user, I'm well aware that Arch isn't for everyone. Gparted gives you some graphical tools to work with.
@inteliconn995
@inteliconn995 Жыл бұрын
Thanks!
@djsensacion7
@djsensacion7 4 жыл бұрын
Great video ! Could I request an update on your Fedora 30 Silverblue experience?
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Other than the Silverblue Update video I posted? I'm still using it on my main laptop and it's still running great and I have no complaint about it at all! I would definitely recommend it for a regular desktop distro any day.
@djsensacion7
@djsensacion7 4 жыл бұрын
@@Doriandotslash I'm currently on F30 workstation and have been looking into possibly making the leap, but I have steam with proton & Lutris running great, so I don't want to break that current install. I do like the Atomic concept and containers for development. I guess toolbox would replace the use of systemd-nspawn or but I also sandbox apps like Firefox using sandbox from selinux. So my use case is different from a normal user
@Doriandotslash
@Doriandotslash 4 жыл бұрын
@@djsensacion7 Yeah the gaming might be affected, but there is a Steam flatpak that works great, and you can install graphics drivers as a package layer on top of the OS. But if you were to try it out or even try it as a dual-boot, I'd strongly recommend doing a full backup of your drive first, just in case.
@shorthornstudios
@shorthornstudios 4 жыл бұрын
One time I had a grub issue on my experiment linux machine so I reinstalled linux.
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Well now you know how to fix it 😉
@djf14x88
@djf14x88 Жыл бұрын
If you accidentally delete the folder containing Grub in it, can't you just boot into the live environment and recover the folder using Testdisk? Wouldn't that be a lot easier?
@aprilmintacpineda2713
@aprilmintacpineda2713 4 жыл бұрын
How are you recording your screen even when your PC is booting up?
@Doriandotslash
@Doriandotslash 4 жыл бұрын
External video capture onto my production machine.
@Tomyb15
@Tomyb15 4 жыл бұрын
How different is the process if you have systemd boot instead of grub like with Pop-os!
@Doriandotslash
@Doriandotslash 4 жыл бұрын
It should all be the same with regards to mounting and chrooting. The difference would be that instead of installing grub, you install systemd-boot with the bootctl command and point it to the esp folder. The entire point of chroot'ing here is like bypassing the failed boot by cheating and using another disk to boot, then entering the OS from there.
@pctlc
@pctlc 4 жыл бұрын
Excellent video!!
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Thanks Colin!
@mehedyhasan4952
@mehedyhasan4952 4 жыл бұрын
Please make this video for manjaro or arch basd distro with BIOS
@Doriandotslash
@Doriandotslash 4 жыл бұрын
The steps are the same. Except during the grub reinstallation. For that part you just need to follow the boot loader section of the Arch Install Guide.
@RayVermey
@RayVermey 4 жыл бұрын
Great instructional video! Thanks (/etc/resolve.conf != /etc/resolv.conf though :-) )
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Oopsie, didn't catch that typo ;) Thanks!
@Reziac
@Reziac 4 жыл бұрын
Good info, tho guess how many of us will remember all those steps :) What happens if you don't manually unmount everything before you reboot? Back when I had Mint 17 installed... it had this horrible bug (possibly driver-specific, but I gather inherited from Ubuntu; apparently since fixed) where if you would just LOOK in the video config -- just look, don't touch anything -- GRUB would commit seppuku. (Reproducible.) At the time someone in the Mint forum recommended a bootable fixit utility that didn't require any commandline knowledge; just boot it up, pick the obvious option, let it churn for a bit, fixed. I'll have to see if I can find it again; it was much easier than all this, cuz all you needed to know was how to boot from external media. It may have been Ubuntu-family specific; I don't recall by now. [After the second such adventure, Mint left the building, and I now use PCLinuxOS.]
@Doriandotslash
@Doriandotslash 4 жыл бұрын
I put the commands in the description which you can print and keep with a recovery stick if you really needed to. Unmounting probably isn't a huge deal since the LiveUSB *SHOULD* unmount everything when rebooting/shutting down, but that's not a guarantee depending on what distro you're using. The fixit stick is all fine for Mint and maybe other Ubuntu-based distros, but it probably won't help you with Fedora, Gentoo, Arch, and all their derivatives. Knowing how to do this is just a 'good to know' skill, because what if that fixit stick doesn't work? You fix it yourself.
@realwizardry834
@realwizardry834 4 жыл бұрын
You literally spend about 20 seconds in grub rescue mode. Come on man. The whole video can be summarised as 'use a live CD/USB image of any distro to re-install grub'.
@Doriandotslash
@Doriandotslash 4 жыл бұрын
Actually I never used grub rescue mode at all. The point of this video is to help people who aren't familiar with this, so you obviously don't fit the mold here.
NixOS - How the store and packages work
18:50
DorianDotSlash
Рет қаралды 14 М.
Backup Linux with TIMESHIFT
21:35
DorianDotSlash
Рет қаралды 10 М.
ТАМАЕВ vs ВЕНГАЛБИ. Самая Быстрая BMW M5 vs CLS 63
1:15:39
Асхаб Тамаев
Рет қаралды 3,3 МЛН
ДЕНЬ РОЖДЕНИЯ БАБУШКИ #shorts
00:19
Паша Осадчий
Рет қаралды 7 МЛН
Each found a feeling.#Short #Officer Rabbit #angel
00:17
兔子警官
Рет қаралды 6 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 920 М.
Why I Switched from Arch to Debian
10:16
DorianDotSlash
Рет қаралды 193 М.
How to Fix Dual Boot Problems
11:49
Chris Titus Tech
Рет қаралды 197 М.
8 super heroic Linux commands that you probably aren't using
8:38
Engineer Man
Рет қаралды 725 М.
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4 МЛН
Linux 101 - Terminal Navigator
23:03
DorianDotSlash
Рет қаралды 9 М.
Qubes OS: How it works, and a demo of this VM-centric OS
25:03
DorianDotSlash
Рет қаралды 140 М.
What to do after installing Linux
30:22
DorianDotSlash
Рет қаралды 41 М.
Mem VPN - в Apple Store
0:30
AndroHack
Рет қаралды 71 М.
iPhone 15 Pro vs Samsung s24🤣 #shorts
0:10
Tech Tonics
Рет қаралды 13 МЛН
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 5 МЛН
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 1,5 МЛН