Deleted /sbin/init ... recovered from live CD, still will not boot?
Hi all,
Been messing around with my CentOS 6.6 VM trying to break stuff and learn with it. I thought it may be a good learning exercise to (ok, sounds a bit stupid, but purposely) delete /sbin/init to see how I could recover and learn. I've booted into a recovery CD and recovered the /sbin/init file to my existing directory, however, I'm still having issues booting the machine. Per Google suggestions, I have given the new init file 755 permissions but it still does not boot. I apologize that I have not had more ideas, I am currently Googling solutions but am having a bit of trouble knowing where to start. Any suggestions would be greatly appreciated, thank you. |
Is this the correct /sbin/init binary for your system?
How does the boot fail? Was there anything damaged beside removing one file? What if you use boot parameter init=/bin/sash (assuming you have that file) ? |
Did you restore the /sbin/init to the right directory - as the machine will see it when booting from disk?
|
Did you set the appropriate security label on it? I think (not sure as I don't have a Centos 6 installation) it should be system_u:object_r:init_exec_t:s0
|
From my Fedora box
$ ls -lZ /sbin/init lrwxrwxrwx. root root system_u : object_r : bin_t : s0 /sbin/init -> ../lib/systemd/systemd |
How big is that "recovered" /sbin/init? The /sbin/init (41920 bytes) in the installer image is very different from the installed /sbin/init (150352 bytes). What you need to do from the recovery CD/DVD is chroot to /mnt/sysimage and run "yum reinstall upstart". That should get you a proper /sbin/init. There is only one customizable file (/etc/dbus-1/system.d/Upstart.conf) in the upstart package, so there should be no problem there.
|
Code:
# ln -s /sbin/init /lib/systemd/systemd |
Quote:
|
All times are GMT -5. The time now is 07:34 PM. |