启动笔记本电脑时,会出现如下消息systemd[1]: Failed to start casper-md5check Verify Live ISO checksums.
(取自 journalctl -p err),并且
systemctl status casper-md5check.service显示:
× casper-md5check.service - casper-md5check Verify Live ISO checksums
Loaded: loaded (/lib/systemd/system/casper-md5check.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-07-30 09:24:42 EEST; 45min ago
Process: 787 ExecStart=/usr/lib/casper/casper-md5check /cdrom /cdrom/md5sum.txt (code=exited, status=1/FAILURE)
Main PID: 787 (code=exited, status=1/FAILURE)
CPU: 3ms
iul 30 09:24:42 AcerAspireV5-552G systemd[1]: Starting casper-md5check Verify Live ISO checksums...
iul 30 09:24:42 AcerAspireV5-552G casper-md5check[787]: .fopen md5_file: No such file or directory
iul 30 09:24:42 AcerAspireV5-552G casper-md5check[787]: Checking integrity, this may take some time (or try: fsck.mode=skip)
iul 30 09:24:42 AcerAspireV5-552G systemd[1]: casper-md5check.service: Main process exited, code=exited, status=1/FAILURE
iul 30 09:24:42 AcerAspireV5-552G systemd[1]: casper-md5check.service: Failed with result 'exit-code'.
iul 30 09:24:42 AcerAspireV5-552G systemd[1]: Failed to start casper-md5check Verify Live ISO checksums.
我尝试跑步sudo /usr/lib/casper/casper-md5check /cdrom /cdrom/md5sum.txt我得到以下结果:
.
Checking integrity, this may take some time (or try: fsck.mode=skip)
fopen md5_file: No such file or directory
错误代码为 1。
编辑1
我通过运行 禁用了它的启动sudo systemctl disable casper-md5check.service
。但这并不能解释问题的出现方式。
编辑2
的内容/etc/lsb-发布
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Linux Lite 6.0"
答案1
运行systemctl --failed
likely 会产生类似以下内容的输出,从而引导您进入此站点:
UNIT LOAD ACTIVE SUB DESCRIPTION
● casper-md5check.service masked failed failed casper-md5check.service
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
1 loaded units listed.
这似乎是一个非严重的错误,它是在 Ubuntu 22.04(Jammy)存储库的 Linux Mint 21(Vanessa)世界中发现的。
$ lsb_release -a
Distributor ID: Linuxmint
Description: Linux Mint 21
Release: 21
Codename: vanessa
运行apt-cache show casper
显示输出:
Origin: Ubuntu
Filename: pool/main/c/casper/casper_1.470_amd64.deb
Description-en: Run a "live" preinstalled system from read-only media
Description-md5: 9be0120948307c7e897a16c45a69ba0f
Tag: admin::boot, admin::filesystem, implemented-in::shell, protocol::smb, role::plugin, scope::utility, special::completely-tagged, works-with- format::iso9660
Task: xubuntu-live
这表明它来自 Ubuntu 主存储库。根据 pkg 描述和从 github 存储库文件收集的信息casper-md5check.c如果你不参与任何与 live-boot 安装相关的操作,完全删除它似乎是安全的。我使用以下命令删除了 casper 包sudo apt remove casper -y
$ systemctl status casper-md5check
显示该服务已被屏蔽:
× casper-md5check.service
Loaded: masked (Reason: Unit casper-md5check.service is masked.)
Active: failed (Result: exit-code) since Mon 2022-09-26 23:25:24 PDT; 7min ago
Main PID: 989 (code=exited, status=1/FAILURE)
CPU: 1ms
Sep 26 23:25:24 LT-MINT2 systemd[1]: Starting casper-md5check Verify Live ISO checksums...
Sep 26 23:25:24 LT-MINT2 casper-md5check[989]: .fopen md5_file: No such file or directory
Sep 26 23:25:24 LT-MINT2 casper-md5check[989]: Checking integrity, this may take some time (or try: fsck.mode=skip)
Sep 26 23:25:24 LT-MINT2 systemd[1]: casper-md5check.service: Main process exited, code=exited, status=1/FAILURE
Sep 26 23:25:24 LT-MINT2 systemd[1]: casper-md5check.service: Failed with result 'exit-code'.
Sep 26 23:25:24 LT-MINT2 systemd[1]: Failed to start casper-md5check Verify Live ISO checksums.
取消屏蔽服务会sudo systemctl unmask casper-md5check
自动删除位于 /etc/systemd/system/casper-md5check.service 的服务单元文件。
但是,通过搜索“casper*”还会发现几个可以删除的与 casper 相关的文件:
$ sudo rm /etc/systemd/system/casper.service
$ sudo rm /etc/systemd/system/multi-user.target.wants/casper-md5check.service
$ sudo rm /etc/systemd/system/final.target.wants/casper.service
然后您可以执行sudo systemctl daemon-reload
和sudo systemctl reset-failed
以重置故障。
$ systemctl --failed
单位负载活动子描述列出了 0 个负载单位。
$ sudo systemctl is-system-running
跑步