LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to eliminate one OS from a triple boot drive (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-eliminate-one-os-from-a-triple-boot-drive-4175418648/)

ineuw 07-25-2012 02:28 PM

How to eliminate one OS from a triple boot drive
 
Can someone please mark this as solved? Thanks

To begin with, my data drive sdb is separate and protected from the boot disk drive sda.

sda is configured as follows:

sda1 = Win XP
sda4 = swap
sda5 = Win 7
sda6 = Xubuntu 12.04

On boot, Grub lists the Win 7 loader, which in turn lists Win XP as the older OS. Now that the 30 day trial expired, I want to erase Win 7 and focus on learning Xubuntu while still using XP productively.

In Xubuntu, I have GParted 0.11.0 and Grub Customizer 2.5.7 installed. I can reformat the Win 7 drive from Xubuntu, but what is the precedure to point Grub to boot into Win XP directly so that I can safely eliminate Win 7?

TroN-0074 07-25-2012 07:16 PM

o.k so what I would do is edit the grub list first before erasing any partition.
Code:

gksudo mousepad /boot/grub/menu.lst
you can just put # symbols infront of the entry you dont need anymore,
#title...............
#root partition (x,y)
#kernel..............
#whatever else.......

However Ubuntu is using grub2 nowaday and I havent have to play with it so I dont know if what I suggested above will work.

ineuw 07-27-2012 02:26 AM

Thanks for your reply but it doesn't apply. In Grub2 the file (is named grub.cfg) has a different structure. I tried adding code for the XP - by manual edit and using the Grub customizer, but it didn't work.

I will cross post this in the Ubuntu Forum.

syg00 07-27-2012 02:40 AM

Quote:

Originally Posted by ineuw (Post 4737889)
... but what is the precedure to point Grub to boot into Win XP directly so that I can safely eliminate Win 7?

You can't. The Win7 install replaced the XP loader code - in the XP partition. If you eliminate the Win7 partition you'll be unable to boot either Win7 (obviously) nor XP.
You'll need to rebuild the boot code on the XP partition first - there may be something on Technet, but it's not something I'd expect M$oft to encourage.

EDDY1 07-27-2012 02:41 AM

0ost output of
Quote:

fdisk -l

VDP76 07-27-2012 05:16 AM

I think the easiest solution would be to:
- backup!
- backup again!
- backup the backup! :D
- boot any linux live cd
- unmount all your sdaX drives
- use gparted to erase Win7 partition
- use gparted to move/resize the other partitions to fill the void or just create a new data partition
- reboot into Xubuntu
- open a terminal and type
Code:

sudo update-grub
(that's how you modify grub menu in grub2, check this out)

hope this would help

austintx 07-27-2012 07:48 AM

As TroN-0074 said, the first step is to fix grub2 to boot from a different OS

There are two gui programs that will allow you to change the default boot OS to WinXP or Xubuntu

Boot and Grub repair from sourceforge.net
Boot-Repair is a graphical tool that will repair these problems,
generally by reinstalling GRUB, which then restores access to the
operating systems you had installed before the issue.
Boot-Repair also has advanced options for reinstalling GRUB, adding
kernel options, restoring a generic MBR, or repair a broken filesystem.
It can also restore the original bootsector if it has been saved
previously by Clean-Ubiquity.

Grub Customiser
Grub Customizer is a graphical configuration tool to modify the grub2/burg
settings with focus on the individual list order - without losing the
dynamical behavior of grub - also usable on live cds.
Settings like the background or timeouts are also changeable using
Grub Customizer.

Either of those can be installed with apt-get or synaptic or software center

austintx 07-27-2012 08:07 AM

You did say that you had Grub Customiser installed already. I missed that.
That is all you need.
You have to click the Preferences button in Grub Customiser to choose the default OS.

austintx 07-27-2012 08:10 AM

I have to add a warning.
Grub Customiser does not save your changes when you exit the program.
You have to save your changes before you exit.

VDP76 07-27-2012 08:17 AM

Quote:

Originally Posted by austintx (Post 4739368)
You did say that you had Grub Customiser installed already. I missed that.
That is all you need.
You have to click the Preferences button in Grub Customiser to choose the default OS.

I missed that last paragraph too...anyway I would point grub on Xubuntu because even if you remove Win7 partition, it will be still listed in grub until you change it, and for that matter you need linux.

If something goes wrong while deleting partitions and messing with grub, so that you cannot boot anymore into one/any OS, this is great grub recovery tool!

EDDY1 07-28-2012 06:35 AM

Try hiren,s-Boot-cd it has mini-winsxp open command console &repair windowsxp boot loader then eras windows 7, change xubuntu /etc/fstab then reinstall grub.
http://www.hirensbootcd.org/download/
http://www.microsoft.com/resources/d....mspx?mfr=true

ineuw 07-28-2012 12:28 PM

Many thanks for all the advice given. It added to my hazy knowledge but it was up to me to sort out, try, and eliminate non-working options.

svg000's comment was the clue which confirmed my suspicion that the Win7 boot loader cannot be eliminated and rebuild XP boot from Ubuntu.

I used the XP install CD to boot into the recovery command prompt and use FIXBOOT to overwrite the Win7 loader and re-access XP. Then, I used the Xubuntu live CD to fix Grub2 to boot into Ubuntu.

In Ubuntu, Boot-repair was used to purge and rebuild Grub2, and then used Grub Customizer to set the preferred default OS to boot.

------

Comments:

In the XP recovery console, FIXMBR repairs the XP boot but doesn't eliminate the Win7 boot loader.

After fixing the XP boot, in Ubuntu, editing the 30_os-loader and adding Win XP info manually, then updating Grub2 (either with Grub Customizer or Boot Repair) fails because the examples of the code and the procedure on the web are, either out of date, or missing crucial information for an ignorant newbie.

After removing the Win7 boot loader, if no partition change is planned, it's preferable to reformat the old Win7 OS partition from Windows instead of using Gparted from Ubuntu. Doing it from Ubuntu it is more work.

Hiren s-Boot-cd would have been a great tool but it was posted after I fixed everything.

------

The following are the recommended steps to remove Win7, where the order of OS installation was 1 = XP, 2 = Win7, 3 = Ubuntu 12.04:

1. Use any Windows boot utility CD to fix the Windows XP boot record. Reboot to see if XP is accessed correctly. Boot.ini may need modifying through the Control panel\System\Advanced options.

2. Use (X)ubuntu live CD to repair grub2 to boot into (X)ubuntu.

3. Use Boot-repair to rebuild Grub2 and reboot to test.

4. Use Grub Customizer to set the desired boot order & default. Reboot to test.

4. Use GParted to manage the freed Win7 partition to resize, or reformat. Reboot to test for boot time mount errors. This can be corrected if needed with ntfs-config.

I hope this helps others.

This was also posted to Ubuntu Forums

EDDY1 07-28-2012 12:33 PM

Great job mark thread as solved using thread tools so others can benefit from it.

TroN-0074 07-28-2012 12:39 PM

Yo! I am glad to heard you fixed your boot loader the way you wanted. I am sure lot of people out there will find your post really helpful. If you want to mark it as Solve you can do that from the thread tool tab on your first post.

Have fun with your dual boot and good luck to you!

VDP76 07-28-2012 12:43 PM

Glad you sorted it out, as TroN-0074 said this thread will be useful to someone in future!

Have fun! :)


All times are GMT -5. The time now is 11:46 AM.