LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   easiest way to remove partition with grub and still be able to boot (https://www.linuxquestions.org/questions/linux-newbie-8/easiest-way-to-remove-partition-with-grub-and-still-be-able-to-boot-4175444912/)

chroniks 01-09-2013 11:25 PM

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?

pan64 01-10-2013 02:37 AM

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.

clocker 01-10-2013 04:51 AM

I think it's not possible. You may have to end up doing a dual boot again.

Wim Sturkenboom 01-10-2013 05:19 AM

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.

yancek 01-10-2013 09:11 AM

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

TobiSGD 01-10-2013 09:31 AM

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.


All times are GMT -5. The time now is 10:27 AM.