LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-10-2013, 12:25 AM   #1
chroniks
LQ Newbie
 
Registered: Dec 2012
Posts: 7

Rep: Reputation: Disabled
easiest way to remove partition with grub and still be able to boot


ok i'm not making this mistake again. i haven't been using ubuntu enough lately to justify it taking up a 30 gig partition on my hard drive. i'll keep my linux tinkering to vmware for now but i need to delete the partition without losing the ability to boot into windows like last time. is there an easy way to do this?
 
Old 01-10-2013, 03:37 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
probably it depends on windows. removing partitions will cause the existing ones will (may?) be reordered, probably other drive letter will be assigned too. The most important part is that the main windows partition must not be altered, so any partition before it cannot be removed. Actually I do not know how windows detects the drives and partitions, so I have no idea how can we "guess" that order. From linux you can modify the type of that partition to something strange (unknown for windows) and try to boot. Also you can shrink it to a few gigs and leave it unused.
 
Old 01-10-2013, 05:51 AM   #3
clocker
Member
 
Registered: Sep 2011
Distribution: fedora, redhat, mint
Posts: 87

Rep: Reputation: Disabled
I think it's not possible. You may have to end up doing a dual boot again.
 
Old 01-10-2013, 06:19 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Maybe this no longer works on newer systems, but using the windows recovery you used to be able to restore the MBR to something the Windows likes (the old command long ago was fixmbr). After that, Grub is no longer the bootloader and it will be safe to remove the Linux partitions.

An alternative is to use Lilo as the bootloader. Once configured and installed in the MBR, it does not rely on any files on the partitions.
 
Old 01-10-2013, 10:11 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,872

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
If you are using Grub to boot both windows and Ubuntu and delete the Ubuntu partition, you will not be able to boot windows until you reinstall its bootloader to the mbr. Which windows are you using? The methods vary depending upon whether you use xp, vista, etc.

Generally, you should be able to do this with an installation CD/DVD of windows. If you are using vista or 7, take a look at this link:

http://support.microsoft.com/kb/927392

You might be able to do it from a Recovery partition, see the link below:

http://superuser.com/questions/24424...windows-7-disk
 
Old 01-10-2013, 10:31 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
If you use XP start from your XP CD, go to the recovery console and launch the command
Code:
fixmbr
If you use Vista or newer start from your Windows DVD, go to the recovery console and launch the command
Code:
bootrec.exe /fixmbr
Test if you now boot directly into Windows, without Grub involved. If so it is safe to remove the Ubuntu partitions.
 
  


Reply


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
Grub menu doesnt load at startup : dual boot : grub in the /boot partition jayesh.bhoot Linux - General 7 10-23-2010 04:58 AM
How to remove Linux Partition in Vista? and broken Grub? Ouch! stevebelden Linux - Newbie 8 10-05-2009 07:24 AM
remove GRUB from windows partition boot record Krun Linux - Newbie 3 09-13-2007 05:51 PM
How Do I: Remove a linux partition & GRUB bootloader. jkillah1 Linux - Newbie 11 06-09-2007 12:07 PM
howto remove GRUB from the partition using fdisk ? cccc Linux - General 6 01-18-2005 08:09 PM


All times are GMT -5. The time now is 07:23 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration