How to boot RHEL with no bash?
- by nmelmun
How can I boot a RHEL VM if I deleted /bin/bash? When trying to boot, I now get the following error:
"INIT: Cannot execute "/etc/rc/d/rc.sysinit"
The next thing I tried was to modify the kernel boot parameters by adding init=/bin/ksh at the end of the line, which gave me a functional shell. After this, in order to get write permissions, I remounted the root partition with:
mount -o remount,rw /
Then I tried to boot using ksh as the shell by tricking the system into thinking it's bash:
ln -s /bin/ksh /bin/bash
Then restarted the system normally. Unfortunately this didnt work since ksh is not compatible and /etc/rc.d/rc.sysinit uses several bash-specific tricks.
Does anyone else have a suggestion on how I could get the system to boot normally without reinstalling bash?