一次ubuntu开机进入不了系统的解决办法

记一次ubuntu开机进入不了系统的解决办法

隔天再编译安卓固件,发现无法编译!报错log:

[13:40:33.194][d3@d3-X99 13:39:53 ~/cdrom-rp-rk356x/rk3566-rk3568-android11.0]$ ./build.sh                  
[13:40:33.348]device/rockchip/rk356x/.BoardConfig.mk
[13:40:33.596]13:40:34 mkdir /tmp/dumpvars082309196: no space left on device
[13:40:33.948]processing option: all
[13:40:33.949]start build uboot
[13:40:34.005]## make  rk3568_defconfig rk3566.config -j160
[13:40:34.122]  HOSTCC  scripts/kconfig/conf.o
[13:40:34.168]scripts/kconfig/conf.c: In function ‘check_stdin’:
[13:40:34.173]scripts/kconfig/conf.c:78:3: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.178]   78 |   printf(_("aborted!\n\n"));
[13:40:34.183]      |   ^~~~~~
[13:40:34.188]scripts/kconfig/conf.c:79:3: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.192]   79 |   printf(_("Console input/output is redirected. "));
[13:40:34.196]      |   ^~~~~~
[13:40:34.203]scripts/kconfig/conf.c:80:3: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.207]   80 |   printf(_("Run 'make oldconfig' to update configuration.\n\n"));
[13:40:34.212]      |   ^~~~~~
[13:40:34.216]scripts/kconfig/conf.c: In function ‘conf_askvalue’:
[13:40:34.222]scripts/kconfig/conf.c:90:3: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.226]   90 |   printf(_("(NEW) "));
[13:40:34.230]      |   ^~~~~~
[13:40:34.235]scripts/kconfig/conf.c: In function ‘conf_choice’:
[13:40:34.241]scripts/kconfig/conf.c:291:5: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.246]  291 |     printf(_(" (NEW)"));
[13:40:34.251]      |     ^~~~~~
[13:40:34.256]scripts/kconfig/conf.c: In function ‘check_conf’:
[13:40:34.263]scripts/kconfig/conf.c:439:6: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.267]  439 |      printf(_("*\n* Restart config...\n*\n"));
[13:40:34.271]      |      ^~~~~~
[13:40:34.276]scripts/kconfig/conf.c: In function ‘main’:
[13:40:34.282]scripts/kconfig/conf.c:641:6: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.286]  641 |      _("\n*** The configuration requires explicit update.\n\n"));
[13:40:34.290]      |      ^
[13:40:34.298]scripts/kconfig/conf.c:694:4: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.302]  694 |    fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
[13:40:34.306]      |    ^~~~~~~
[13:40:34.312]scripts/kconfig/conf.c:698:4: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.317]  698 |    fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
[13:40:34.320]      |    ^~~~~~~
[13:40:34.326]scripts/kconfig/conf.c:709:4: warning: format not a string literal and no format arguments [-Wformat-security]
[13:40:34.329]  709 |    fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
[13:40:34.334]      |    ^~~~~~~
[13:40:34.341]scripts/kconfig/conf.c: At top level:
[13:40:34.346]scripts/kconfig/conf.c:723:1: fatal error: error writing to /tmp/ccEacwaI.s: 设备上没有空间
[13:40:34.349]  723 | }
[13:40:34.355]      | ^
[13:40:34.355]compilation terminated.
[13:40:34.362]make[2]: *** [scripts/Makefile.host:116:scripts/kconfig/conf.o] 错误 1
[13:40:34.362]make[1]: *** [Makefile:479:rk3568_defconfig] 错误 2
[13:40:34.363]make: *** [Makefile:461: __build_one_by_one] Error 2
[13:40:34.364]Build uboot failed!
[13:45:30.356][d3@d3-X99 13:40:35 ~/cdrom-rp-rk356x/rk3566-rk3568-android11.0]$ sudo reboot
[13:45:30.495][192.168.98.208_20241015_134530]

也有查相关信息,例如cd /tmp && du -h --max-depth=1 df -h,一时没看仔细然后关机重启,万能的重启嘛!结果重启n次还是无法进去系统,卡在“按ctrl+c可以取消正在进行的所有文件系统检查”。以后,报“no space left on device” 错误时仔细看好df -h的结果!!

image

然后就还是着手解决了。

解决:

开机长按shift键进入recovery模式,选择Advanced options for Ubuntu

image

选择recovery mode ,系统可能下载有多个内核,随便选一个都可以

image

选择root Drop to root shell prompt选项

image

然后回车,系统会提示你输入root用户的密码
输入即可进入root用户的recovery模式
上面的紫红色的界面是shell模拟出来的,
多敲几下回车就又回到Linux的命令行界面了

image

第2步:查看系统最近一次的启动日志
想知道系统为什么进不去必须知道它报了什么错对吧,
查看系统最后一次启动日志的命令是:

journalctl -b -1

-b:意思为只查看系统的启动(boot)日志
-1:意思为只查看最近一次的启动日志,同事如果想查看上上一次的启动日志的话就是 -2

ubuntu的日志就一页一页显示出来了,
可以按空格翻页,按上下键一行一行上下移动
也可以按左右键查看及返回超出隐藏的部分
日志会很长,其中包含内核日志,系统服务日志

看到

image

image

查找占用大空间的文件:

find /var/ -type f -size +100M
ls -lh /var/log/uvcdynctrl-udev.log 

这时看到/var/log/uvcdynctrl-udev.log 有79G ,才恍然大悟,重新df -h

image

想到昨天插着uvc 设备忘记拔到今天,产生错误日志达79G,占满系统空间,占满根文件系统导致无法开机。

image

解决方法:

rm /var/log/uvcdynctrl-udev.log 
sync

然后重启就OK了!


ubuntu linux开机进入不了系统的解决办法_按ctrl+c可以取消正在进行的所有文件系统检查-CSDN博客 - https://blog.csdn.net/daerzei/article/details/114242414

END!

posted @ 2024-10-16 14:16  Yaction  阅读(134)  评论(0)    收藏  举报