首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >损坏的内核,不允许我做任何事情

损坏的内核,不允许我做任何事情
EN

Unix & Linux用户
提问于 2023-05-11 05:42:10
回答 1查看 88关注 0票数 1

好的,我昨天问了一个问题,关于我的爸爸不认识任何司机。经过大量的搜索,我发现我的内核6.2.6在安装上是不完整的。但是现在它运行6.2.6作为默认的或主要的。在6.2.6内核中,所有包下载都是不成功的。我能够使用引导菜单加载到以前的内核中。当我按下带有徽标的esc时,它会询问windows或pop os,但如果我在2-3秒后按esc,它会询问m个老内核或新内核。因此,我能够进入以前的内核,它运行良好。

代码语言:javascript
复制
(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

如果我试图删除旧内核,它就不能工作

代码语言:javascript
复制
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 76的依赖关系,所以我尝试安装它。

代码语言:javascript
复制
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)

它说找不到块装置,我不知道该怎么做。因为现在默认情况下,它加载损坏的内核,它不允许我安装任何东西,即使是在旧内核中

EN

回答 1

Unix & Linux用户

发布于 2023-05-11 06:27:54

我使用问题中提到的方法登录旧内核。然后我升级了它。所有必要的文件都已下载,但由于找不到efi分区,所以没有安装。因此,我在/etc/fstab文件中引发了一个错误,在重新启动之后,该文件由于错误而进入了紧急模式。在这里,我安装了下载的包,并成功运行。然后,我解决了我过去进入应急模式的错误。然后我重新启动。6.2.6内核已经加载,现在运行良好

在检查可恢复和损坏的文件之后,还可以使用

代码语言:javascript
复制
sudo sh -c 'fsck.vfat -n /dev/[partition name] || echo "RECOVERABLE errors found"'

如果有损坏的文件运行

代码语言:javascript
复制
sudo fsck.vfat -a /dev/[partition name]
票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/745563

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档