Uninstall Ubuntu 10.04 no Windows XP install CD

eilif

Distinguished
Jun 28, 2010
216
0
18,680
Ok, i am sick of having to scroll down and choose windows xp every single time im going to use it. IS there a way to change the list order, or uninstall Ubuntu? I'd love to get the hard drive space back. I do have the ubuntu 10.04 Live CD, but NOT a Windows XP install/recovery disk.. because we got the computer delivered with Windows.. But it may be i have the CD, i Dont know, because its an old PC... So is there any way to uninstall or at least change the boot order for WIndows XP and Ubuntu without the XP CD? Please help :)
 
If you dont have the windows CD to fix the MBR, then you will need the GRUB bootloader, otherwise your windows partition will be unable to boot. I suppose you could completely delete ubuntu, and re-run grub-install from the ubuntu live cd.
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960


At least we have eachother :lol:

W7 is pretty fantastic, I do have to say. I do not mind using it at all :) (don't tell anybody else here I said that :D)
 

eilif

Distinguished
Jun 28, 2010
216
0
18,680
Hehe, no i won't... Yes, Windows 7 is great, but it costs a hecka lot of money here, and besides i think XP is better at some areas.... But i do indeed like ubuntu, but it keeps annoying me, that when i turn my PC and is going in XP and i walk away for a drink, and when i return it has booted into Ubuntu... It gets annoying. And if somebody ELSE is going to use my computer, lol, they wont understand a thing, and boot into ubuntu....
 

dEAne

Distinguished
Dec 13, 2009
2,190
0
19,860
I think this is what you want - Right click on Computer (This is My Computer in XP) then click on Properties. On System Properties dialog you can see Tabs their, click on Advanced then below that you will see Start up and Recovery then click on Settings button, here you can choose what OS you want to boot by default. Hope that fix it.
 

elel

Distinguished
Jun 18, 2009
1,042
0
19,360

Does XP understand GRUB? That would seem strange :??:
Or are you expecting it to overwrite GRUB and give XP as the only option?
 

eilif

Distinguished
Jun 28, 2010
216
0
18,680


No, good idea but it only recognises windows XP, and it already is default.. With no other options. But it does show a "edit the startup options file manually" or something like that, and when i click edit, this comes up in notepad:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdete

Can anything be changed heer? :(
 

elel

Distinguished
Jun 18, 2009
1,042
0
19,360
This thread is someone asking the same question you are. I particularly like the looks of jimonyzang's solution, though I'm not running a version of linux with GRUB2 so I can't try it. Basically, he wants you to open the file /etc/default/grub with root privileges, and edit it so that the line which starts "GRUB_DEFAULT" is set to the number in the menu of the OS you want as default. It looks like this number is counted from zero, so to find which number your windows option is, try starting the computer and counting how many times you hit the down key to select it. This would be the number to enter. If it is wrong, no harm will be done. After this, he wants you to run the command update-grub with root privileges (i.e., type sudo in front of it). Hope this works.

edit: if this is confusing, I'm just trying to explain what each command he gives does. You can just copy and paste them into the terminal, and they will work. The only hard part for you is finding the line "GRUB_DEFAULT" in the config file and entering the right number in it.
 

randomizer

Champion
Moderator
If you are running 10.04, and you have not upgraded your kernel, you should have 5 entries in GRUB, which means GRUB_DEFAULT should be 4 (due to the counting starting at 0). Make sure to run update-grub after editing /etc/default/grub otherwise the changes won't have any effect.
 

srikanthgundaz

Distinguished
Nov 2, 2010
1
0
18,510



Yes, u can easily modify the list. Goto /boot/grub. Here, u can see one file with the name grub.cfg Not go to terminal and type " sudo gedit /boot/grub/grub.cfg " (without qoutes)

Scroll down and there you can see

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows Professional XP2 (on /dev/sdb1)" {
insmod ntfs
set root='(hd1,1)'
search --no-floppy --fs-uuid --set fe3cfb353cfae813
drivemap -s (hd0) ${root}
chainloader +1

Copy the above format thing from grub.cfg and paste it right after

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

That's it. Next time when u login, windows will be in first position.
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960


As long as you're careful it will be fine. If you screw up, it won't boot, but you will still be able to fix it by other means.

I'll do my best to re-explain what srikantgundaz said in a slightly more understandable manner.



Open a terminal.

Enter the following:
[cpp]sudo gedit /boot/grub/grub.cfg[/cpp]

This will allow you to edit the grub configuration file in the /boot/grub/ directory.

Scroll down until you see the following (or similar) text:

[cpp]### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows Professional XP2 (on /dev/sdb1)" {
insmod ntfs
set root='(hd1,1)'
search --no-floppy --fs-uuid --set fe3cfb353cfae813
drivemap -s (hd0) ${root}
chainloader +1[/cpp]

Copy the above lines below the following lines in the grub.cfg file.

[cpp]### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###[/cpp]

This should place Windows in the first location on the boot menu.
 

eilif

Distinguished
Jun 28, 2010
216
0
18,680



Okay i have found where to put that stuff but to be honest i am very scared of fmessing up my computer, i know exactly what to do please can you tell me if this is potentially harmful or not as the grub.cfg file says in the top DO NOT EDIT THIS FILE if i edit it wong, will my machine become unbootable?
 

eilif

Distinguished
Jun 28, 2010
216
0
18,680
This is what i found:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Dell Utility Partition (on /dev/sda1)" {
insmod fat
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 07d6-0c0d
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Microsoft Windows XP Home Edition (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set ceec7f5dec7f3eb1
drivemap -s (hd0) ${root}
chainloader +1

WHat can i do with it?
 
I would advise the following. Copy the grub.cfg file that you are using at the moment to a pen drive or such like. Also make a copy as locally, name it something like grub.original then go and make the edits.

IF you make a mistake you can boot from a live CD and copy back over the backup file. That way you can make the change and worst case scenario all you have to do is copy back a file to get back to where you started.

So long as you have a live CD to hand that you can boot from to a desktop there is very little risk, you will just confuse the boot loader which can be fixed by replacing the config file, you would have to be very cack handed to actually cause serious damage.

Another think that I spotted is that you have a boot option for the dell system utilities. You might want to try booting that and seeing if you get the option to create an XP install CD. Dell don't ship install cd media but sometimes you can make a disk from the image they create when the image the HD.