重複するFreeBSD / UFSパーティションを変更する方法は?

重複するFreeBSD / UFSパーティションを変更する方法は?

FreeBSDスライスがあり、UFSでフォーマットされ、pfsenseボックスの/ homeにマウントされたSeagate 1TBハードドライブ[ST1000LM010-9YH146]があります。

一部のハードウェアの交換中に、誤ってWin 7ノートブックに接続されたFreeAgent GoFlexケーブル(ファームウェアを含む)がドライブに付属していました。新しいpfsenseボックスを設定しようとしたときにマウントが失敗し、NTFSパーティションがUFSパーティションと重複しています。また、ブートドライブとして使用されたことはなく、一部のファイルの移動中に/ homeの一時的な場所としてのみ使用されました。

そのドライブには置き換えられないものがあり、それをマウントしてファイルを回復できるようにしたいです。私はパーティショニング、マウント、削除について十分に知っていますが、ガイドなしでジオメトリを調整することは信頼できません。

テストディスクログから:

Disk /dev/ad6 - 1000 GB / 931 GiB - CHS 1938021 16 63
Analyse cylinder 1938021/1938020: 100%
Read error at 1938020/1/1 (lba=1953524223)

  No partition             0   0 35 1938020  15 29 1953525100 [/seagate-1tb]
Warning: Incorrect number of heads/cylinder 255 (NTFS) != 16 (HD)
  HPFS - NTFS              0   1  1 1938015  15 63 1953520065 [FreeAgent GoFlex Drive]

Disk /dev/ad6 - 1000 GB / 931 GiB - CHS 1938021 16 63

Warning: the current number of heads per cylinder is 16 but the correct value may be 128.
You can use the Geometry menu to change this value.
It's something to try if
- some partitions are not found by TestDisk
- or the partition table can not be written because partitions overlaps.


Disk /dev/ad6 - 1000 GB / 931 GiB - CHS 1938021 16 63
Analyse cylinder 1938021/1938020: 100%
Read error at 1938020/15/63 (lba=1953525167)

  Solaris /home                 34 1953525133 1953525100 [/seagate-1tb]



Disk /dev/ad6 - 1000 GB / 931 GiB - CHS 1938021 16 63
Analyse cylinder  1747/1938020: 00%


Warning: Incorrect number of heads/cylinder 255 (NTFS) != 16 (HD)
Warning: Incorrect number of heads/cylinder 255 (NTFS) != 16 (HD)
  MS Data                       63 1953520127 1953520065 [FreeAgent GoFlex Drive
  Solaris /home                 66 1953525165 1953525100
  Solaris /home                146 1953525245 1953525100 [/seagate-1tb]
  Solaris /home                178 1953525277 1953525100
  Solaris /home             376290 1953901389 1953525100
  Solaris /home             376402 1953901501 1953525100
  Solaris /home             752514 1954277613 1953525100
  Solaris /home             752626 1954277725 1953525100
  Solaris /home            1128738 1954653837 1953525100
  Solaris /home            1128850 1954653949 1953525100
  Solaris /home            1504962 1955030061 1953525100
  Solaris /home            1505074 1955030173 1953525100
  Stop
TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org

Disk /dev/ad6 - 1000 GB / 931 GiB - CHS 1938021 16 63

The harddisk (1000 GB / 931 GiB) seems too small! (< 1000 GB / 932 GiB)
Check the harddisk size: HD jumpers settings, BIOS detection...

The following partitions can't be recovered:
     Partition               Start        End    Size in sectors
>  Solaris /home                146 1953525245 1953525100 [/seagate-1tb]
   Solaris /home                178 1953525277 1953525100
   Solaris /home             376290 1953901389 1953525100
   Solaris /home             376402 1953901501 1953525100
   Solaris /home             752514 1954277613 1953525100
   Solaris /home             752626 1954277725 1953525100
   Solaris /home            1128738 1954653837 1953525100
   Solaris /home            1128850 1954653949 1953525100
   Solaris /home            1504962 1955030061 1953525100
   Solaris /home            1505074 1955030173 1953525100

[ Continue ]
UFS2, 1000 GB / 931 GiB

現在、testdiskを再実行できません。 pfsenseのアップグレードによって一部のライブラリが変更されましたが、まもなく修正できるようになります。

よろしくお願いします!どんな助けでも本当に感謝します!

編集:明確に言うと、UFSパーティションではなくUFSでフォーマットされたFreeBSDパーティションです。

ベストアンサー1

UFS2パーティションでは、セクター2にセクション/スライスのリストを含める必要があります。

sector 1 is boot record 0x200 bytes

sector 2 (count bytes started from beginning of partition):

0x200: header/name usually "WEV" upto "amnesiac"
..
0x290: slice a (root)
       0x294: slice size (in sector)
       0x298: start/offset (in sector)
0x2a0: slice b (swap)
0x2b0: slice c (alldisk)
       0x2b4: sum of all slices size (whole partition)
       0x298: 0
0x2c0 - 0x3f0: slice d - w

あなたの場合、スライスcをパーティションサイズ(1953525100セクタ?)で編集し、同じ値で0x294-0x29bもスライスする必要があります。

NTFSのMBRエントリを消去し、ID 0x5Aを使用して残りのUFSエントリを回復します。

おすすめ記事