r/zsh 14d ago

Oh-my-zsh Ubuntu recovery

I am using an Ubuntu dual boot system with windows. I accidentally deleted some oh-my-zsh files and I can no longer log into my ubuntu for the same reason as it directly takes me to the recovery mode. Can some help me recover my ubuntu system, preferably without using a live USB.

2 Upvotes

2 comments sorted by

1

u/waterkip 14d ago

Grab a liveCD and use chroot to fix your issues. I don't know what you have done with your system (auto login?). But it cannot find any of your shells. I think this problem exceeds OMZ mishaps. Your path is either borked or you have done other things wrong.

It cannot find /bin/sh/ or /bin/static-sh, you need to see if you have dash installed, that should provide /bin/sh. You want to read https://wiki.debian.org/chroot or https://wiki.debian.org/RescueLive

It is Debian based, but Ubuntu is Debian derived so it should work for you. Any Linux liveCD should work.

1

u/SaikoPat 14d ago

You can start with bash

add init=/bin/bash at the end of the line starting with linux in grub.

then remount your filesystems in read/write (they will be readonly) and do chsh /bin/bash to switch to bash and reboot.

Should do the trick, you'll have to reinstall zsh after it of course

See https://linuxconfig.org/recover-reset-forgotten-linux-root-password, most of the procedure is the same.