AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1251876
Accepted
rik
rik
Asked: 2020-06-20 03:44:38 +0800 CST2020-06-20 03:44:38 +0800 CST 2020-06-20 03:44:38 +0800 CST

损坏的 /dev/sda2

  • 772

通常当我启动我的系统时,我会被带到 Busybox initramfs 屏幕。我要做:

fsck /dev/sda2

让它恢复正常(几个修复选项,比如缺少 inode,来吧。我应该记下错误,也许下次我会这样做并在这里更新)。有时,在我登录时会发生这种情况。所有文件系统都变为只读(apt update返回错误)并且必须再次调用fsck进行救援。这主要发生在我使用 Skype 之后,但这可能不相关。我的硬盘驱动器出现故障了吗?(SMART 状态显示正常)。或者是别的什么?

PS:我最近也切换到了 Ubuntu 20.04,在此之前没有发生这种情况。

boot fsck initramfs busybox 20.04
  • 1 1 个回答
  • 1269 Views

1 个回答

  • Voted
  1. Best Answer
    heynnema
    2020-06-21T07:00:14+08:002020-06-21T07:00:14+08:00

    您的 BIOS 是最新的。

    如果在计算机运行时发生“后面板轻微敲击”,则您的 HDD 可能发生了轻微/严重的磁头崩溃。您有 CRC 和写入错误。您可能遇到 HDD 问题或 SATA 驱动器电缆问题(可能需要重新安装或更换)。

    目前尚不清楚为什么它会在此时关闭。可能还有其他问题。

    首先我们将检查文件系统,然后我们将坏块磁盘。

    fsck

    • 以“试用 Ubuntu”模式启动到 Ubuntu Live DVD/USB
    • terminal按Ctrl+ Alt+打开一个窗口T
    • 类型sudo fdisk -l
    • 识别“Linux 文件系统”的 /dev/sdXX 设备名称
    • 键入sudo fsck -f /dev/sda2,替换sdXX为您之前找到的数字
    • fsck如果有错误,请重复该命令

    坏块

    注意:不要中止坏块扫描!

    注意:请勿对 SSD 进行坏块

    注意:首先备份您的重要文件!

    注意:这将需要几个小时

    注意:您可能有待处理的 HDD 故障

    以“试用 Ubuntu”模式启动到 Ubuntu Live DVD/USB。

    在terminal...

    sudo fdisk -l# 识别所有“Linux 文件系统”分区

    sudo e2fsck -fcky /dev/sdXX# 只读测试

    或者

    sudo e2fsck -fccky /dev/sda2# 无损读/写测试(推荐)

    -k 很重要,因为它保存了以前的坏块表,并将任何新的坏块添加到该表中。如果没有 -k,您将丢失所有先前的坏块信息。

    -fccky 参数...

       -f    Force checking even if the file system seems clean.
    
       -c    This option causes e2fsck to use badblocks(8) program to do
             a read-only scan of the device in order to find any bad blocks.
             If any bad blocks are found, they are added to the bad block
             inode to prevent them from being allocated to a file or direc‐
             tory.  If this option is specified twice, then the bad block scan
             will be done using a non-destructive read-write test.
    
       -k    When combined with the -c option, any existing bad blocks in the
             bad blocks list are preserved, and any new bad blocks found by
             running badblocks(8) will be added to the existing bad blocks
             list.
    
       -y    Assume an answer of `yes' to all questions; allows e2fsck to be
             used non-interactively. This option may not be specified at the
             same time as the -n or -p options.
    

    更新#1:

    您需要更换硬盘。

    • 0

相关问题

  • grub 菜单中的“恢复”选项是什么?

  • 用户如何避免在启动时输入密码?[关闭]

  • 更改 Wubi 的启动顺序

  • 如何在 Ubuntu 启动时显示或隐藏启动消息?

  • 如何避免启动时出现“S to Skip”消息?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve