정기 업데이트로 Elementary OS 6에서 initramfs가 중단되었습니다.

정기 업데이트로 Elementary OS 6에서 initramfs가 중단되었습니다.

메모:

두 달 전에 Elementary OS를 설치했는데 그 이후로 어떤 문제도 발생하지 않았습니다.

systemctl --failedjournalctl -p 3 -b정기적으로 확인하니 괜찮았습니다 . 설치 이후 모든 업데이트가 원활하게 진행되었습니다.


나는 시스템을 업데이트하기 위해 간단한 apt-fast 스크립트를 사용합니다. 에 위치해 있습니다 /usr/bin/.

여기있어

#!/usr/bin/fish
sudo apt-fast clean
sudo dpkg --configure -a
sudo apt-fast autoclean
sudo apt-fast update
echo
echo
echo "Packages that will be updated:"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
sudo apt list --upgradable -a
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo
echo
sudo apt-fast upgrade -y
sudo apt-fast full-upgrade -y
sudo apt-fast autoremove --purge --auto-remove -y
sudo apt-fast clean
sudo flatpak update

업데이트 중에 일어난 일은 다음과 같습니다. https://pastebin.com/xh4EZXT5

나는 뭔가 잘못되었다는 것을 알았다.

그래서 나는 달렸다

sudo dpkg --configure -a

오류가 지속됩니다. Google에서 오류를 검색하고 다시 설치해 보았습니다 initramfs-tools.

다음을 사용하여 제거했습니다.

sudo apt remove initramfs-tools
sudo apt autoremove

그런 다음 달렸 sudo apt install initramfs-tools지만 여전히 오류가 발생합니다.

이제 나는 이것을 얻는다

~ ❯❯❯ sudo apt-get install -f initramfs-tools

Reading package lists... Done
Building dependency tree       
Reading state information... Done
initramfs-tools is already the newest version (0.136ubuntu6.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.14.15-xanmod1-cacule
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/data-swap)
I: Set the RESUME variable to override this.
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.14.15-xanmod1-cacule with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
~ ❯❯❯ sudo dpkg --configure -a
Setting up initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.14.15-xanmod1-cacule
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/data-swap)
I: Set the RESUME variable to override this.
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.14.15-xanmod1-cacule with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
~ ❯❯❯ sudo journalctl -p 3 -b
-- Logs begin at Fri 2021-10-22 13:47:38 IST, end at Sat 2021-10-30 16:55:55 IST. --
Oct 30 11:15:51 Strix kernel: x86/cpu: SGX disabled by BIOS.
Oct 30 11:15:51 Strix kernel: ACPI BIOS Error (bug): Failure creating named object [\_GPE._E4A], AE_ALREADY_EXISTS (20210604/dswload2-326)
Oct 30 11:15:51 Strix kernel: ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210604/psobject-220)
Oct 30 11:15:51 Strix kernel: 
Oct 30 11:15:55 Strix lightdm[2302]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Oct 30 11:15:55 Strix lightdm[2302]: PAM adding faulty module: pam_kwallet.so
Oct 30 11:15:55 Strix lightdm[2302]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Oct 30 11:15:55 Strix lightdm[2302]: PAM adding faulty module: pam_kwallet5.so
Oct 30 11:15:56 Strix systemd[2306]: Failed to start Portal service (GTK+/GNOME implementation).
Oct 30 11:15:56 Strix lightdm[2496]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Oct 30 11:15:56 Strix lightdm[2496]: PAM adding faulty module: pam_kwallet.so
Oct 30 11:15:56 Strix lightdm[2496]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Oct 30 11:15:56 Strix lightdm[2496]: PAM adding faulty module: pam_kwallet5.so
Oct 30 11:15:56 Strix lightdm[2521]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Oct 30 11:15:56 Strix lightdm[2521]: PAM adding faulty module: pam_kwallet.so
Oct 30 11:15:56 Strix lightdm[2521]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Oct 30 11:15:56 Strix lightdm[2521]: PAM adding faulty module: pam_kwallet5.so
Oct 30 11:16:06 Strix lightdm[2521]: gkr-pam: unable to locate daemon control file
Oct 30 16:17:56 Strix systemd[1]: Failed to start Ubuntu Advantage APT and MOTD Messages.
Oct 30 16:17:56 Strix kernel: [drm:drm_new_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Oct 30 16:17:56 Strix kernel: [drm:drm_new_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Oct 30 16:18:00 Strix lightdm[36108]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Oct 30 16:18:00 Strix lightdm[36108]: PAM adding faulty module: pam_kwallet.so
Oct 30 16:18:00 Strix lightdm[36108]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Oct 30 16:18:00 Strix lightdm[36108]: PAM adding faulty module: pam_kwallet5.so
Oct 30 16:18:00 Strix bluetoothd[851]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
Oct 30 16:18:00 Strix bluetoothd[851]: RFCOMM server failed for :1.120/Profile/HSPHSProfile/00001108-0000-1000-8000-00805f9b34fb: rfcomm_bind: Address already in use (98)
Oct 30 16:18:01 Strix systemd[36112]: Failed to start Portal service (GTK+/GNOME implementation).
Oct 30 16:18:01 Strix lightdm[36277]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Oct 30 16:18:01 Strix lightdm[36277]: PAM adding faulty module: pam_kwallet.so
Oct 30 16:18:01 Strix lightdm[36277]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Oct 30 16:18:01 Strix lightdm[36277]: PAM adding faulty module: pam_kwallet5.so
Oct 30 16:18:01 Strix lightdm[36318]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Oct 30 16:18:01 Strix lightdm[36318]: PAM adding faulty module: pam_kwallet.so
Oct 30 16:18:01 Strix lightdm[36318]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Oct 30 16:18:01 Strix lightdm[36318]: PAM adding faulty module: pam_kwallet5.so
Oct 30 16:18:09 Strix lightdm[36318]: gkr-pam: unable to locate daemon control file
Oct 30 16:18:10 Strix kernel: [drm:drm_new_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Oct 30 16:18:10 Strix kernel: [drm:drm_new_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Oct 30 16:18:10 Strix kernel: [drm:drm_new_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Oct 30 16:18:10 Strix kernel: [drm:drm_new_set_master [drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to grab modeset ownership
Oct 30 16:54:37 Strix systemd[1]: Failed to start Ubuntu Advantage APT and MOTD Messages.
Oct 30 16:54:52 Strix systemd[1]: Failed to start Ubuntu Advantage APT and MOTD Messages.
Oct 30 16:55:00 Strix systemd[1]: Failed to start Ubuntu Advantage APT and MOTD Messages.
~ ❯❯❯ systemctl --failed
  UNIT                 LOAD   ACTIVE SUB    DESCRIPTION                           
● ua-messaging.service loaded failed failed Ubuntu Advantage APT and MOTD Messages

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.
~ ❯❯❯ sudo systemctl restart ua-messaging.service
Job for ua-messaging.service failed because the control process exited with error code.
See "systemctl status ua-messaging.service" and "journalctl -xe" for details.
~ ❯❯❯ sudo systemctl start ua-messaging.service
Job for ua-messaging.service failed because the control process exited with error code.
See "systemctl status ua-messaging.service" and "journalctl -xe" for details.

내가 선호하는 해결 방법은 문제를 일으키는 설치 후 스크립트를 제거하는 것입니다. 그렇지 않으면 Mesa 및 Nvidia용 PPA를 제거하는 것을 선호하지 않습니다.

내 컴퓨터는 여전히 재부팅할 수 있지만 APT 패키지 관리자를 사용할 수 없습니다. initramfs-tools비슷한 문제에 대한 해결 방법을 따라 제거한 것을 설치해야 합니다 .

답변1

정말 해결하기 쉽습니다

설명이 포함된 솔루션:

cd /var/cache/apt/archives/
ls -al
#list packages installed

sudo rm -rf initramfs-tools*
#removes the problem files

sudo apt update 
#updates software cache 

sudo apt --fix-broken install
#looks for other problems and solve it 

sudo apt install initramfs-tools*
#recovers problems packages .

올바른 스크립트는 다음과 같습니다.

#! /bin/bash
sudo apt-get clean
sudo dpkg --configure -a
sudo apt-get autoclean
sudo apt-get update
echo
echo
echo "Packages that will be updated:"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
sudo apt list --upgradable -a
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo
echo
sudo apt-get upgrade -y
sudo apt-get full-upgrade -y
sudo apt-get autoremove  -y
sudo apt-get clean

apt-fast 대신 apt-get 또는 aptitude -f를 사용하십시오.

apt-get
#stable

apt-fast
#unstable but fast

aptitude -f
#best and safe and fix all the problems .

--purge 
#without specification can sometimes delete important files

그래도 문제가 해결되지 않으면 제가 지시한 각 명령의 출력을 게시하세요. 특히apt --fix-broken install

답변2

sudo dpkg --configure -a을(를) 사용하지 못했습니다 lz4. ( )를 설치해야 할 것 같습니다 apt install lz4.

그러나 더 나은 아이디어는 확인 /etc/initramfs-tools/initramfs.conf하고 COMPRESS옵션을 선택하는 것 같습니다. 나는 다음과 같은 의견을 가지고 있습니다 :

# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz ]

사용 gzip. Grub에는 gz, lzop, xz 모듈과 my grub.cfg로드 만 있습니다 gzip(lzop 및 xz도 로드되는 xen 플랫폼 제외).

또한, 디렉토리를 살펴보십시오 /boot. initrd 파일이 없으면 필요하지 않습니다.initramfs-tools

관련 정보