LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to remove OS under Grub2 ? (https://www.linuxquestions.org/questions/linux-general-1/how-to-remove-os-under-grub2-804038/)

FeathersMc 04-25-2010 02:03 AM

How to remove OS under Grub2 ?
 
Hello,

I have Suse 11.2 and Win XP running from a Grub2 boot loader. I want to remove Win XP from the machine. What is the best way to do that? Is it safe just to replace the partition that Win XP is on with a Linux partition?

Assuming that is OK, will Grub then boot OK, and recognise automatically that the Win XP OS is gone, or do I also need to update the Grub configuration manually?

I did try looking at the Grub Wiki, but I find it very hard to use :(

Thanks in advance
FMc

EricTRA 04-25-2010 02:58 AM

Hello,

There are several options. If Grub is installed in the MBR just removing the WinXP partition will not affect booting into SuSE as far as I know. You'll only get errors if trying to start WinXP I believe.

1. You can startup from a Gparted Live CD and manually remove the partition that holds WinXP. After that you'll have to update your Grub configuration, either manually or via update-grub command.

2. If you want to install another Linux distro onto that partition then you can just start from the install media and go ahead with the installation. Furthermore if the 'new' distro you're installing also uses Grub2 then you can let the installer take care of updating Grub.

3. If you want to use the space that becomes free by deleting WinXP, then you can boot from a Gparted Live CD and use that to add the space to your SuSE partition.

Kind regards,

Eric

business_kid 04-25-2010 03:00 AM

Grub lives in /boot, and usually in the start of /dev/sda1 or whatever your boot disk is.

Presuming windows is also on sda1, you can remove away all m$ files; but if you change filesystem type, or remove the partition, you will not be able to boot. As a safety manouvre, I would do this
dd if=/dev/sda of=/boot/sdabootsector bs=512 count=1
dd if=/dev/sda1 of=/boot/sda1bootsector bs=512 count=1

Then you have copies of your boot sectors, and can dd them back afterward.

Remove the grub entries manually unless you are reinstalling some windows for neatness. They are harmless.

FeathersMc 04-25-2010 08:30 PM

Hi,

Thanks ppl - I used a GPartEd Live CD, but backed up my boot sectos as suggested. Seems to have worked fine. Now on to virtualisation ...

FMc

EricTRA 04-26-2010 12:11 AM

Hi,

Glad it worked out. Have fun 'virtualizing'.

If you consider your problem/question solved please mark the thread as such using the Thread Tools.

Kind regards,

Eric


All times are GMT -5. The time now is 05:03 PM.