I recently overwrote a BSD volume label by mistake and I cannot access the partitions contained in a slice any more- So I am looking for a tool for recovering the partitions.
Background. The disk has one slice with four partitions (ada0s1a, ada0s1b, ada0s1d, ada0s1e) in it.
FreeBSD was installed on partition a, b was free, d is a swap partition and e is a UFS mounted under /home.
I installed the latest FreeBSD version on partition b and it worked OK. I still had the problem that the boot loader booted only the old installation from a. In order to boot the installation from b I had to interrupt stage2 of the bootloader and enter the partition manually. To solve this problem, I have installed stage 0 on the slice (in my, probably wrong, understanding, this should have given me a choice to boot from either of the two partition in the slice using F1, F2):
boot0cfg -B /dev/ada0s1
This did not solve the boot problem. Additionally, now the partitions in slice s1 do not show up anymore. gpart show does not display them either.
So, I guess I have corrupted the partition table inside the slice. Is there any tool that can repair this? I guess that, by scanning the slice, it is possible to find where each partition (three UFS filesystems and a swap partition) start and end. Does such a tool exist?
Background. The disk has one slice with four partitions (ada0s1a, ada0s1b, ada0s1d, ada0s1e) in it.
FreeBSD was installed on partition a, b was free, d is a swap partition and e is a UFS mounted under /home.
I installed the latest FreeBSD version on partition b and it worked OK. I still had the problem that the boot loader booted only the old installation from a. In order to boot the installation from b I had to interrupt stage2 of the bootloader and enter the partition manually. To solve this problem, I have installed stage 0 on the slice (in my, probably wrong, understanding, this should have given me a choice to boot from either of the two partition in the slice using F1, F2):
boot0cfg -B /dev/ada0s1
This did not solve the boot problem. Additionally, now the partitions in slice s1 do not show up anymore. gpart show does not display them either.
So, I guess I have corrupted the partition table inside the slice. Is there any tool that can repair this? I guess that, by scanning the slice, it is possible to find where each partition (three UFS filesystems and a swap partition) start and end. Does such a tool exist?