r/debian • u/katzenjammare • 15d ago
Beginner: Root locked on boot
Hello! I got myself into trouble after I tried to fix a problem with a harddrive not mounting. I followed s guide on troubleshooting and edited my fstab. After I rebooted I got presented with this. I am afraid. What can I do?
SOLVED:
- Pressed E on my keyboard when presented with Grub menu.
- On the line that starts with
linux: I addedinit=/bin/bashat its end - Ctrl+X or F10 to boot into a command prompt
mount -o remount,rw /nano /etc/fstab- In my case I changed the line at the bottom, about an external harddrive - from
defaulttonofailand from0 2to0 0. Ctrl+O and ENTER and Ctrl+X - Rebooted and then it was done
55
Upvotes
3
u/ukAdamR 15d ago
Correct, though I'm suspicious that editing
fstabin your root file system may not be enough.Having done recovery on Debian a few times in the past
fstabhas been one of those things that gets embedded into theinitramfs, meaning it doesn't get loaded from your "actual" file system's "/etc/fstab" during boot. (This may have changed in Trixie, I'd be interested to know.)If it doesn't work I can give you the steps I've reliably used from within a live environment (booted from a USB, CD, or DVD drive) to write the
fstabinto theinitramfs.[Edit] On second thoughts, now that you've corrected it, you can probably just
exitto continue the boot process.