最近我的一个驱动器拒绝安装,显示以下错误消息:
现在幸运的是,我能够解决这个问题,这要归功于 Ask Ubuntu 上的另一个问题,您可以在这里找到:“结构需要清理”错误 - 无法挂载分区
基本上我只需要修复系统,我输入了命令:
sudo fsck.ext4 /dev/sda[NUMBER]
正如该帖子的答案所述。那行得通,我驱动器中的所有内容都已恢复。
然而,我的问题是:这样的事情首先是如何发生的?我想知道,这样我就可以尝试防止这种情况在未来再次发生。
我将提供我的设置作为我可能做错了什么的指南。我正在使用 Ubuntu Studio 19.10。这个硬盘驱动器不是我的引导驱动器,它也不包含我的主分区。我将其设置为在启动时挂载。我通过在 GNOME 磁盘中启用它来做到这一点。该驱动器也被格式化为 ext4。
尽管我使用的是 Xfce,但我主要使用 Nemo 作为我的文件管理器,而不是 Thunar。
我将它的状态设置为出现在我的 Conky 中,但除此之外,它仅在我专门运行、打开或保存其中的东西时才会使用。我从不卸下它。当我关闭我的系统时,我只是点击关机,通常一切都很好。
那么什么会导致这样的错误呢?只是运气不好?还是我正在做的事情?
如果我不够具体,请随时提出问题。
先感谢您 :)
编辑:在下面添加请求的信息。
$ cat /etc/fstab
# / was on /dev/sda1 during installation
UUID=346ba1d4-efe5-4435-87cc-178b90845c65 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
/dev/sdb /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
LABEL=LinuxHDD /mnt/LinuxHDD auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=LinuxHDD 0 0
$ sudo blkid
/dev/sdc1: UUID="346ba1d4-efe5-4435-87cc-178b90845c65" TYPE="ext4" PARTUUID="e437d520-01"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: LABEL="HDD 2" UUID="46A4A2A1A4A2934B" TYPE="ntfs" PARTUUID="50e732f7-01"
/dev/sdb1: LABEL="LinuxHDD" UUID="44417cbc-3321-43b1-9487-119740d01959" TYPE="ext4" PARTUUID="00033300-01"
/dev/sdd1: LABEL="System Reserved" UUID="5612B79912B77D15" TYPE="ntfs" PARTUUID="f0c3841b-01"
/dev/sdd2: UUID="86E6B86DE6B85EDD" TYPE="ntfs" PARTUUID="f0c3841b-02"
/dev/sdd3: UUID="AAD2DEECD2DEBBAF" TYPE="ntfs" PARTUUID="f0c3841b-03"
/dev/sde1: LABEL="HDD" UUID="865243EE5243E193" TYPE="ntfs" PARTUUID="37ab496d-01"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
$ sudo fdisk -l
Disk /dev/loop0: 140.8 MiB, 146882560 bytes, 286880 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 44.18 MiB, 46325760 bytes, 90480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 168.46 MiB, 176631808 bytes, 344984 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 140.32 MiB, 147128320 bytes, 287360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 89.9 MiB, 93417472 bytes, 182456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop5: 146.5 MiB, 153600000 bytes, 300000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop6: 89.1 MiB, 93429760 bytes, 182480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop7: 146.54 MiB, 153649152 bytes, 300096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-00B
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x50e732f7
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 1953521663 1953519616 931.5G 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: SAMSUNG HD502HJ
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00033300
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 976773119 976771072 465.8G 83 Linux
Disk /dev/sdc: 55.92 GiB, 60022480896 bytes, 117231408 sectors
Disk model: Corsair Force LS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe437d520
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 117229567 117227520 55.9G 83 Linux
Disk /dev/sdd: 232.91 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 850
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf0c3841b
Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 718847 716800 350M 7 HPFS/NTFS/exFAT
/dev/sdd2 718848 487473151 486754304 232.1G 7 HPFS/NTFS/exFAT
/dev/sdd3 487473152 488394751 921600 450M 27 Hidden NTFS WinRE
Disk /dev/sde: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-08M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x37ab496d
Device Boot Start End Sectors Size Id Type
/dev/sde1 2048 1953521663 1953519616 931.5G 7 HPFS/NTFS/exFAT
Disk /dev/loop8: 167.62 MiB, 175751168 bytes, 343264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop9: 54.64 MiB, 57274368 bytes, 111864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop10: 54.64 MiB, 57274368 bytes, 111864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
我希望这有帮助!
是什么导致文件系统损坏?
不当下马
从外部操作系统访问(即:Windows 驱动程序)
磁盘(预)故障
主存故障
事情刚刚发生(我希望很少发生)
解决损坏文件系统的最常用方法?
对于 18.04 或更新版本...
terminal
按Ctrl+ Alt+打开一个窗口Tsudo fdisk -l
sudo fsck -f /dev/sdXX
,替换sdXX
为您之前找到的数字fsck
如果有错误,请重复该命令reboot
注意:或卸下实时 HDD/SSD 和
sudo fsck -f /dev/sdXX
在你
/etc/fstab
我推荐...改变:
至:
更新#1:
以“0 2”结尾的磁盘实际上有什么作用?
从
man fstab
...