User Tools

Site Tools


hard_disk_repair

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
hard_disk_repair [2023/01/05 12:05] – [Scan and Repair Disk Bad Sectors in Ubuntu Linux, Fedora] kalaschnikowhard_disk_repair [2023/01/05 16:40] (current) – [badblocks] kalaschnikow
Line 1: Line 1:
 +====== Hard disk repair ======
  
 +===== Tutorials =====
 +
 +==== Scan and Repair Disk Bad Sectors in Ubuntu Linux, Fedora ====
 +
 +[[https://www.debugpoint.com/scan-repair-bad-sector-disk-linux/|Scan and Repair Disk Bad Sectors in Ubuntu Linux, Fedora]] 
 +
 +  * At first: boot from Live CD or Live USB-Stick
 +    * it is not recommended to use the repair tools on mounted file system (especially on root "/"!)
 +      * possibility of information loss is very high 
 +
 +...
 +
 +==== Repair and isolate bad sectors on your hard drive with these tools ====
 +
 +
 +[[https://ubunlog.com/en/repair-isolates-bad-sectors-hard-drive-these-tools/|Repair and isolate bad sectors on your hard drive with these tools]]
 +
 +
 +==== Misc ====
 +
 +[[https://www.tecmint.com/find-linux-filesystem-type/|7 Ways to Determine the File System Type in Linux (Ext2, Ext3 or Ext4)]]
 +===== Useful commands or tools =====
 +
 +==== fdisk ====
 +
 +https://wiki.ubuntuusers.de/fdisk/
 +
 +The following command lists partitions: 
 +<code>
 +sudo fdisk -l
 +</code>
 +
 +
 +==== badblocks ====
 +
 +https://manpages.ubuntu.com/manpages/jammy/en/man8/badblocks.8.html
 +
 +
 +==== fsck ====
 +
 +  * [[https://phoenixnap.com/kb/fsck-command-linux|How to Use fsck Command to Check and Repair Filesystem]]
 +  * [[https://www.tecmint.com/fsck-repair-file-system-errors-in-linux/|How to Use ‘fsck’ to Repair File System Errors in Linux]]
 +===== My actions =====
 +
 +<code>
 +ubuntu@ubuntu:~$ sudo badblocks -v /dev/sda1
 +Es wird von Block 0 bis 217788415 geprüft
 +Es wird nach defekten Blöcken gesucht (Nur-Lesen-Modus): 
 +4331816
 +4331817
 +4331818
 +4331819
 +177271288
 +177271289
 +177271290
 +177271291
 +177271304
 +177271305
 +177271306
 +177271307
 +177272028
 +177272029
 +177272030
 +177272031
 +177272044
 +177272045
 +177272046
 +177272047
 +177272088
 +177272089
 +177272090
 +177272091
 +177272096
 +177272097
 +177272098
 +177272099
 +177272272
 +177272273
 +177272274
 +177272275
 +erledigt                                                 
 +Durchgang beendet, 32 defekte Blöcke gefunden. (32/0/0 Fehler)
 +</code>
 +
 +
 +<code>
 +ubuntu@ubuntu:~$ sudo e2fsck -l ~/Desktop/bad_sectors.txt /dev/sda1
 +e2fsck 1.45.5 (07-Jan-2020)
 +„Bad block“ 177271288 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177271289 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177271290 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177271291 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177271304 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177271305 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177271306 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177271307 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272028 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272029 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272030 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272031 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272044 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272045 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272046 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272047 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272088 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272089 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272090 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272091 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272096 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272097 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272098 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272099 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272272 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272273 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272274 außerhalb des gültigen Bereichs; ignoriert.
 +„Bad block“ 177272275 außerhalb des gültigen Bereichs; ignoriert.
 +/dev/sda1: Updating bad block inode.
 +Durchgang 1: Inodes, Blöcke und Größen werden geprüft
 +Durchgang 2: Verzeichnisstruktur wird geprüft
 +Durchgang 3: Verzeichnisverknüpfungen werden geprüft
 +Durchgang 4: Referenzzähler werden überprüft
 +Durchgang 5: Zusammengefasste Gruppeninformation wird geprüft
 +
 +/dev/sda1: ***** DATEISYSTEM WURDE VERÄNDERT *****
 +/dev/sda1: 666402/13615104 Dateien (0.2% nicht zusammenhängend), 9817166/54447104 Blöcke
 +</code>