Oh, and I also did re-install grub as a last step. Now remains the
task of getting back the Windows OS. :-)

-Amarendra

On Fri, Jun 22, 2012 at 10:26 AM, Amarendra Godbole
<amarendra.godb...@gmail.com> wrote:
> Hi All,
>
> I am very pleased with the turn of events after I baked the disklabel
> on my OBSD partition. A toast to all the hard work put in by OBSD
> development team, and an offer for a free lunch/dinner/beer if you
> happen to be in this part of India (Pune, closer to Mumbai/Bombay).
> scan_ffs found all partitions, and I was successfully able to restore
> everything. So this is what happened:
>
> I was experimenting with boot loaders and finally settled on GRUB as
> it allowed me to boot both Win XP and OBSD on my IBM ThinkPad X201. I
> was booted into WinXP and was using "whole disk encryption" software.
> Apparently, this encryption software marked the OBSD partition to be
> encrypted as well (since it was visible through the Windows Volume
> Manager as valid partition). Sure, it did not bother to check if
> Windows filesystems were active, etc. To get out of that situation, I
> deleted this partition from Windows, and GRUB conked with "Error 22"
> (okay, should have thought that earlier -- but dumb moments happen).
> Fortunately, all my data was backed up. I then booted into OBSD via
> the boot CD, and cleared the partition table as well (second dumbest
> moment). *poof* went away both operating systems.
>
> Now I had a laptop with clean partition table, but both OS'es intact.
> I wasn't worried to much since data was backed up, but was wary of
> setting up OBSD again (including mail, etc.). So...
>
> (1) I booted a live CD - MarBSD 5.1
> (2) Ran scan_ffs on the drive as "scan_ffs -l sd0". It found almost
> all partitions, but was confused between /var and swap (so /var
> appeared twice!). I mounted both, and found which one was /var
> (interestingly, the other partition had exactly same content as /var,
> except for one sasl2 directory, and difference in size).
> (3) Redirected the output to a file, to be used in setting up the
disklabel.
> (4) Ran "disklabel -e sd0", and added the output from scan_ffs, with
> best guesses for partition names. [read scan_ffs and disklabel
> manpages before this].
> (5) Rebooted and checked if things were fine -- /bsd booted fine,
>     - However, later while mounting filesystems it stopped with
> messages to the tune of "cannot mount sd0k and sd0j, etc.)
>     - These were not a part of the disklabel interestingly(!)
> (6) Rebooted via OBSD 5.1 into single user mode "bsd -s"
> (7) Mounted / manually, and fixed /etc/fstab with correct partition names.
> (8) Reboot, and success! Everything was "as-is".
>
> The output of scan_ffs can be seen in this image:
>
http://lh3.googleusercontent.com/-ln-xNFxx6WM/T-P6e4wgEMI/AAAAAAAAApA/zygztOh
6uR8/s720/scan_ffs.jpg
>
> Thanks OBSD team again. Appreciate all your efforts, and the terrific
> OS. Many lessons learnt as well! :-)
>
> -Amarendra

Reply via email to