It’s only needed is the OS isn’t booting. Running a repair every boot is not needed.
It’s only needed is the OS isn’t booting. Running a repair every boot is not needed.
Not true, it’s grub rescue, appears after grub if the OS can’t boot. I’ve encountered this countless times at work over the years in customer environments.
Yeah, that’s the other 10%. 😂
Doing dd wrong or rm -rf on / aren’t gonna be salvaged this way, but if it’s a bad disk sector or somehow corrupted system file the above command will sort it out. You wouldn’t believe how many customers VMs I’ve had to use that on in the past when they were in a panic. It’s a 2 minute fix in most cases.
It’s kind of the Linux equivalent to Windows sfc/scannow, chkdsk, and dism restorehealth in one.
Important Edit
The information below applies to emergency mode boot when grub is intact but OS isn’t booting. It doesn’t apply to grub rescue. Sorry about that folks, I screwed up here and don’t wanna misinform.
—————-
Protip: If you see this error, press”e” on grub boot to edit your commands and add the following to the end of the kernel line in grub:
fsck.repair=yes
Then boot.
Fixes the issue like 90% of the time.
Well shit. You’re right, I’m mixing up grub rescue and emergency mode. Yeah, you would need a USB rescue disk to fix this most likely.
My bad, I’ll update the original comment to avoid confusion.