壊れたカーネルのために何もできません

壊れたカーネルのために何もできません

まあ、昨日私がよく使うオペレーティングシステムがどんなドライバも認識していないことについて質問しました。多くの検索の最後に、カーネル6.2.6のインストールが不完全であることがわかりました。しかし、今では6.2.6をデフォルトまたはメジャーバージョンとして実行しています。 6.2.6 カーネルでは、すべてのパッケージのダウンロードが失敗します。ブートメニューを使用して以前のカーネルにロードできました。ロゴがある状態でescを押すとWindowsやポップOSを聞きますが、2〜3秒後にすぐにescを押すと古いカーネルや新しいカーネルを聞いてみますね。それで、以前はうまく機能していたカーネルに入ることができました。

(base) madhusudan@pop-os:~$ uname -r
6.1.11-76060111-generic 

(base) madhusudan@pop-os:~$ dpkg --list | grep linux-image                                                
ii  linux-image-6.0.12-76060006-generic       6.0.12-76060006.202212290932~1674139725~22.04~ca93ccf    amd64   Linux kernel image for version 6.0.12 on 64 bit x86 SMP                                                                            
ii  linux-image-6.1.11-76060111-generic       6.1.11-76060111.202302091138~1675975749~22.04~f771a7f    amd64   Linux kernel image for version 6.1.11 on 64 bit x86 SMP                                                                             
iF  linux-image-6.2.6-76060206-generic        6.2.6-76060206.202303130630~1683753207~22.04~77c1465     amd64   Linux kernel image for version 6.2.6 on 64 bit x86 SMP                                                                
ii  linux-image-generic                       6.2.6.76060206.202303130630~1683753207~22.04~77c1465     amd64   Generic Linux kernel image

古いカーネルを削除しようとすると機能しません。

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 pop-desktop : Depends: linux-system76 but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

linux-system76の依存関係が満たされていないため、インストールしようとしています。

linux-system76 is already the newest version (6.2.6.76060206.202303130630~1683753207~22.04~77c1465).
The following packages were automatically installed and are no longer required:
  linux-headers-6.0.12-76060006 linux-headers-6.0.12-76060006-generic
  linux-image-6.0.12-76060006-generic linux-modules-6.0.12-76060006-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 73 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 linux-image-6.2.6-76060206-generic (6.2.6-76060206.202303130630~1683753207~22.04~77c1465) ...
Processing triggers for linux-image-6.2.6-76060206-generic (6.2.6-76060206.202303130630~1683753207~22.04~77c1465) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.2.6-76060206-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.2.6-76060206-generic
kernelstub.Config    : INFO     Looking for configuration...
kernelstub.Drive     : ERROR    Could not find a block device for the a partition. This is a critical error and we cannot continue.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/kernelstub/drive.py", line 56, in __init__
    self.esp_fs = self.get_part_dev(self.esp_path)
  File "/usr/lib/python3/dist-packages/kernelstub/drive.py", line 94, in get_part_dev
    raise NoBlockDevError('Couldn\'t find the block device for %s' % path)
kernelstub.drive.NoBlockDevError: Couldn't find the block device for /boot/efi
run-parts: /etc/initramfs/post-update.d//zz-kernelstub exited with return code 174
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.2.6-76060206-generic (--configure):
 installed linux-image-6.2.6-76060206-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-6.2.6-76060206-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

ブロックデバイスが見つからないと出てきて、どうすればいいかわかりません。これは、基本的にはまだ破損したカーネルをロードし、古いカーネルには何もインストールできないためです。

ベストアンサー1

質問に記載されている方法を使用して以前のカーネルにログインしました。それからアップグレードしました。必要なすべてのファイルをダウンロードしましたが、efiパーティションが見つからず、インストールされませんでした。そのため、/etc/fstabファイルでエラーが発生し、再起動後にそのエラーが原因でパニックモードに入りました。ここにダウンロードしたパッケージをインストールし、正常に実行しました。その後、パニックモードに入るために使用したエラーを修正しました。その後、再起動します。 6.2.6カーネルがロードされ、完全に実行されます。

次に、次を使用して回復可能で破損したファイルも確認します。

sudo sh -c 'fsck.vfat -n /dev/[partition name] || echo "RECOVERABLE errors found"'

破損したファイルがある場合は実行

sudo fsck.vfat -a /dev/[partition name]

おすすめ記事