如何存取我的視窗文件?

如何存取我的視窗文件?

我最近用 Ubuntu 替換了 Windows,並且我的光碟中有任何檔案。當我有Windows時。我怎麼能訪問$ sudo fdisk -l我來恢復我的光碟?

答案1

您只需確定它位於哪個分割區並將其安裝在您選擇的位置即可。

我們可以parted像這樣來識別分區:

mgodby@mgodby-UDesk1:~$ sudo parted -l
Model: ATA ST1000LM014-1EJ1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  1050MB  1049MB  ntfs            Basic data partition          hidden, diag
 2      1050MB  1322MB  273MB   fat32           EFI system partition          boot, hidden
 3      1322MB  2371MB  1049MB  fat32           Basic data partition          hidden
 4      2371MB  2505MB  134MB                   Microsoft reserved partition  msftres
 5      2505MB  503GB   500GB   ntfs            Basic data partition          msftdata
 6      503GB   653GB   150GB   ext4                                          msftdata
 8      653GB   936GB   283GB   ext4                                          msftdata
 7      936GB   952GB   16.4GB  linux-swap(v1)
 9      952GB   979GB   26.8GB  ntfs            Basic data partition          msftdata
10      979GB   1000GB  21.5GB  ntfs            Basic data partition          hidden, diag


Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label                                  

mgodby@mgodby-UDesk1:~$

從終端上的輸出我們可以很好地猜測最大的 ntfs 分割區(此處顯示為磁碟機 /dev/sda 上的分割區 5)是我的主 Windows 分割區。現在我們只需要把它安裝到某個地方就可以了。為了簡單起見,我將在我的主目錄中建立一個目錄。

  1. 建立掛載點(理論上可以在任何地方,但最好選擇/mnt 、 /media 或/home/$USER/ 下的某個位置。在我的範例中,我將建立一個名為/home/mgodby /windrive 的目錄將其安裝到ls -ll

    mgodby@mgodby-UDesk1:~$ mkdir -v /home/mgodby/windrive
    mkdir: created directory ‘/home/mgodby/windrive’
    mgodby@mgodby-UDesk1:~$ ls -ll /home/mgodby | grep windrive
    drwxrwxr-x  2 mgodby mgodby    4096 Oct  8 12:11 windrive
    mgodby@mgodby-UDesk1:~$ 
    
  2. 現在我們只需將 Windows 分割區掛載到新目錄中並驗證一切是否都在那裡。

    mgodby@mgodby-UDesk1:~$ sudo mount.ntfs -v /dev/sda5 /home/mgodby/windrive
    mgodby@mgodby-UDesk1:~$ ls -ll /home/mgodby/windrive
    total 19446553
    drwxrwxrwx 1 root root        4096 Nov 14  2013 avast! sandbox
    drwxrwxrwx 1 root root        8192 Oct 11  2012 Boot
    -rwxrwxrwx 1 root root      398156 Jul 25  2012 bootmgr
    -rwxrwxrwx 1 root root           1 Jun 18  2013 BOOTNXT
    -rwxrwxrwx 1 root root        8192 Oct  9  2012 BOOTSECT.BAK
    -rwxrwxrwx 2 root root        4743 Nov 29  2013 comcastrelease.log
    -rwxrwxrwx 1 root root           2 Apr  7  2014 END
    -rwxrwxrwx 1 root root  6759346176 Oct  7 23:37 hiberfil.sys
    -rwxrwxrwx 1 root root 12884901888 Oct  7 23:37 pagefile.sys
    drwxrwxrwx 1 root root           0 Aug 22  2013 PerfLogs
    drwxrwxrwx 1 root root       20480 Oct  7 23:51 ProgramData
    drwxrwxrwx 1 root root       20480 Oct  7 23:51 Program Files
    drwxrwxrwx 1 root root       28672 Oct  7 23:51 Program Files (x86)
    drwxrwxrwx 1 root root        4096 Feb  3  2013 PSFONTS
    drwxrwxrwx 1 root root        4096 Jan 27  2013 Python33
    drwxrwxrwx 1 root root           0 Dec 18  2013 Recovery
    drwxrwxrwx 1 root root           0 Jan 19  2014 $Recycle.Bin
    drwxrwxrwx 1 root root        4096 Dec  8  2012 Remote Programs
    -rwxrwxrwx 1 root root   268435456 Oct  7 23:38 swapfile.sys
    drwxrwxrwx 1 root root        4096 Sep 21 23:22 System Volume Information
    drwxrwxrwx 1 root root           0 May  5 15:54 temp
    drwxrwxrwx 1 root root           0 Dec  8  2012 UserGuidePDF
    drwxrwxrwx 1 root root        4096 Dec 18  2013 Users
    drwxrwxrwx 1 root root       28672 Sep 26 17:45 Windows
    mgodby@mgodby-UDesk1:~$ 
    

現在只需開啟該目錄並瀏覽整個 Windows 分割區,就像瀏覽任何其他目錄一樣。

編輯:此過程也可以與磁碟機上的任何其他分割區一起使用。請務必mount根據分割區類型(例如mount.fatfat32 或mount.ntfsntfs)使用正確的命令。

相關內容