应用 NTFS 文件系统而不格式化

应用 NTFS 文件系统而不格式化

我删除了驱动器上的文件系统(三年前)。磁盘未格式化,因为我想恢复我的文件并且我没有 Windows/Linux 操作系统。

在此输入图像描述

是否可以不格式化就应用NTFS文件系统?

注 0:

[joseluisbz@centos ~]$ sudo mount -t ntfs /dev/sda2 /run/media/joseluisbz/recover
mount: /run/media/joseluisbz/recover: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error.
[joseluisbz@centos ~]$

这不起作用。

注 1:

[joseluisbz@centos ~]$ sudo fdisk /dev/sda

Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): t
Partition number (1-3, default 3): 2
Hex code (type L to list all codes): 7

Changed type of partition 'HPFS/NTFS/exFAT' to 'HPFS/NTFS/exFAT'.

Command (m for help): w
The partition table has been altered.
Syncing disks.

[joseluisbz@centos ~]$

不幸的是,重新加载GParted我得到相同的结果。

笔记2:

[joseluisbz@centos ~]$ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************


Command (? for help): ?
b   back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): l
0700 Microsoft basic data  0c01 Microsoft reserved    2700 Windows RE          
3000 ONIE boot             3001 ONIE config           3900 Plan 9              
4100 PowerPC PReP boot     4200 Windows LDM data      4201 Windows LDM metadata
4202 Windows Storage Spac  7501 IBM GPFS              7f00 ChromeOS kernel     
7f01 ChromeOS root         7f02 ChromeOS reserved     8200 Linux swap          
8300 Linux filesystem      8301 Linux reserved        8302 Linux /home         
8303 Linux x86 root (/)    8304 Linux x86-64 root (/  8305 Linux ARM64 root (/)
8306 Linux /srv            8307 Linux ARM32 root (/)  8400 Intel Rapid Start   
8e00 Linux LVM             a000 Android bootloader    a001 Android bootloader 2
a002 Android boot          a003 Android recovery      a004 Android misc        
a005 Android metadata      a006 Android system        a007 Android cache       
a008 Android data          a009 Android persistent    a00a Android factory     
a00b Android fastboot/ter  a00c Android OEM           a500 FreeBSD disklabel   
a501 FreeBSD boot          a502 FreeBSD swap          a503 FreeBSD UFS         
a504 FreeBSD ZFS           a505 FreeBSD Vinum/RAID    a580 Midnight BSD data   
a581 Midnight BSD boot     a582 Midnight BSD swap     a583 Midnight BSD UFS    
a584 Midnight BSD ZFS      a585 Midnight BSD Vinum    a600 OpenBSD disklabel   
a800 Apple UFS             a901 NetBSD swap           a902 NetBSD FFS          
a903 NetBSD LFS            a904 NetBSD concatenated   a905 NetBSD encrypted    
a906 NetBSD RAID           ab00 Recovery HD           af00 Apple HFS/HFS+      
af01 Apple RAID            af02 Apple RAID offline    af03 Apple label         
Press the <Enter> key to see more codes: 
af04 AppleTV recovery      af05 Apple Core Storage    af06 Apple SoftRAID Statu
af07 Apple SoftRAID Scrat  af08 Apple SoftRAID Volum  af09 Apple SoftRAID Cache
b300 QNX6 Power-Safe       bc00 Acronis Secure Zone   be00 Solaris boot        
bf00 Solaris root          bf01 Solaris /usr & Mac Z  bf02 Solaris swap        
bf03 Solaris backup        bf04 Solaris /var          bf05 Solaris /home       
bf06 Solaris alternate se  bf07 Solaris Reserved 1    bf08 Solaris Reserved 2  
bf09 Solaris Reserved 3    bf0a Solaris Reserved 4    bf0b Solaris Reserved 5  
c001 HP-UX data            c002 HP-UX service         e100 ONIE boot           
e101 ONIE config           ea00 Freedesktop $BOOT     eb00 Haiku BFS           
ed00 Sony system partitio  ed01 Lenovo system partit  ef00 EFI System          
ef01 MBR partition scheme  ef02 BIOS boot partition   f800 Ceph OSD            
f801 Ceph dm-crypt OSD     f802 Ceph journal          f803 Ceph dm-crypt journa
f804 Ceph disk in creatio  f805 Ceph dm-crypt disk i  fb00 VMWare VMFS         
fb01 VMWare reserved       fc00 VMWare kcore crash p  fd00 Linux RAID          

Command (? for help): i
Partition number (1-3): 2
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 77E7B551-0B8E-463A-BCA2-71B6B555A241
First sector: 141787136 (at 67.6 GiB)
Last sector: 223705087 (at 106.7 GiB)
Partition size: 81917952 sectors (39.1 GiB)
Attribute flags: 0000000000000000
Partition name: 'Microsoft basic data'

Command (? for help): 

我下一步需要做什么?

答案1

是的,您可以使用fdiskgdisk任何其他控制台实用程序,它允许更改分区类型或创建分区而无需实际格式化它。

例如对于 fdisk 它将是:

sudo fdisk /dev/sda
t (change type)
2 (select the second)
7 (NTFS)
w (write and exit)

答案2

尝试

 mount -r -t ntfs /dev/sda2 /mnt

这应该以只读 ( -r) 模式挂载分区。

这假设没有对分区进行任何操作。

您可能需要执行 fsck,即dosfsck首先使用 -n 选项。

相关内容