首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何修复重叠的FreeBSD/UFS分区?

如何修复重叠的FreeBSD/UFS分区?
EN

Unix & Linux用户
提问于 2015-07-09 22:07:54
回答 1查看 539关注 0票数 4

我有一个希捷1TB驱动器ST1000LM010-9YH146,它有一个FreeBSD片,格式化为UFS,并安装在/home上的pfsense盒上。

在更换一些硬件时,驱动器无意中插入了FreeAgent GoFlex电缆(其中有固件),并插入了Win 7笔记本电脑。当我去安装一个新的pfsense框时,它不会挂载,并且一个NTFS分区与UFS分区重叠。而且,它从来没有被用作引导驱动器,只是/home的临时位置,而我移动了一些文件。

在这个驱动器上有一些不可替代的东西,我希望能够挂载它来恢复文件。我知道足够的分区,安装和卸载,但不要相信我自己去螺丝的几何没有指导。

在testdisk日志中:

代码语言:javascript
复制
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 <grenier@cgsecurity.org>
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格式化的FreeBSD分区,而不是UFS分区。

EN

回答 1

Unix & Linux用户

发布于 2016-10-18 08:16:21

在UFS2分区上,扇区2应该包含部分/片列表

代码语言:javascript
复制
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条目。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/214980

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档