0

I was given a laptop in 2008 that had both XP Professional and Ubuntu. I only ever used XP, so I left Linux alone. Now, I'd like to remove it. I tried going to Disk Management to delete the partition, but it doesn't seem like there is one. I have the C: drive and a volume with no name that's 7.5 GB. At first I thought this might be it, but turns out it's my Active partition. Maybe my friend installed XP and Ubuntu on the same partition?

I also don't see wubi installed, so I don't think that's how he got Ubuntu on there. For what it's worth, it's Ubuntu 7.10, kernel 2.6.22-14-generic.

Any help would be appreciated.

Curious
  • 101

2 Answers2

-1

PART 1: i know you probably dont like ubuntu but for this to work you must definitely get you hands dirty with some ubuntu. since u definitely hate i most definitely wont bother u with command line until its absolutely neccesary.

first things first boot into ubuntu and go the files directory 2:from the side scroll part click on the part that says computer 3:right click and go to properties and then notice that exact size of the computer space directory coz later in windows that would be the partition you will need to delete.

hit crtl + alt + T acess to terminal or command prompt if you must say

PART 2:

Make Windows (ANY variant) the default Grub2 menu option.

Description: This sets Windows as the default boot option, and (with NO user action) the PC will auto-launch Windows on startup.

STEPS: type in terminal the following

** for Listing your current menu items**

sudo update-grub

B. Edit setup file

sudo gedit /etc/default/grub

Set the boot default to your Windows boot partition (eg.)

GRUB_DEFAULT=”Windows 7 (loader) on /dev/sda1″

WARNING: Just setting 'GRUB_DEFAULT=n', will NOT work after kernel updates, etc.

(Save the file and close.)

C. Update grub settings

sudo update-grub

Now, on boot, you will AUTOMATICALLY default to MS Windows.

PART 3: (Optional Extra)

Hide the Grub2 menu, and use the default menu option.

Description: This both hides the startup menu, and shortens the (usually 10 second) timeout. The PC will auto-launch whatever the default option is on startup.

NOTE: The user just needs to hold down the Shift key (on startup), to again see the Grub2 menu.

STEPS:

D. Edit setup file

sudo gedit /etc/default/grub

Uncomment the line '#GRUB_HIDDEN_TIMEOUT=0', to look like:

GRUB_HIDDEN_TIMEOUT=0

(Save the file and close.)

E. Update grub settings

sudo update-grub

Now, on boot, you will AUTOMATICALLY boot to the default menu option, UNLESS you hold down the Shift-key at boot time. Then the grub2 menu will re-appear. load into windows and delete the partition of the size i told you to notice earlier and poof ubuntu is gone

  • I haven't read your post all the way yet, but I don't hate it at all and I'd love to learn to use it well. I'm going to sell this laptop and just want one OS on there, and I'm not sure what info my friend might have had stored on the Ubuntu part, so I think it's best to just get rid of it is all. Thanks for taking the time to write the rest of it, I'll give it a shot. – Curious Jul 07 '17 at 06:00
  • NO! After this, the computer will fail to boot as GRUB will be unable to find its files on the HDD! That is, unless you have a separate boot partition, however, you propably want to remove that as well. – Kryštof Píštěk Jul 07 '17 at 09:35
-1

One method for such things that I like is to first create a USB start-up disk (using an ISO and start-up disk creator or a like program) and boot into that. Now Ubuntu live USBs have Gparted (a partition management tool) on them and it is this that will be most useful.

While using Gparted on the live USB no partition on the hard drive will be mounted and as such you can delete them to your hearts content. So delete the Ubuntu partition and move/enlarge the Windows XP one.

Lastly shutdown the live USB system and you should boot into a system that has Windows XP only installed.

This has helped me before; hope it works for you as well!

Edit: As it has been said in the comments this most like likely will throw back an error so instead of deleting the Ubuntu install entirely an alternate solution would be to shrink the partition as much as possible using the same method.

Outside of this you will need a windows XP installation CD (which seems unlikely to me) and follow the instructions stated in this post to fix the boot error: https://ubuntuforums.org/showthread.php?t=895466

Michael Knoll
  • 83
  • 1
  • 11
  • This is interesting, but after this the computer may fail to boot due to missing grub files. – Kryštof Píštěk Jul 07 '17 at 09:37
  • Hopefully not as Windows has its own boot process. So the logic here is that once all traces of Linux are removed (ie the partition is removed) than the Windows XP boot process would once again dominate as it did before Linux was installed. Here is a link to a description of the Windows XP boot process: http://vittoriop77.altervista.org/download/XP_Boot_Process.pdf – Michael Knoll Jul 07 '17 at 15:26
  • 2
    You're thinking about this correctly, but that's how it would work in UEFI. In BIOS (what Windows XP uses), the first 160 sectors (or so) are executed and those HAVE been overwritten by the Ubuntu install. I am going to verify if this is how it works in a Virtual Machine now and will let you know on the results. – Kryštof Píštěk Jul 07 '17 at 15:32
  • I am on a BIOS system and that is what has worked for me. Thank you for double checking though as I would not want to lead the OP down a dangerous pathway. – Michael Knoll Jul 07 '17 at 15:35
  • 2
    Well, I just tried it in a VM and Grub throws error 22. – Kryštof Píštěk Jul 07 '17 at 15:42