Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-05-2015, 09:01 PM   #1
LQ Newbie
Registered: Jun 2015
Posts: 1

Rep: Reputation: Disabled
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:


hd2 gpt7
hd2 gpt1.
i dont need ubuntu now. but i am unable to login to windows. please help
Old 06-10-2015, 11:02 PM   #2
Senior Member
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Debian, Arch
Posts: 1,163
Blog Entries: 7

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
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).

Last edited by goumba; 06-10-2015 at 11:03 PM. Reason: Added link to KB.
Old 06-11-2015, 12:41 AM   #3
LQ Newbie
Registered: Jun 2015
Distribution: Ubuntu, RHEL, SLE, #!++
Posts: 16

Rep: Reputation: Disabled
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:
 sudo add-apt-repository ppa:yannubuntu/boot-repair
 sudo apt-get update
 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!

Old 06-11-2015, 01:39 AM   #4
LQ Addict
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accidentally formatted a NTFS partition with ext3 kamran_pro Linux - Software 1 10-29-2006 02:31 AM
Flashdisk -- accidentally formatted to ext2 ... BinJajer Linux - Hardware 1 01-26-2006 03:47 PM
accidentally formatted drive jb1390 Linux - Hardware 8 12-31-2005 01:47 PM
URGENT HELP NEEDED, Formatted my harddisk Accidentally xenev Linux - Software 6 06-08-2005 09:36 AM
Accidentally formatted wrong partition DigitalTygrrr Linux - Newbie 9 04-25-2003 02:07 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration