Ubuntu で入出力エラーが発生しますが、Windows からデータを読み取ることができます

Ubuntu で入出力エラーが発生しますが、Windows からデータを読み取ることができます

私はWindows 10とUbuntu 18.04を搭載したデュアルブートのラップトップを持っています。Ubuntuはインストールされ、正常に動作していましたが、突然起動しなくなりました。

/dev/sda6 の読み取り中に入出力エラーが発生します。

一方、Windows は正常に起動し、サードパーティ プログラム DiskInternals を使用して Linux パーティション /dev/sda6 のデータにアクセスすることもできます。

Ubuntu 18.04 ライブ USB を使用して Linux を再インストールしようとしましたが、「error fsyncing/closing /dev/sda input/output error」というエラー メッセージが表示されて失敗します。

どのような助けでも大歓迎です。

更新: --> ディスクアプリのスクリーンショット

出力grep -i sda6 /var/log/syslog*

ubuntu@ubuntu:~$ grep -i sda6 /var/log/syslog
Jun 25 01:42:08 ubuntu lvm[1097]:   /dev/sda6: read failed after 0 of 4096 at 220201943040: Input/output error
Jun 25 01:42:08 ubuntu lvm[1097]:   /dev/sda6: read failed after 0 of 4096 at 220202000384: Input/output error
Jun 25 01:42:08 ubuntu lvm[1097]:   /dev/sda6: read failed after 0 of 4096 at 0: Input/output error
Jun 25 01:42:08 ubuntu lvm[1097]:   /dev/sda6: read failed after 0 of 4096 at 4096: Input/output error
Jun 25 01:42:08 ubuntu kernel: [    7.481627]  sda: sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8
Jun 25 01:42:08 ubuntu kernel: [   10.124131] EXT4-fs (sda6): INFO: recovery required on readonly filesystem
Jun 25 01:42:08 ubuntu kernel: [   10.124133] EXT4-fs (sda6): write access will be enabled during recovery
Jun 25 01:42:08 ubuntu kernel: [  147.204149] EXT4-fs (sda6): error loading journal
Jun 25 01:42:10 ubuntu kernel: [  158.444325] Buffer I/O error on dev sda6, logical block 53760240, async page read
Jun 25 01:42:39 ubuntu kernel: [  186.822855] Buffer I/O error on dev sda6, logical block 53760240, async page read

出力fsck /dev/sda6

fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
fsck.ext2: Input/output error while trying to open /dev/sda6

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

答え1

一方、Windows は正常に起動し、サードパーティ プログラム DiskInternals を使用して Linux パーティション /dev/sda6 のデータにアクセスすることもできます。

これが問題の根本です。Ubuntu Bionic はe2fsprogs 新しい機能を備えたファイルシステムを作成します。Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum つまり、metadata_csum です。

man e2fsck からコピー

この ext4 機能により、メタデータのチェックサムが可能になります。この機能は、すべてのファイルシステム メタデータ (スーパーブロック、グループ記述子ブロック、inode およびブロック ビットマップ、ディレクトリ、およびエクステント ツリー ブロック) のチェックサムを保存します。メタデータ ブロックに使用されるチェックサム アルゴリズムは、uninit_bg 機能を持つグループ記述子に使用されるアルゴリズムとは異なります。これら 2 つの機能は互換性がないため、uninit_bg ではなく metadata_csum が優先的に使用されます。

Windows プログラムでアクセスすると、この保存されたメタデータが変更/破損します。

答え2

まず、ファイル システムにエラーがないか確認しましょう。

18.04 以降の場合...

  • Ubuntu Live DVD/USBを起動する
  • terminal窓を開ける
  • タイプsudo fsck -f /dev/sda6
  • エラーがあった場合はfsckコマンドを繰り返します
  • タイプreboot

アップデート#1:

まあ、これは非常に奇妙な HDD の問題でした。

結論... Windows から、Ubuntu sda6 パーティションを削除し、BIOS から Ubuntu ブート レコードを削除し、Ubuntu Live USB から起動し、Ubuntu を再インストールして、データを復元しました。すべてが再び動作するようになりました。

関連情報