Ubuntu:Target filesystem doesn't have /sbin/init (Slax 解决)

本文提供了一种使用Slax解决Ubuntu因异常断电等原因导致的启动问题的方法。通过制作Slax启动盘并运行脚本,可以定位问题所在分区,并利用e2fsck命令修复文件系统。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

计算机(Ubuntu)因为异常断电或是其它原因,再次启动时。非常不幸的出现:

Killed
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have /sbin/init
No init found. Try passing init= bootarg
文件系统出现了问题,不能挂载。别急。还有救:

有的方法是做一个Ubuntu的启动盘。使用体验版的Ubuntu运行文件系统修复,这个U盘不一定能启动成功。

这里有更靠谱的办法,Slax。

Slax是个便捷、便携的Linux操作系统,直接装在U盘里随身携带。

解决上述问题步骤:

①下载Slax:http://www.slax.org/zhCN/download.php选择32或是64的zip

②格式化你的U盘后,解压到U盘的根文件夹

③双击/slax/boot/bootinst.bat创建向导,完了之后就能够用你的U盘启动Slax了。

④设置bios,从U盘启动。这时候时尚性感的Slax将要启动了。

⑤在资源下载一个boot info script,地址:http://download.youkuaiyun.com/detail/wu20093346/8065879

⑥将这个bootinfoscript-061.tar.gz复制到Slax桌面。解压。Extract here。

⑦运行脚本:bash ~/Desktop/boot_info_script.sh

⑧结束后桌面生成了RESULTS.txt,打开它。阅读。

⑨推断您的Ubuntu是在哪个分区,假设在sda1。或是sda7

⑩那么运行e2fsck -f -y -v /dev/sda1或是e2fsck -f -y -v /dev/sda7

关闭Slax,拔出启动盘,开机,你的Ubuntu应该是恢复了。

../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator*() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_parent_path() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::symlink_status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::operator++()' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::read_symlink(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::replace_extension(std::filesystem::__cxx11::path const&)' ../../../lib/libg2o_stuff.so.0.2.0: undefined reference to `std::filesystem::__cxx11::path::has_filename() const' collect2: error: ld returned 1 exit status g2o/apps/g2o_cli/CMakeFiles/g2o_cli_application.dir/build.make:99: recipe for target 'bin/g2o' failed make[2]: *** [bin/g2o] Error 1 CMakeFiles/Makefile2:1230: recipe for target 'g2o/apps/g2o_cli/CMakeFiles/g2o_cli_application.dir/all' failed make[1]: *** [g2o/apps/g2o_cli/CMakeFiles/g2o_cli_application.dir/all] Error 2 Makefile:155: recipe for target 'all' failed make: *** [all] Error 2
最新发布
08-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值