损坏/启动分区:输入/输出错误

问题

我面临的问题是,在GRUB中选择Ubuntu之后,我在启动时遇到以下错误:

Error: File "/vmlinuz-3.13.0-24-generic.efi.signed" not found. unaligned pointer 0xd0a26c68 Aborted. Press any key to exit. 

错误:找不到文件“/vmlinuz-3.13.0-24-generic.efi.signed”。

我已经在这里发布了一个关于这个问题的问题,但是随着很多事情发生了变化,我设置了这个问题。

我的设置

如果在安装过程中我遇到了一些不同的麻烦,因为我有一个完全加密的root设置。 此外,UEFI和GPT存在问题,尤其是要使所有function都能与Windows配合使用。 由于安装很久以前,我不记得任何细节。

在我的Ubuntu硬盘上,我有三个主要分区:

  • / dev / sda1:fat32,引导标志。
    这应该是EFI分区(/ boot / efi,不是吗?)
  • / dev / sda2:ext2
    应该是/ boot
  • / dev / sda3:crypt-luks
    加密容器,包含root和swap

故障排除

在我从USB启动的实时系统中,我发现了以下问题:

鹦鹉螺出错

单击nautilus中挂载的引导分区(/ dev / sda2)会出现以下错误:

 Sorry, could not display all the contents of “boot”: Error when getting information for file '/media/ujosh/root/boot/System.map-3.11.0-17-generic': Input/output error 

抱歉,无法显示“boot”的所有内容:获取文件'/media/ujosh/root/boot/System.map-3.11.0-17-generic'的信息时出错:输入/输出错误

更新initramfs时出错

不过,我可以挂载所有三个分区并通过mount -bind将它们组合在一起,这样我就可以chroot进入我的系统。 在那里,我跑了

 apt-get update apt-get dist-upgrade 

一切都按预期工作,直到

 update-initramfs: Generating /boot/initrd.img-3.13.0-24-generic cat: /proc/cmdline: No such file or directory gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.13.0-24-generic with 1. dpkg: error processing package initramfs-tools (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Errors were encountered while processing: linux-image-3.13.0-24-generic grub-efi-amd64 grub-efi-amd64-signed linux-image-extra-3.13.0-24-generic linux-signed-image-3.13.0-24-generic linux-signed-image-generic linux-signed-generic initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) 

启动修复没有帮助

我也在设置上运行了boot-repair,最终在更新initramfs时触发了相同的错误,如上所述。

运行文件系统检查

在@zoid的帮助下,我在/ boot-partition上使用了以下测试: enter code here

 sudo fsck.ext2 -p -f -C0 /dev/sda2 /dev/sda2: Inode 29 has illegal block(s). /dev/sda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (ie, without -a or -p options) 

 sudo fsck.ext2 -f -C0 /dev/sda2 

结果贴在这里


 sudo smartctl -H /dev/sda smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-24-generic] (local build) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED 

 sudo smartctl -A /dev/sda smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-24-generic] (local build) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART Attributes Data Structure revision number: 1 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0 9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 2869 12 Power_Cycle_Count 0x0032 098 098 000 Old_age Always - 1836 177 Wear_Leveling_Count 0x0013 098 098 000 Pre-fail Always - 48 179 Used_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 0 181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0 182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0 183 Runtime_Bad_Block 0x0013 100 100 010 Pre-fail Always - 0 187 Uncorrectable_Error_Cnt 0x0032 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0032 062 050 000 Old_age Always - 38 195 ECC_Error_Rate 0x001a 200 200 000 Old_age Always - 0 199 CRC_Error_Count 0x003e 253 253 000 Old_age Always - 0 235 POR_Recovery_Count 0x0012 099 099 000 Old_age Always - 128 241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 6450810314 

我的问题

如何恢复我的/ boot-partition? 我认为它被打破导致了整个问题。
我的/ boot-partition有什么问题,怎么会发生这种情况? 我的整个高效操作系统已被打破,我想知道将来如何避免这种情况。

任何帮助都非常感谢!

“输入/输出错误”表示可能由磁盘缺陷引起的读/写错误。 它似乎无法读/写块,因此无法修改分区。

我建议您备份磁盘上的所有个人数据,并使用您选择的工具检查文件系统。

– 更新 –

对于filesystem-check你可以使用

 fsck.ext2 -p -f -C0 /dev/sda2 

它将检查文件系统(-f),为您提供一些信息,显示进度条(-C0)并询问您是否应该尝试修复主要问题(-p)。

如果你遇到很多问题,我建议安装

 smartmontools 

并运行

 sudo smartctl -H /dev/sda 

快速测试

 sudo smartctl -t long /dev/sda 

彻底检查硬盘

 sudo smartctl -a /dev/sda 

显示硬盘状态

 sudo smartctl -A /dev/sda 

显示硬盘属性。

我回来了!

使用fsck.ext2确实达成了协议。 在sudo fsck.ext2 -f -C0 /dev/sda2用“是”回答所有内容(参见问题),修复了文件系统。

之后,我解锁了我的加密分区,安装了所有内容并将其chrooted到我的系统中。 在那里,我运行了apt-get dist-upgrade 。 之后,grub在启动时进入了grub命令行。

之后我回到了实时系统并运行了启动修复程序。 之后我不得不重新配置我的加密设置,请参阅EncryptedFilesystemsViaUbiquity 。

现在,我可以再次使用我的系统。 网络在某种程度上被破坏了,它很好地连接但我不能在程序中使用互联网。 sudo dhclient wlan0修复了一个会话。