Deleted /sbin/init ... recovered from live CD, still will not boot?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 set the appropriate security label on it? I think (not sure as I don't have a Centos 6 installation) it should be system_ubject_r:init_exec_t:s0
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.