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 / 问题 / 713191
Accepted
cat
cat
Asked: 2015-12-25 14:28:56 +0800 CST2015-12-25 14:28:56 +0800 CST 2015-12-25 14:28:56 +0800 CST

恢复半加密磁盘

  • 772

最近我提交了一个错误,从我的角度来看,这是 Ubuntu 安装程序中一个非常烦人的错误。

然而,我安装 Ubuntu 的麻烦似乎与 Ubuntu 无关,而是几天前尝试安装 Manjaro Linux 时,我不小心选择了“加密磁盘”和“使用 LVM”,我认为是简单的新分区表将使加密消失。

现在我已经尝试安装 Ubuntu 14.04 并且 Ubiquity 在同一个地方崩溃,我发现磁盘在某种程度上显然存在错误。

据我从 SMART 状态(包括在下面)中可以看出,它没有物理损坏,并且gparted没有抱怨IO格式化或写入磁盘的错误。

我还验证了我使用的所有 LiveCD 的哈希值和完整性。

假设加密是问题,我能做些什么来恢复我的磁盘以便安装 Ubuntu?我是否将每个扇区都写满了零?(这不会需要几天吗?)

如果加密不是问题,那是什么?

假设加密不是问题,那是什么?


这是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 INFORMATION SECTION ===
Device Model:     SanDisk SDSSDA240G
Serial Number:    153655402044
LU WWN Device Id: 5 001b44 ed2285a3c
Firmware Version: U21010RL
User Capacity:    240,057,409,536 bytes [240 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA >3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Dec 26 21:37:31 2015 EST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM level is:     254 (maximum performance)
Rd look-ahead is: Disabled
Write cache is:   Enabled
ATA Security is:  ENABLED, PW level MAX, not locked, frozen [SEC6]
Wt Cache Reorder: Unavailable

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (    0) seconds.
Offline data collection
capabilities:            (0x71) SMART execute Offline immediate.
                    No Auto Offline data collection support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0002) Does not save SMART data before
                    entering power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   2) minutes.
Extended self-test routine
recommended polling time:    (  10) minutes.
Conveyance self-test routine
recommended polling time:    (   2) minutes.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  5 Reallocated_Sector_Ct   -O--CK   100   100   000    -    0
  9 Power_On_Hours          -O--CK   143   100   000    -    143
 12 Power_Cycle_Count       -O--CK   100   100   000    -    833
166 Unknown_Attribute       -O--CK   100   100   000    -    1
167 Unknown_Attribute       -O--CK   100   100   000    -    0
168 Unknown_Attribute       -O--CK   100   100   000    -    12
169 Unknown_Attribute       -O--CK   100   100   000    -    46
170 Unknown_Attribute       -O--CK   100   100   000    -    0
171 Unknown_Attribute       -O--CK   100   100   000    -    0
172 Unknown_Attribute       -O--CK   100   100   000    -    0
173 Unknown_Attribute       -O--CK   100   100   ---    -    7
174 Unknown_Attribute       -O--CK   100   100   000    -    57
187 Reported_Uncorrect      -O--CK   100   100   000    -    0
194 Temperature_Celsius     -O---K   061   100   000    -    39 (0 52 0 0 0)
199 UDMA_CRC_Error_Count    -O--CK   100   100   000    -    0
230 Unknown_SSD_Attribute   -O--CK   100   100   000    -    0
232 Available_Reservd_Space PO--CK   100   100   004    -    100
233 Media_Wearout_Indicator -O--CK   100   100   000    -    1872
241 Total_LBAs_Written      ----CK   253   253   000    -    1687
242 Total_LBAs_Read         ----CK   253   253   000    -    891
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

General Purpose Log Directory Version 1
SMART           Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00       GPL,SL  R/O      1  Log Directory
0x01       GPL,SL  R/O      1  Summary SMART error log
0x02       GPL,SL  R/O      1  Comprehensive SMART error log
0x03       GPL,SL  R/O      1  Ext. Comprehensive SMART error log
0x04       GPL,SL  R/O      8  Device Statistics log
0x06       GPL,SL  R/O      1  SMART self-test log
0x07       GPL,SL  R/O      1  Extended self-test log
0x09       GPL,SL  R/W      1  Selective self-test log
0x10       GPL,SL  R/O      1  NCQ Command Error log
0x11       GPL,SL  R/O      1  SATA Phy Event Counters
0x30       GPL,SL  R/O      9  IDENTIFY DEVICE data log
0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log
0xe0       GPL,SL  R/W      1  SCT Command/Status
0xe1       GPL,SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
No Errors Logged

SMART Error Log Version: 1
No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

SCT Commands not supported

Device Statistics (GP Log 0x04)
Page Offset Size         Value  Description
  1  =====  =                =  == General Statistics (rev 2) ==
  1  0x008  4              833  Lifetime Power-On Resets
  1  0x010  4              143  Power-on Hours
  1  0x018  6             1687  Logical Sectors Written
  1  0x020  6         67940491  Number of Write Commands
  1  0x028  6              891  Logical Sectors Read
  1  0x030  6         42663463  Number of Read Commands
  2  =====  =                =  == Free-Fall Statistics (empty) ==
  3  =====  =                =  == Rotating Media Statistics (empty) ==
  4  =====  =                =  == General Errors Statistics (rev 1) ==
  4  0x008  4                0  Number of Reported Uncorrectable Errors
  4  0x010  4               57  Resets Between Cmd Acceptance and Completion
  5  =====  =                =  == Temperature Statistics (rev 1) ==
  5  0x008  1               39  Current Temperature
  5  0x010  1             -110  Average Short Term Temperature
  5  0x018  1             -124  Average Long Term Temperature
  5  0x020  1               51  Highest Temperature
  5  0x028  1               10  Lowest Temperature
  5  0x030  1             -110  Highest Average Short Term Temperature
  5  0x038  1                1  Lowest Average Short Term Temperature
  5  0x040  1               -1  Highest Average Long Term Temperature
  5  0x048  1                0  Lowest Average Long Term Temperature
  5  0x050  4                0  Time in Over-Temperature
  5  0x058  1              100  Specified Maximum Operating Temperature
  5  0x060  4                0  Time in Under-Temperature
  5  0x068  1                0  Specified Minimum Operating Temperature
  6  =====  =                =  == Transport Statistics (rev 1) ==
  6  0x008  4             4442  Number of Hardware Resets
  6  0x018  4                0  Number of Interface CRC Errors
  7  =====  =                =  == Solid State Device Statistics (rev 1) ==
  7  0x008  1                0  Percentage Used Endurance Indicator

SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x0001  2            0  Command failed due to ICRC error
0x0002  2            0  R_ERR response for data FIS
0x0003  2            0  R_ERR response for device-to-host data FIS
0x0004  2            0  R_ERR response for host-to-device data FIS
0x0005  2            0  R_ERR response for non-data FIS
0x0006  2            0  R_ERR response for device-to-host non-data FIS
0x0007  2            0  R_ERR response for host-to-device non-data FIS
0x0008  2            0  Device-to-host non-data FIS retries
0x0009  2            0  Transition from drive PhyRdy to drive PhyNRdy
0x000a  2            4  Device-to-host register FISes sent due to a COMRESET
0x000b  2            0  CRC errors within host-to-device FIS
0x000d  2            0  Non-CRC errors within host-to-device FIS
0x000f  2            0  R_ERR response for host-to-device data FIS, CRC
0x0010  2            0  R_ERR response for host-to-device data FIS, non-CRC
0x0012  2            0  R_ERR response for host-to-device non-data FIS, CRC
0x0013  2            0  R_ERR response for host-to-device non-data FIS, non-CRC
partitioning
  • 1 1 个回答
  • 218 Views

1 个回答

  • Voted
  1. Best Answer
    snorp
    2016-01-01T16:01:32+08:002016-01-01T16:01:32+08:00

    在这一点上,我建议完全擦除驱动器。作为免责声明,这确实可以完全擦除,使那里的任何东西都无法恢复! 对于您会使用的硬盘驱动器dd if=/dev/zero of=/dev/sdX,但似乎您有一个 SSD,因此涉及更多。

    首先检查是否未启用安全性(仅供参考:这一切都必须以 root/sudo 身份完成,我正在使用 /dev/sda,因为这就是您上面的输出所示。您可以用任何有问题的驱动器替换它。) :

    # hdparm -I /dev/sda
    [...truncated...]
    Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
                frozen
        not     expired: security count
                supported: enhanced erase
        2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT. 
    

    那条未启用的行意味着我们可以轻松进行,我们现在启用安全性:

    # hdparm --user-master u --security-set-pass tempPassword /dev/sda
    

    密码没关系,它也会被清除。让我们做一个快速的健全性检查以确保它有效。

    #hdparm -I /dev/sda
    [...]
    Security: 
        Master password revision code = 65534
                supported
                enabled
    [...]
    

    它现在显示已启用,因此我们现在可以执行实际擦除:

    # hdparm --user-master u --security-erase tempPassword /dev/sda
    

    最后一次健全性检查# hdparm -I /dev/sda应该显示未启用,就像在第一次检查中一样。

    参考:清空 SSD 的推荐方法是什么?

    • 1

相关问题

  • 是否有更好的方式为 /home/userX 构建分区/挂载

  • Linux 文件系统层次结构中的默认目录是什么意思?

  • 如何将 /usr 移动到新分区?

  • 如何从双启动计算机访问加密的主文件夹?

  • 您对台式机和家庭服务器的驱动器分区方案有什么建议?[关闭]

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