Linux 无法开机 显示 an error occurred during the file&nb

本文解决Linux启动时磁盘错误问题,通过执行fdisk-l查看磁盘,修复文件系统,并修改fstab来解决分区错误。重点介绍了如何在单用户模式下修改fstab文件,以解决Linux系统启动问题。

Linux 启动发生磁盘错误, 磁盘扫描进度完成后光标停留在

***An error occured during the filesystem check
***Dropping you to a shell; the system will reboot
***when you leave the shell.

Give root password for maintainence
(or type Controll-D to continue)


解决方法: 
root密码 执行 fdisk -l    查看磁盘 
发现只有/dev/sda1  /dev/sda2


(Repair filesystem)# fdisk -l   根据看到的磁盘依次修复 ,例如: 

(Repair filesystem)#fsck -y /dev/sda1 

(Repair filesystem)#fsck -y /dev/sda2

遇到如下提示:

fsck.ext3:Device or resource busy while trying to open /dev/sda2

File system mounted or opened exclusively by another program?
百度后发现是分区错误,只能修改/etc/fstab来修改挂载点。
/etc/fstab 默认为只读模式,只能用单用户模式来进行修改。
| Traceback (most recent call last): File "E:\anaconda3\envs\pytorch\Lib\site-packages\nb_conda_kernels\install.py", line 17, in <module> from jupyter_server.config_manager import BaseJSONConfigManager ModuleNotFoundError: No module named 'jupyter_server' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "E:\anaconda3\envs\pytorch\Lib\site-packages\nb_conda_kernels\install.py", line 20, in <module> from notebook.config_manager import BaseJSONConfigManager ModuleNotFoundError: No module named 'notebook' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "E:\anaconda3\envs\pytorch\Lib\site-packages\nb_conda_kernels\install.py", line 22, in <module> raise ImportError("Must have notebook>=5.3 or jupyter_server installed") ImportError: Must have notebook>=5.3 or jupyter_server installed done ERROR conda.core.link:_execute(938): An error occurred while installing package 'defaults::nb_conda_kernels-2.5.2-py312haa95532_0'. Rolling back transaction: done LinkError: post-link script failed for package defaults::nb_conda_kernels-2.5.2-py312haa95532_0 location of failed script: E:\anaconda3\envs\pytorch\Scripts\.nb_conda_kernels-post-link.bat ==> script messages <== Traceback (most recent call last): File "E:\anaconda3\envs\pytorch\Lib\site-packages\nb_conda_kernels\install.py", line 17, in <module> from jupyter_server.config_manager import BaseJSONConfigManager ModuleNotFoundError: No module named 'jupyter_server' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "E:\anaconda3\envs\pytorch\Lib\site-packages\nb_conda_kernels\install.py", line 20, in <module> from notebook.config_manager import BaseJSONConfigManager ModuleNotFoundError: No module named 'notebook' Dur
03-17
\ Traceback (most recent call last): File "C:\Users\w_\.conda\envs\pytorch\lib\site-packages\nb_conda_kernels\install.py", line 17, in <module> from jupyter_server.config_manager import BaseJSONConfigManager ModuleNotFoundError: No module named 'jupyter_server' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\w_\.conda\envs\pytorch\lib\site-packages\nb_conda_kernels\install.py", line 20, in <module> from notebook.config_manager import BaseJSONConfigManager ModuleNotFoundError: No module named 'notebook' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\w_\.conda\envs\pytorch\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\w_\.conda\envs\pytorch\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\w_\.conda\envs\pytorch\lib\site-packages\nb_conda_kernels\install.py", line 22, in <module> raise ImportError("Must have notebook>=5.3 or jupyter_server installed") ImportError: Must have notebook>=5.3 or jupyter_server installed done ERROR conda.core.link:_execute(1029): An error occurred while installing package 'defaults::nb_conda_kernels-2.5.2-py39. Rolling back transaction: done LinkError: post-link script failed for package defaults::nb_conda_kernels-2.5.2-py39haa95532_1 location of failed script: C:\Users\w_\.conda\envs\pytorch\Scripts\.nb_conda_kernels-post-link.bat ==> script messages <== Traceback (most recent call last): File "C:\Users\w_\.conda\envs\pytorch\lib\site-packages\nb_conda_kernels\install.py", line 17, in <module> from jupyter_server.config_manager import BaseJSONConfigManager ModuleNotFoundError: No module named 'jupyter_server' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\w_\.conda\envs\pytorch\lib\site-packages\nb_conda_kernels\install.py", line 20, in <module> from notebook.config_manager import BaseJSONConfigManager ModuleNotFoundError: No module named 'notebook' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\w_\.conda\envs\pytorch\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\w_\.conda\envs\pytorch\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\w_\.conda\envs\pytorch\lib\site-packages\nb_conda_kernels\install.py", line 22, in <module> raise ImportError("Must have notebook>=5.3 or jupyter_server installed") ImportError: Must have notebook>=5.3 or jupyter_server installed ==> script output <== stdout: stderr: return code: 1 () 怎么解决这个报错
07-28
运行上述代码显示:KeyError('active_prefix_name') Traceback (most recent call last): File "D:\anaconda\Lib\site-packages\conda\exception_handler.py", line 18, in __call__ return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\conda\cli\main.py", line 29, in main_subshell from .conda_argparse import do_call, generate_parser, generate_pre_parser File "D:\anaconda\Lib\site-packages\conda\cli\conda_argparse.py", line 52, in <module> from .main_create import configure_parser as configure_parser_create File "D:\anaconda\Lib\site-packages\conda\cli\main_create.py", line 16, in <module> from ..notices import notices File "D:\anaconda\Lib\site-packages\conda\notices\__init__.py", line 3, in <module> from .core import notices # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\conda\notices\core.py", line 15, in <module> from . import cache, fetch, views File "D:\anaconda\Lib\site-packages\conda\notices\fetch.py", line 14, in <module> from ..reporters import get_spinner ModuleNotFoundError: No module named 'conda.reporters' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\anaconda\Lib\site-packages\conda\exception_handler.py", line 165, in print_unexpected_error_report get_main_info_str(error_report["conda_info"]) File "D:\anaconda\Lib\site-packages\conda\cli\main_info.py", line 400, in get_main_info_str display_info = get_main_info_display(info_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\conda\cli\main_info.py", line 390, in get_main_info_display return {key: value for key, value in builder()} ^^^^^^^^^ File "D:\anaconda\Lib\site-packages\conda\cli\main_info.py", line 350, in builder if info_dict["active_prefix_name"]: ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'active_prefix_name' # >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<< Traceback (most recent call last): File "D:\anaconda\Lib\site-packages\conda\exception_handler.py", line 18, in __call__ return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\conda\cli\main.py", line 29, in main_subshell from .conda_argparse import do_call, generate_parser, generate_pre_parser File "D:\anaconda\Lib\site-packages\conda\cli\conda_argparse.py", line 52, in <module> from .main_create import configure_parser as configure_parser_create File "D:\anaconda\Lib\site-packages\conda\cli\main_create.py", line 16, in <module> from ..notices import notices File "D:\anaconda\Lib\site-packages\conda\notices\__init__.py", line 3, in <module> from .core import notices # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda\Lib\site-packages\conda\notices\core.py", line 15, in <module> from . import cache, fetch, views File "D:\anaconda\Lib\site-packages\conda\notices\fetch.py", line 14, in <module> from ..reporters import get_spinner ModuleNotFoundError: No module named 'conda.reporters' `$ D:\anaconda\Scripts\conda-script.py install -c conda-forge nb_conda_kernels` environment variables: conda info could not be constructed. KeyError('active_prefix_name') An unexpected error has occurred. Conda has prepared the above report. If you suspect this error is being caused by a malfunctioning plugin, consider using the --no-plugins option to turn off plugins. Example: conda --no-plugins install <package> Alternatively, you can set the CONDA_NO_PLUGINS environment variable on the command line to run the command without plugins enabled. Example: CONDA_NO_PLUGINS=true conda install <package> If submitted, this report will be used by core maintainers to improve future releases of conda.
最新发布
08-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值