I was trying to install ubuntu manually from my external hard drive(which has ubuntu installed in it) to my internal hard drive.I created the swap area using mkswap
command in a wrong partition(my windows partition). The partition is not formatted but converted into a swap area.Because of this I cannot boot into my windows.Is there any way that restore the partition back to its normal state?
I found this while doing some research.But I guess that works only when the drive is formatted and when one has to recover the lost data.
Thank you.
Asked
Active
Viewed 3,426 times
3
1 Answers
2
Could you please tell which Windows partition has been selected as swap area?
I think there generally are two partitions made default by Windows 7 in most cases, one of which is bootloader. Did you select that one or the C drive one as your swap area? Did you delete the old bootloader parition?
In any case, when you boot into Ubuntu next time, see that you off the swap first (How to do that is there in the question you linked). Otherwise it will start writing data, which I don't think would turn out good.
If you just selected C drive, I think swapoff and update-grub should reset your Windows system.
sudo swapoff -a
sudo update-grub
For more details on how to turn off swap, look here: Deleting Unused Swaps Partions

Bharadwaj Srigiriraju
- 2,158
I hope you must have turned off the swap by now. Just make the backup of that partition and restore them like it was suggested in the question you linked. I don't think there's some other way to turn off swap and revert to old state.
– Bharadwaj Srigiriraju Sep 16 '12 at 19:48grub-mkconfig
withos-prober
it wouldn't detect windows. I thought I had messed everything up and had to start over (and re-install windows too). This answer saved me. Thanks a lot. – MiniGod Feb 27 '18 at 10:04