/sbin/init 和 /sbin/shutdown 消失

2016-07-28 15:46:51 +08:00
 asxaqz
发行版是 linux mint 17.3
昨天装了个有道词典, deb 要求版本 14.10 以上,但我没管,直接放那儿安装了所有依赖。
晚上忙完关机的时候已经关不掉了,但是急着睡觉,就按了电源。
今天早上发现 /sbin/init 和 /sbin/shutdown 都消失,当然启动不起来,于是进 livecd 拖了 里面的 init 和 shutdown 进去,重启之后卡 logo 。
又进 livecd 里挂载上系统盘, chroot 进去,卸载了 youdaodict 。
也没有效果。

诸位有什么办法吗?谢谢!
以后再也不手贱了。
4140 次点击
所在节点    Linux
22 条回复
MuyuQ
2016-07-28 16:31:28 +08:00
绝对路径也无效么。
asxaqz
2016-07-28 16:34:22 +08:00
@MuyuQ 是指 /sbin/init 和 /sbin/shutdown 的绝对路径吗?我进 livecd 挂载上看了, init 和 shutdown 确实消失了。
lslqtz
2016-07-28 16:43:55 +08:00
删除了整个 /usr/bin 的表示 :(
希望你能搞定
Mithrandir
2016-07-28 16:49:55 +08:00
直接重装,这次就当时教训了,安装软件的时候一定要好好看看安装程序都有那些提示, linux 不像 windows ,不会在安装过程中给你输出一些没用的信息
MuyuQ
2016-07-28 17:02:53 +08:00
看日志吧。 丢失的不一定只有 init 和 shutdown 。 http://h2appy.blog.51cto.com/609721/781281/
asxaqz
2016-07-28 18:51:07 +08:00
@lslqtz .._:(´_`」 ∠):_ …
asxaqz
2016-07-28 18:54:12 +08:00
@Mithrandir 多谢,顺便一问,我直接 apt-get dist-update 到最新版会有效吗
asxaqz
2016-07-28 18:54:24 +08:00
@MuyuQ 谢谢!
xss
2016-07-28 22:34:01 +08:00
应该是安装依赖的时候有冲突把 initrd 给卸载了,你查查你的发行版本里面 initrd 叫什么,强制重新安装一遍看看。
congeec
2016-07-28 22:43:24 +08:00
.................我猜是装了 systemd, 卸了 init.d 什么的
我在 Gentoo 上干过这种事而
asxaqz
2016-07-28 22:57:00 +08:00
@congeec my init.d seems intact, it contains a bunch of files, but i wonder how u manage to get over it ? thanks. (im replying on livecd which lacks a chinese input method, sorry about it
congeec
2016-07-28 23:06:00 +08:00
@asxaqz I'm fine with English. What I did was to download a net-bootable image, chroot into the original broken system, rebuiding and installing missing packages, and most importantly, ran Gentoo's depency-checking tool: rev-rebuild.
congeec
2016-07-28 23:08:25 +08:00
@asxaqz If I am right, you can use dpkg on Debian derivied systems to determine which package does /sbin/init belong to.

You can pull a full-iso, make a directory comparison and copy the missing files.
asxaqz
2016-07-28 23:20:54 +08:00
@congeec thanks, i will try it, but there are really tons of them contributing to /sbin/init
asxaqz
2016-07-28 23:25:13 +08:00
@xss i suppose u mean initramfs? just check my dpkg.log, and find i did upgrade some package about initramfs, i will try to reinstall them, thanks
congeec
2016-07-28 23:29:18 +08:00
@asxaqz My suggestion is that you'd better figure out what does your missing /sbin/init belong to. sysvinit or systemd? If you can figure it out, repairing your inti system (sysvinit or systemd) is the best way.
asxaqz
2016-07-28 23:45:34 +08:00
@congeec oh i see, i just used dpkg -S to check the the /sbin/init of the original livecd, it turns out to belong to upstart, and i happened to do an upgrade to it last night. i try to reinstall it but it seems that i have to uninstall some core-package to resolve the dependency. now im not sure if i should do it
congeec
2016-07-28 23:51:54 +08:00
@asxaqz Backup your data. Try to reinstall these core-package, remember to make a record of the packages you will uninstall.
BACKUP YOUR DATA
msg7086
2016-07-28 23:55:00 +08:00
人家没中文输入法不代表读不懂中文啊……为啥全程英语回复了。
shiny
2016-07-28 23:58:20 +08:00
@msg7086 这就叫萌萌哒

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/295537

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX