linux挂载硬盘重启后出现an error occurred during the file system check错误最有效的解决办法

 由于最近在学习QT的应用与开发,所以第一步必须要搭建开发环境。然而如今发现当初给虚拟机分配的硬盘空间明显不足,导致QT_SDK的安装失败。

于是在网上搜索关于扩展硬盘空间的办法,浏览网站无数,但基本思路就两条:

1。在原有硬盘的基础上扩展硬盘空间,但是步骤过于麻烦,而且一不小心可能导致硬盘原来内容损坏出现异常,所以这种方法暂不考虑。

2。在虚拟机上新建一块硬盘,把空间开足,再挂载到LINUX上即可。

我选择的第二种方法。具体方式参见上一篇文章。

但是,一切按部就班地完成后reboot就出现了an error occurred during the file system check提示,另外被告知要么输入root密码进行修复,要么按ctrl+D跳过。显然,再怎么跳也是跳不进桌面的,只能输入密码进行修复。可是问题在哪呢?哪一步有误?

我在第一时间内意识到最后一次操作是用vi /etc/fstab命令添加新的挂载内容,所以问题一定是发生在那,只要把之前添加的那条挂载语句给删了问题不是解决了吗?没错,确实是这样,可是问题又来了,此时的fstab处于只读状态,内容根本无法更新,你再怎么:wq! 也都是徒劳。无奈,只好上的GOOGLE查找解决办法。

网上的资料绝大多数是说用fsck [-aANPrRsTV][-t <文件系统类型>][文件系统...]命令方式可以解决,但是我试了几数次,毫无效果。

也有一些同志持另外一种观点,用liveCD进行rescue模式就可以解决问题。坦白的讲,我不会这个liveCD,也不懂rescue模式。所以再继续探寻另外一种解决模式。

有心人,天不负。古人真是总结得太精辟了。终于找到一个有效的办法:

利用『 mount -n -o remount,rw / 』重新挂载根目录, 这之后就把刚才错误的地方修改一下,注意,这个时候fstab就可以读写了。那么,所有的问题也就可以迎刃而解了。

只需要将挂载语句删除,再:wq保存退出,最后reboot重新载入系统,看是不是解决了?

办事一定要有耐心,多找找资料,总有办法解决的,千万不要中途放弃。
 

If you encounter the error message "Could not determine the upgrade" while trying to upgrade Ubuntu from 18.04 to 22.04, there could be a few potential reasons for this issue. Here are some possible solutions: 1. Make sure your current Ubuntu 18.04 installation is up to date. Run the following commands to update your system: ``` sudo apt update sudo apt upgrade ``` 2. Check if you have any third-party repositories or PPAs enabled. Disable or remove them temporarily, as they may cause conflicts during the upgrade process. You can use the "Software & Updates" application or manually edit the `/etc/apt/sources.list` file to disable them. 3. Ensure that you have enough free disk space on your system. The upgrade process requires additional space for downloading and installing packages. You can check the available disk space by running the command: ``` df -h ``` 4. Try running the upgrade command with the "--check-dist-upgrade-only" option, which performs a dry-run of the upgrade and checks for any issues without actually initiating the upgrade process. Run the following command: ``` sudo do-release-upgrade --check-dist-upgrade-only ``` 5. If none of the above solutions work, you can try manually editing the release-upgrades configuration file. Open the file `/etc/update-manager/release-upgrades` with a text editor, and change the value of "Prompt" from "lts" to "normal". Save the file and then run the upgrade command again: ``` sudo do-release-upgrade ``` If you still encounter issues, please provide any error messages or logs that you receive during the upgrade process for further assistance.
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值