LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ubuntu formatted accidentally in windows (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-formatted-accidentally-in-windows-4175544636/)

ekavee 06-05-2015 09:01 PM

ubuntu formatted accidentally in windows
 
i accidentally formatted my ubuntu partition in win 8. when i restarted the system, I am getting the grub > command line. I tried the ls command, and it listed the following:

hd0
hd1
hd2

hd2 gpt7
...
hd2 gpt1.
i dont need ubuntu now. but i am unable to login to windows. please help

goumba 06-10-2015 11:02 PM

Do you have a Windows 8 CD? If you no longer want GNU/Linux, boot from the Windows 8 CD and select Fix Boot Problems (or whatever they're calling it in Win 8).

http://windows.microsoft.com/en-us/w...tartup-problem

Jjex22 06-11-2015 12:41 AM

If you don't have a windows 8 disk or a recovery drive, in my experience PC makers these days will charge you the cost of an OEM licence to get your hands on 'installation media' for a licence you already bought, because they never gave you an install CD to start with. It's all a big con. First time it happened to me with Acer when I changed a HDD I decided to pay the extra and buy a licence from MS rather than give Acer a penny for their money grabbing tactics.

Anyhoo if like many windows 8 users your manufacturers didn't give you an install media, or even a licence key on your laptop, you can just reinstall ubuntu. or any linux distro. By the sound of it your windows installation is intact, so just reinstall linux. This will repair grub (at the moment you have an entry on your HDD that points to a partition you deleted).

If, as I suspect you were trying to remove ubuntu, and just want Windows on your machine, you can use any ubuntu live CD to do it. Don't install it, just click 'Try'. Once at the desktop, open a terminal and type:
Code:

sudo add-apt-repository ppa:yannubuntu/boot-repair
then:
Code:

sudo apt-get update
then:
Code:

sudo apt-get install boot-repair
Once installed, start boot-repair and it will scan your system. Because you only have one installed system and a broken boot process the recommended action will repair the system.

Once that is done, open gparted and delete any partitions you forgot about - swap, extended, ext4 BUT DO NOT DELETE ANY NTFS PARTITONS (They are green). this will give you free space you can expand into in windows. Do not try and expand the windows partition here, just remove any remaining linux partitions and click on apply (the green 'tick')

Then restart, that's it!

JJ

EDDY1 06-11-2015 01:39 AM

YOu should have a recovery partition to restore back to factory specs, if not windows 8 is available to download & you can just use your original product key.


All times are GMT -5. The time now is 12:04 AM.