編輯1

編輯1

啟動筆記型電腦時,會出現這樣的訊息systemd[1]: Failed to start casper-md5check Verify Live ISO checksums.(取自journalctl -p err)並且 systemctl 狀態 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-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Linux Lite 6.0"

答案1

運行systemctl --failed可能會產生類似於以下內容的輸出,從而引導您訪問此網站:

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如果您不涉及任何與即時啟動安裝相關的內容,那麼完全刪除似乎是安全的。我刪除了 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-reloadsudo systemctl reset-failed來重置故障。

$ systemctl --failed

單元負載活動子說明 列出 0 個負載單元。

$ sudo systemctl is-system-running

跑步

相關內容