LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-19-2009, 12:02 PM   #1
stevebelden
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Rep: Reputation: 0
How to remove Linux Partition in Vista? and broken Grub? Ouch!


Well, there you go. I shouldn't have done what I did, but I did, and now I need help recovering from it. Hope y'all can help.

I've got a Compaq Presario Laptop. 150 gig HDD. I wanted to try Linux out again, so partitioned off 28 gigs and installed Ubuntu. Worked great, except that never could get the wifi working. All was happyhappyjoyjoy until recently when I loaded a lot of material onto the Vista partition and was running out of room. So, thought I'd get rid of the Linux partition for now and give that space back to the Vista side. Apparently, I did it badly and am now deeply regretful.

I turned the Linux partition into "free space" using the Vista Manager. Then found that I couldn't put that "free space" back into the Vista partition - well, *I* couldn't figure it out. Put the computer to sleep for the night, figuring I'd try again in the morning. Which, when I booted it up this morning, I get a Grub Error 17 that I can't seemt to get past. So, I can't load anything. Obviously, I'm not as smart as I thought I was. Grrr...

So. How can I fix these problems? I want to get the "free space" back into the Vista partition and get rid of the Grub loader. For now. I'm planning on getting a dedicated Linux laptop later

Thanks in Advance very much for any assistance.

-Steve
 
Old 06-19-2009, 12:13 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
The first issue is you need to put back the Windows MBR code.

If you have a Windows install CD, there is a program on it for repairing the MBR (but I forget the name of that program and how you get to it).

If you don't have a Windows install CD, the task will be quite a bit harder.

I thought Windows Vista could resize its own partition (take free space after it back into the partition). If not, you could boot a Linux liveCD and use gparted to grow the ntfs partition. That works fine with Windows XP. I'm a little less confident about doing that with Vista, but I think it works.
 
Old 06-19-2009, 09:52 PM   #3
stevebelden
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by johnsfine View Post
If you don't have a Windows install CD, the task will be quite a bit harder.

I thought Windows Vista could resize its own partition (take free space after it back into the partition). If not, you could boot a Linux liveCD and use gparted to grow the ntfs partition. That works fine with Windows XP. I'm a little less confident about doing that with Vista, but I think it works.
I'm far less than confident about it - and no, of course I don't have the CD (grrr...). Are there any other ways around this? TIA
 
Old 06-19-2009, 11:54 PM   #4
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 148Reputation: 148
I recently went through something similar with my girlfriend's machine, and had to fix the MBR. This MS support article ( http://support.microsoft.com/kb/927392 ) had all the info I needed. I booted the recovery CD, and used the command
Code:
Bootrec.exe /FixMbr
It wrote over the grub MBR with the original Vista MBR, and my girlfriend's computer was working again.

If you can't get your hands on a Vista CD, then you may be out of luck.

Now that I think of it, you could always repair grub to boot Vista. The Super Grub Disk may be very helpful if you want to try this.

Last edited by Telengard; 06-19-2009 at 11:57 PM. Reason: Almost forgot to mention
 
Old 06-20-2009, 12:26 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
I am not sure how are you going to do this without booting into the system. But one way is to install back Ubuntu and then install super grub or any third party boot manager of your choice and then delete the Ubuntu partitions from Vista.

Could help you out.
http://btmgr.sourceforge.net/about.html
 
Old 06-20-2009, 08:21 AM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by linuxlover.chaitanya View Post
I am not sure how are you going to do this without booting into the system.
I assume a bootable Ubuntu install CD is still available.

Quote:
But one way is to install back Ubuntu and then install super grub or any third party boot manager of your choice and then delete the Ubuntu partitions from Vista.
Grub normally is installed with a tiny part of it in the MBR and most of it in the Linux partition that contains your /boot directory.

I don't know where "super grub" lives. Can the second stage be in the NTFS partition or somewhere else that exists when there is no Linux partition?

You could put back a Linux partition (maybe much smaller) just to have a place from the second stage of GRUB, and configure GRUB to boot Windows.

Once you boot Windows once (using GRUB), I wonder if Bootrec.exe can be run within the copy of Windows it is fixing. I expect it can. So maybe you need to just temporarily put back Ubuntu.

If you know the right command, I think the running copy of GRUB on a Linux CD can transfer directly to Windows without needing to install Linux on the hard drive, so I think you could boot Windows once that way, than use Bootrec to fix the MBR, then finaly get back to the original issue of fixing the partition size.

Last edited by johnsfine; 06-20-2009 at 08:23 AM.
 
Old 06-20-2009, 03:19 PM   #7
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by johnsfine View Post
Once you boot Windows once (using GRUB), I wonder if Bootrec.exe can be run within the copy of Windows it is fixing. I expect it can. So maybe you need to just temporarily put back Ubuntu.
A live Windows OS modifying the MBR of its own boot device? I seriously doubt it! That would be a fantastic opportunity for viruses, wouldn't it? (Then again, it is Windows :P ).

Last edited by Telengard; 06-20-2009 at 03:20 PM. Reason: clarification
 
Old 06-20-2009, 07:32 PM   #8
louieb
Member
 
Registered: Jun 2006
Location: Texas
Distribution: Ubuntu 8.04
Posts: 94

Rep: Reputation: 17
happens all the time. lots of ways to change the MBR to boot Vista.
take your pick from here. IDBS Remove/Replace/Uninstal Grub
 
Old 10-05-2009, 06:24 AM   #9
biggles1000
LQ Newbie
 
Registered: Oct 2009
Location: England
Distribution: Linux Mint
Posts: 7

Rep: Reputation: 0
Stuck on XP?

A similar problem happened to me with the wifi, as I have a HP Pavillion ZV5000 running XP that has one of those wifi buttons just above the keyboard. I pressed it, but the light on it didn't turn on. However, when I used a buffalo wifi thing (the stick), and rebooted the laptop, the wifi on linux worked. Also, I installed the Linux Mint7 CD on the laptop, but wanted to dedicate more space to it after the instal, so I deleted its partition and restarted the laptop. Not a good idea. When i deleted the linux partition, it also deleted the Grub loader! So then I used the mint disc I had created from the iso on the website, but at 60% through the instal, it said it was broken. Now the linux partition manager (linux of a disc is now all I can run) refuses to let me delete the broken linux partition! In conclusion, I can no longer run any OS of the hard drive, but I can still access my documents of a Linux boot disc.
 
  


Reply



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
How to remove grub + linux partition from drive? No longer needed. Boggit Linux - General 7 11-09-2008 12:29 AM
How to remove GRUB from Vista giannis@ Linux - Newbie 2 08-21-2008 05:24 PM
How Do I: Remove a linux partition & GRUB bootloader. jkillah1 Linux - Newbie 11 06-09-2007 11:07 AM
How to remove grub from Vista ? snborah Linux - Newbie 3 05-13-2007 03:16 PM
LXer: Survey of IE7 Beta 2 Reviews: Ouch! Ouch! Ouch! LXer Syndicated Linux News 0 04-11-2006 09:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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