# HELP! bsdlabel undo?



## larrypatrickmaloney (Apr 10, 2009)

Well I think I made a big mistake.

I was creating a second partition on my single drive, to do a dual boot FreeBSD / Windows XP install.  The XP partition is (was) in place.

I didn't make a back up. 

I ran bsdlabel and typed in the XP parition instad of the FreeBSD partition.

Is it possible to undo the bsdlabel command, after it has written to the drive?

Can I re-run bsdlabel and set the partition back to NTFS?

Is there a DOS/Windows utility that can repair this mistake?

I have NOT run fdisk and I have NOT run newfs on this partition.

Can I salvage the partition?  Can I restore the partition to before bsdlabel without a backup?

I know, I should have made  a backup (go on tell me, so you can get it out of your system. 

Larry


----------



## MG (Apr 10, 2009)

I don't think FreeBSD can rewrite Windows bootcode.
Maybe you can boot the XP install cd into repair shell and try fixmbr or fixboot. It worked for me a long time ago.


----------



## larrypatrickmaloney (Apr 10, 2009)

*Thank you MG, but....*

Thank you very much for such a quick reply.

I am planning on trying that, I haven't done it YET, but does bsdlabel does more than just install boot code.

I did bsdlabel -w ad0s1 auto

(I used the "auto" layout)

ad0s1 = XP parition.

Larry


----------



## pablo (Apr 11, 2009)

Try to use /usr/ports/sysutils/testdisk, installed with NTFSPROGS option.


----------

