NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: I finally bricked my NetBSD system



On Fri, 17 Jul 2020, Martin Husemann wrote:

On Thu, Jul 16, 2020 at 09:54:06PM -0700, Andy Ruhl wrote:
What about booting from install media and dropping /rescue/sh into
whatever the defined shell path is? Isn't that a statically linked
binary that should work pretty much anywhere? Isn't that kinda what
it's for?

Yes, that works too.

It mostly is intended for when you have really bricked your base install,
like broken libc.so or ld.elf_so - then you can still "boot -a" and ask
for /rescue/sh as shell.

I like the "cp some other shell to /usr/pkg/bin/tcsh" way as that allows
me to fully go multiuser and do all additional recover steps over the
network.

I do this from time-to-time. More often than I'd like to admit, because
one of my machines runs -current all the time.

Download the USB-compatible image. Burn it to a stick. Boot from the
stick into single-user mode (or drop into single-user mode from an
install image). Edit /etc/passwd using "ed".

I have to do something similar on my work machines when my Linux
updates break from time-to-time.

--
Hisashi T Fujinaka - htodd%twofifty.com@localhost
BSEE + BSChem + BAEnglish + MSCS + $2.50 = coffee


Home | Main Index | Thread Index | Old Index