使用 Clonezilla 恢復整個磁碟時如何恢復分割區表?

使用 Clonezilla 恢復整個磁碟時如何恢復分割區表?

在購買筆記型電腦後,我使用 CloneZilla 創建了整個磁碟的映像。磁碟映像是使用圖形版本的 CloneZilla 創建的,但在日誌檔案clonezilla-img 中,它表示可以使用以下命令來完成:

ocs-sr -q2 -c -j2 -z1p -i 2000 -p true savedisk 2013-11-05-21-img sda

文件列表:

total 25G
1.1K    blkdev.list
 13K    clonezilla-img
   4    disk
9.5K    Info-dmi.txt
 19K    Info-lshw.txt
2.5K    Info-lspci.txt
 169    Info-packages.txt
  80    Info-saved-by-cmd.txt
  30    parts
 26M    sda1.vfat-ptcl-img.gz.aa
303M    sda2.ntfs-ptcl-img.gz.aa
 92M    sda3.dd-img.aa
2.0G    sda4.ntfs-ptcl-img.gz.aa
2.0G    sda4.ntfs-ptcl-img.gz.ab
2.0G    sda4.ntfs-ptcl-img.gz.ac
2.0G    sda4.ntfs-ptcl-img.gz.ad
2.0G    sda4.ntfs-ptcl-img.gz.ae
2.0G    sda4.ntfs-ptcl-img.gz.af
1.7G    sda4.ntfs-ptcl-img.gz.ag
1.3M    sda5.ntfs-ptcl-img.gz.aa
2.0G    sda6.ntfs-ptcl-img.gz.aa
2.0G    sda6.ntfs-ptcl-img.gz.ab
2.0G    sda6.ntfs-ptcl-img.gz.ac
2.0G    sda6.ntfs-ptcl-img.gz.ad
2.0G    sda6.ntfs-ptcl-img.gz.ae
1.2G    sda6.ntfs-ptcl-img.gz.af
  37    sda-chs.sf
 17K    sda-gpt-1st
 16K    sda-gpt-2nd
 18K    sda-gpt.gdisk
 868    sda-gpt.sgdisk
 512    sda-mbr
 799    sda-pt.parted
 710    sda-pt.parted.compact
 250    sda-pt.sf

現在,我嘗試使用 CloneZilla Live 將整個內容還原到克隆的同一磁碟上。我使用了初學者模式,不知怎的,我讓它刪除了所有分割區,但沒有從映像中還原分割區表。我不確定我是否犯了一個錯誤,或者它是否真的無法處理這個問題,只是期望分區就位。

所以現在它把我扔進命令行,要求我恢復分區表,為恢復CloneZilla以恢復實際分區內容做準備。

No partition is found in this machine. To restore an image of 
partition, partition(s) must exist on the destination disk. 

Now enter another shell to allow you to create partition table on 
the destination disk. You may use fdisk, cfdisk, sfdisk or parted 
to do that. When everything is done, run "exit" to go back to the 
original program. 

我是否需要手動執行此操作,或者我可以讓這些分割區工具之一從映像中讀取所需的分割表嗎?

答案1

sfdisk /dev/sda < /mnt/.../sda-pt.sfsgdisk -l /mnt/.../sda-gpt-1st將完成這項工作

但請記住,如果恢復到更大的驅動器,則必須手動呼叫gdisk才能使用完整的磁碟空間(或可能編輯 .sf 檔案last-lba值並再次復原...)。

以下交互序列對我有用:

gdisk > x (extra functionality) > e (relocate data backup structures to the end of the disk)

相關內容