调整/扩展 Ubuntu 分区,Gparted 错误修复‘NTFS’和丢失文件位于

调整/扩展 Ubuntu 分区,Gparted 错误修复‘NTFS’和丢失文件位于

更新:

  • 扩展 Ubuntu 或 Ubuntu 分区调整大小问题已解决(请参阅第一个答案中的说明)

  • 从 Gparted 错误中恢复损坏的文件失败,但错误和 chkdsk /f 修复后 NTFS 分区看起来完好无损。

我使用 Gparted 来调整大小,但最终使用 chkdsk /f 命令通过 Windows 修复了错误,但文件损坏了:

希望这些信息能帮助大家了解 chkdsk 修复后哪些文件被损坏,尤其是当您有一个包含大量文件的大分区时。

搜索后,我现在可以使用以下方法指定损坏的文件及其扇区和簇六、winhex通过窗户:

  1. 提取并以管理员身份打开它。
  2. 单击工具栏上的打开磁盘并选择有问题的逻辑卷分区。
  3. 从导航菜单:查找文件记录并输入来自 chkdsk 修复信息的文件编号(在我的情况下:文件 34235‘参见下面的 chkdsk 信息’)。
  4. 您应该在右侧窗格中找到文件位置及其簇和扇区。
  5. 找到该位置后,我发现该文件大小为零。

感谢上帝,就我而言,损坏的文件是许多千兆的电影文件...根据以下信息,还有其他损坏的文件吗?有没有办法恢复或修复它?

我如何向 ubuntu 根分区(ext4)添加空间,因为我正在双启动 Ubuntu 和 Windows,并且我的 Ubuntu 分区的存储空间不足,并尝试从实时安装媒体使用 Gparted(尝试从 usb 使用 ubuntu)在 ubuntu 分区之前添加未分配的空间,但是当我尝试调整 ubuntu 分区大小时总是看到要添加零?!!

在使用 chkdsk 和上述步骤之前来自 gparted 的错误:...

check file system on /dev/sda3 for errors and (if possible) fix them  00:00:02    ( ERROR ) 
    
ntfsresize -i -f -v /dev/sda3  00:00:02    ( ERROR ) 
    
ntfsresize v2015.3.14AR.1 (libntfs-3g)
Device name : /dev/sda3
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 720586666496 bytes (720587 MB)
Current device size: 720586670080 bytes (720587 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
ERROR(5): ntfs_decompress_mapping_pairs: Input/output error
NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
and will be made to NTFS by this software until it gets repaired.

分区缩小并出现错误和未分配空间,因此我决定运行

chkdsk /f 

从 Windows CMD,它给了我这个输出:

    Chkdsk was executed in read/write mode.  

Checking file system on E:
Volume label is Storage.

Stage 1: Examining basic file system structure ...
The highest VCN 0xc004b of attribute of type 0x80 and instance
tag 0x0 is incorrect.  The expected value is 0xf38ed.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87AC.
Deleted corrupt attribute list entry
with type code 128 in file 34235.
Unable to locate attribute of type 0x80, lowest vcn 0x4c752,
instance tag 0x0 in file 0x87ac.
The attribute of type 0x80 and instance tag 0x0 in file 0x85bb
has allocated length of 0xc004b000 instead of 0x4c752000.
Deleted corrupt attribute list entry
with type code 128 in file 34235.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000085bc.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x85BC.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000085bd.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x85BD.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000085be.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x85BE.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x7000000008790.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x8790.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x2000000008791.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x8791.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x12000000008794.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x8794.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x2000000008795.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x8795.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x2000000008796.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x8796.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x2000000008797.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x8797.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x2000000008798.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x8798.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x2000000008799.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x8799.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x200000000879a.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x879A.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x200000000879b.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x879B.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x200000000879c.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x879C.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x200000000879d.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x879D.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x200000000879e.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x879E.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x200000000879f.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x879F.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a0.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A0.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a1.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A1.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a2.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A2.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a3.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A3.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a4.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A4.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a5.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A5.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a6.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A6.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a7.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A7.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a8.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A8.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087a9.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87A9.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087aa.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87AA.
Unable to locate attribute with instance tag 0x0 and segment
reference 0x20000000087ab.  The expected attribute type is 0x80.
Deleting corrupt attribute record (0x80, "")
from file record segment 0x87AB.

  271872 file records processed.                                                         File verification completed.

  1215 large file records processed.                                                                                                                           
  0 bad file records processed.                                      
Stage 2: Examining file name linkage ...

  293964 index entries processed.                                                        Index verification completed.

Stage 3: Examining security descriptors ...
Cleaning up 133 unused index entries from index $SII of file 0x9.
Cleaning up 133 unused index entries from index $SDH of file 0x9.
Cleaning up 133 unused security descriptors.
Security descriptor verification completed.
Inserting data attribute into file 34235.

  11048 data files processed.                                            CHKDSK is verifying Usn Journal...
Usn Journal verification completed.
CHKDSK discovered free space marked as allocated in the
master file table (MFT) bitmap.
CHKDSK discovered free space marked as allocated in the volume bitmap.

Windows has made corrections to the file system.
No further action is required.

 703697916 KB total disk space.
 700163512 KB in 65279 files.
     24676 KB in 11048 indexes.
    359436 KB in use by the system.
     65536 KB occupied by the log file.
   3150292 KB available on disk.

      4096 bytes in each allocation unit.
 175924479 total allocation units on disk.
    787573 allocation units available on disk.

之后,分区被修复,并且之前无法使用可用空间运行(这意味着某些文件通过 chkdsk 修复被删除)和未分配空间,因此我运行

 chkdsk /r 

检查坏扇区,感谢上帝没有发现坏扇区。我指定了如上所述的损坏文件。希望这些信息能帮助其他人,开发社区能帮助我:)。

答案1

最后,问题是缺乏观察:

  1. 首先要调整 ubuntu 系统分区的大小:您必须从 live usb 或从安装 ubuntu 的媒体执行此操作,方法是选择尝试 ubuntu 而不是安装它。将使用 Gparted... 仅此而已。(您也可以尝试使用 gparted live CD)。
  2. 规则是从相邻的未分配空间调整大小,因此打开 Gparted 并查看 ubuntu 分区的位置(HDD 的开头、中间或结尾)如果分区位于中间,那么您有两个未分配空间的选择:

    -从末尾调整前面的分区大小(花费更短的时间)

    -从头开始调整分区大小(需要更长的时间)

    *开始调整大小时不要取消,让它完成,即使花费几个小时,您也可以不时查看进度。

  3. 现在您应该拥有与其相邻的未分配空间。
  4. 如果扩展分区之外的未分配空间包含 ubuntu 分区,那么您必须先调整扩展分区的大小,使其位于 ubuntu 内部

    -查看此图片并注意右上角的颜色(黄色代表数据 - 白色代表可用空间 - 灰色代表未分配,青色(扩展分区)包含深蓝色(我们要扩展的 ubuntu 分区)这里

    -在这种情况下,青色(扩展分区)应该包含灰色(未分配空间)和蓝色深色(Ubuntu 分区),因此我们首先调整扩展分区的大小,然后我们最终可以调整蓝色深色(Ubuntu 分区)的大小这里

    *如果有警告(移动分区可能会导致您的操作系统无法启动),请继续并单击“确定”,然后您应该完成所有操作

笔记:

  • 如果你同时启动 Windows 和 Linux,并且在 NTFS 分区调整大小过程中出现错误,你可以尝试在 Windows 中使用 chkdsk /f 来修复它(也许你会丢失一些文件,就像我上面发生的情况一样)
  • 另外,在正常情况下,建议您使用 chkdsk /f 来检查在调整大小操作中使用的 NTFS 分区。
  • 如果 ubuntu 分区和未分配空间之间有交换空间,请尝试将其关闭(关闭交换)并重新分配,然后重新打开。

感谢上帝,完成了。

相关内容