Uninstalling Ubuntu 9.04

Asked by ynatalia

So, I'm completely new to linux. I just installed ubuntu 9.04, and I chose the 'install side by side' with XP option so I can choose the OS I want to boot in to at start up. Now, I installed it, and restarted to get back in to XP, and grub will not let me do it. Now, I'm stuck in ubuntu, and I can't get back to XP. Ever time I try and choose it at start up, it doesn't work, and just sends me back to the screen where the options to boot in to are located. I booted from the live CD, and tried to get in to gparted to delete it, but it won't let me do that either. it seems to be locked, if the keys next to that partition are any indication. the other partitions are there, but the ubuntu one is locked, and my C drive in XP is not being detected. I also tried using the cd for XP and typing in fixmbr, but that didn't work either. I just want to uninstall ubuntu now. can anyone help? if anyone has any tips, please PLEASE be detailed because I really don't know how to use commands or code or any of that. Thank you so very much in advance!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Boot to Linux and then look at /boot/grub/menu.lst

make sure the boot parameters to XP is correct

https://help.ubuntu.com/community/WindowsDualBoot

If the details for the XP boot are wrong in that file you will not be able to boot to windows

Can you also provide the output of:

sudo fdisk -l

Thanks

Revision history for this message
Tom (tom6) said :
#2

Yes, if you open a command-line

Applications - Accessories - Terminal

and into the terminal/commnad window/console type

sudo fdisk -l

https://help.ubuntu.com/community/AutomaticallyMountPartitions#Viewing%20the%20system%27s%20physical%20information
and then paste the info into here for us to have a look at. Also type in

cd /boot/grub
gedit menu.lst

and copy and paste the lines that don't have a # at the front of them. The # mark stops the machine from reading the information so we use those lines to give handy hints to each other. The lines without a # contain the stuff that's specific to your machine and we might be able to spot what's gone wrong and fix it.

Thanks, good luck and regards from
Tom :)

Revision history for this message
ynatalia (ynatalia) said :
#3

I typed in sudo fdisk -l and this is what I got.

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x9dc96e9e

   Device Boot Start End Blocks Id System
/dev/sda1 1 6 48163+ de Dell Utility
/dev/sda2 * 7 4080 32724405 7 HPFS/NTFS
/dev/sda3 4407 4863 3670852+ db CP/M / CTOS / ...
/dev/sda4 4081 4406 2618595 5 Extended
/dev/sda5 4081 4384 2441848+ 83 Linux
/dev/sda6 4385 4406 176683+ 82 Linux swap / Solaris

Partition table entries are not in disk order

However, when I tried boot/grub/menu.lst nothing came up. I'm probably doing it wrong or something. Thank you for replying so far. Again, I'm completely new to this so detailed descriptions of what to do would be most helpful. Thank you so much!

Revision history for this message
Tom (tom6) said :
#4

So in a terminal console you typed

cd /boot/grub

and then

gedit menu.lst

note that's lower-case "MENU.LST" and that there's a space after "cd" and another after "gedit"?

Revision history for this message
Tom (tom6) said :
#5

Ahhh, i think i've spotted it. Did you miss out the / from in front of "boot"? That might be it. If you really want to put it as one single command then

gedit /boot/grub/menu.lst

should do the trick. At first i used to think the ".lst" was a 1 in the front but then i realised it was short for "list" lol

Revision history for this message
Tom (tom6) said :
#6

The sda numbers are created in chronological order rather than the order of position on the disk so that's fine :)

sda1 appears to be utilities. Perhaps a recovery partition?
sda2 is where Windows is, as you know
sda3 appears to be about 3Gb (400 cylinders, ish) but i'm not clear what it's for. Perhaps this is the recovery partition?

sda4 is an extended partition which means it contains all the other partitions. Drives can only have 3 primary and 1 extended partition but this extended one can then contain quite a few "Logical" partitions). I think of it as a bucket containing the rest.

sda5 is the main Ubunt but it's too tiny for Ubuntu, this is why you're having troubles
sda6 is the linux-swap partition. This only needs to be just over ram size, or perhaps anywhere up to as much as 2xram but no more than that.

Revision history for this message
Tom (tom6) said :
#7

Hmmm, i can't count in cylinders lol. A 40Gb drive should have plenty of room for both but something does appear to be a bit odd.

You say you're booting into Ubuntu fine and that Ubuntu seems to be working fine?

If you are working from a LiveCd session then i've been completely wrong about trying to access "menu.lst", instead try

cd /dev/sda5/boot/grub
gedit menu.lst

If you can get back to a LiveCd sesion anyway then go up to the top taskbar and click on

System - Administration - Partition Editor

this should give a graphical view of how your partitions are laid out so you should see that sda3 is at the end of the drive there :) Does the ubuntu partition, sda5, have 10Gb or more? Ubuntu really needs 10Gb or over but Xubuntu or plenty of other distros could fit into much less space. Please let us know how much space is in sda5 and then i can suggest a better distro to install for the moment, just to get back into Windows. Note that we don't need to delete any partitions to sort this out & fix both windows and ubuntu on this machine :)

Good luck and regards from
Tom :)

Revision history for this message
ynatalia (ynatalia) said :
#8

I'm not working from a live cd session. I installed ubuntu, and I think you're right that the problem is that I installed it with not enough space left on it afterwards. Anyway, I typed in gedit /boot/grub/menu.lst in to the terminal, and its telling me 'no such file or directory'. Also, I said above that I can't get in to windows. it won't let me boot to it. it comes in on the list at the beginning, but when I highlight it and press enter, it doesn't work. i've tried doing it from the XP cd, but that doesn't work either. oh and Ubuntu doesn't have 10 gb of space ~_~. that was my fault to begin with. I think that I'll delete ubuntu, maybe try it again later. but yeah, for the time being I want to completely get rid of it. I've read in a lot of places that you can only do this through gparted? I'm not sure, but if there's a way to be able to do it without that, I'd like to try. AND, i'd really like to get in to my windows partition >_< if at all possible. I know its there, and getting grub to let me boot in to it would be GREAT. I think if I reached it I would be better able to work this out. again, thank you very much for helping me out with this. You're answering very quickly, so thank you so much!

Revision history for this message
ynatalia (ynatalia) said :
#9

I just tried /boot/grub/menu.lst and it says 'permission denied'. I don't get it >_<

Revision history for this message
Tom (tom6) said :
#10

Ok, i think that if you are using the Ubuntu that you installed then we should be able to sort something out from there.

We need to boot into Windows before we can "fixmbr" to point at just the Windows partition (sda2). The Xp cd should be able to boot into a recovery mode that would help with this but i tend to find it tries to reinstall (and hence wipe the Windows partition, and perhaps the whole drive) so i would be wary of that option. To get into Windows from Ubuntu we are going to need to edit the menu.lst and to do that we need to have some free space.

So, on the top taskbar click on "Places" and if you do have a folder called "Documents" there then open it. Click on it's "View" menu and make sure that "Status bar" is ticked. At the bottom of the file-browser window that's showing the Documents folder should be a status bar which should show how much free space you have in Ubuntu right now.

If the status bar showed "0 bytes" or if the "Documents" folder wasn't in the "Places" menu then we should be able to clear some space by un-installing some heavy applications. On the top taskbar click on

Applications - Add/Remove Applications

and use the search tool to find "OpenOffice" (all one word) untick all of these and then click the "Apply changes" button. After this a reboot might restore some normality, and put things back in the "Places" menu.

Now in the terminal console the "Change Directory" command should let us get into the grub folder (GRand Unified Boot-loader). Try typing (or copy & mouse paste)

cd /boot/grub

the "cd" command should let you change directory now. Please let me know how all this goes ;)

Good luck and regards from
Tom :)

Revision history for this message
ynatalia (ynatalia) said :
#11

okay, so I did what you asked. I unchecked the openoffice programs so when I open documents, it says I have 102.2 MB of space on the bottom. I did a reboot and then went to terminal, typed in cd/boot/grub, but it still says 'no such file or directory'. What should I do from here? Again, thank you very much for helping me and replying so quickly.

Revision history for this message
Tom (tom6) said :
#12

cd/boot/grub

needs a space after the command "cd"

cd /boot/grub

Revision history for this message
Tom (tom6) said :
#13

lol, thanks for saying thanks about response times. I might have to vanish in a bit tho as it's quite late here but i'll be back in tomorrow :) Still got a bit of time left yet tho :)

Revision history for this message
ynatalia (ynatalia) said :
#14

okay so after that I typed in what you told me to type earlier- gedit menu.lst and this is what I got. everything here are the lines without the # next to them.

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 68e69e3e-e604-491b-9fb2-03eb8069c1a5
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=68e69e3e-e604-491b-9fb2-03eb8069c1a5 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid 68e69e3e-e604-491b-9fb2-03eb8069c1a5
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=68e69e3e-e604-491b-9fb2-03eb8069c1a5 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid 68e69e3e-e604-491b-9fb2-03eb8069c1a5
kernel /boot/memtest86+.bin
quiet

title Other operating systems:
root

title Microsoft Windows XP Home Edition
rootnoverify (hd0,1)
savedefault
chainloader +1

is there anything else I should put in here? what should I do after this? and as always, thank you for all your help and the quick responses.

Revision history for this message
Tom (tom6) said :
#15

Ok, first thing is to make a backup copy of this file in case editing it goes wrong - so into the terminal console type in

ls
cp menu.lst menu.lst.140709
ls

note the "ls" is a lower-case "LS" and gives a LiSt of what's in the directory. The command "cp" will make a CoPy of "menu.lst" and will give the copy the name "menu.lst.140709"

Revision history for this message
Tom (tom6) said :
#16

Sorry, i forgor to "sudo" that so it wont let you write into the system folder there. After entering a sudo command you will be asked for your normal user password, not your SuperUser/Root one, just the normal one you login with. Try

sudo cp menu.lst menu.lst.140709
ls

this 2nd "ls" should show that you now have a new file, just as expected :)
Right, next thing is to edit the menu.lst so type in

sudo gedit

& now change the section that says

title Microsoft Windows XP Home Edition
rootnoverify (hd0,1)
savedefault
chainloader +1

and change it to

title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1

So, not much change - just the "rootnoverify" to "root" and add in the line "makeactive". Grub is used to talk to machines and so it counts from 0 rather than starting at 1 as humans usually do. Just click on the "Save" button and then reboot. If a problem happens and you can't get back into ubuntu then just LiveCd and firefox should allow you to navigate into here

Revision history for this message
Tom (tom6) said :
#17

Another thing that migh be worth trying is during bootup choose the 2nd option for Ubuntu, the option that has "recovery mode" near the end of it's line. This eventually leads to a handy but disturbingly blue menu which should give you an option to "fsck check partitions" which is well worth trying from that menu. The top and default option is to "resume normal boot" although it will be very verbose rather than showing the orange bar, just as fast tho - perhaps even faster :)

Revision history for this message
Tom (tom6) said :
#18

dohh, i'm making mistakes that just wont do anything. Try

sudo gedit menu.lst

& now change the section that says

title Microsoft Windows XP Home Edition
rootnoverify (hd0,1)
savedefault
chainloader +1

and change it to

title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1

Revision history for this message
ynatalia (ynatalia) said :
#19

I typed in ls, and then sudo cp menu.lst menu.lst.140709 and it asked me for my password, like you said. I typed it in, and it said 'cp: cannot stat 'menu.lst': no such file or directory'. What does this mean?

Revision history for this message
Tom (tom6) said :
#20

err i think you're not in the /boot/grub directory/folder

Revision history for this message
Tom (tom6) said :
#21

so try

cd /boot/grub
ls
sudo cp menu.lst menu.lst.140709
ls
sudo gedit menu.lst

this time sudo wont ask for a password because the first one gives you 15 minutes free reign ;) Ok, then do the changes from

title Microsoft Windows XP Home Edition
rootnoverify (hd0,1)
savedefault
chainloader +1

and change it to

title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1

Revision history for this message
ynatalia (ynatalia) said :
#22

Okay, done and done. I typed everything in, saved the file and rebooted my machine. What next? Thank you for your help so far, and I'm sorry if its frustrating that I don't get what to do the first time around >_<.

Revision history for this message
ynatalia (ynatalia) said :
#23

Oh and I tried choosing XP when the boot list shows up at the beginning, and it still won't boot in to XP

Revision history for this message
Tom (tom6) said :
#24

Oh drat. I was sure that would fix it. The problem seems to be something inside Xp which we will have to look at tomorrow. Trying the "recovery mode"s "fsck check disk" ight be a good plan. From the terminal console you can look up what a command does by typing " --help" or " -h" in straight after the command. For example try typing in

fsck --help

to get a quick cheat-sheet on how to use the command. I imagine that "fsck" needs to be "sudo"d tho as it has potentially damaging capabilities i'm sure. Anyway, looking up the quick help guide should be fine :)

Don't worry about the mistakes you made, it's all part of the process. Sorry about mine too :) You did well anyway, which is pretty impressive :) Err, there are some other places worth trying to post this problem
https://help.ubuntu.com/community/HowToGetHelp

Really tho it might be better to search around in "Places" for one of the "Media" as one of those should be your Xp partition.
Good luck and regards from
Tom :)

Revision history for this message
ynatalia (ynatalia) said :
#25

Thank you for your help. Yeah, I'm assuming that the problems with xp, because even microsoft knows that dual boot/partitioning with linux isn't recognized by xp. I didn't know this until yesterday, when I had this problem >_<. Anyway, I'm still looking around trying to find a way to get it to boot to xp. Thanks for all your help. if you maybe get a lightbulb as to what the problem is, please share :). Have a good day.

Revision history for this message
Tom (tom6) said :
#26

Microsquish are very anti other operating systems and really want to push people into their newest one. Actually i usually find Xp really quite good now and it's very good at co-operating with other OS's in a dual-boot. Vista is more often a trouble although Service Pack 1 seemed to improve it a bit. It's beginning to look as though Windows7 might be ok but obviously as it's the new one it'll probably need newer hardware. Really Xp should be fine, we'll have a look tomorrow :)

Revision history for this message
ynatalia (ynatalia) said :
#27

So...this question is still open. I want to ask for some last few pieces of advice. I finally downloaded and burned a gparted livecd. As stated above, the sda5 is the main ubuntu partition and the sda6 is the linux swap. I would like to know- would it be safe to delete the sda5 and sda6 partitions? Would it do any harm to my computer? Finally, will it get rid of Ubuntu and boot in to XP? Because I wasn't able to boot in to XP before, I want to know if deleting the ubuntu partition will prevent me from getting in to XP after.

I'm following these instructions:
https://lists.ubuntu.com/archives/ubuntu-users/2006-December/102255.html

Is there anything missing from here that I should know about? Please and thank you to anyone that offers some advice.

Revision history for this message
Tom (tom6) said :
#28

Hi

Sorry i didn't get back to you. I don't think that we can repair the Windows without either using a Windows cd to get into their "recovery mode" or "repair" or else just take the machine to a shop and get them to fix it.

Uninstalling or reinstalling Ubuntu is unlikely to change that but installing Ubuntu properly would at least get the machine working and able to fully use all the data you have in Windows.

Deleting sda5 & 6 might be a good idea either way. If you could let us know the info that the gparted program has in the bottom pane (the one with all the text and numbers) then we should be able to help you get Ubuntu onto your machine properly.

Please let me know if you do have a Windows Cd?

Thanks and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#29

To delete sda5 & sda6 you might need to right click on them 1st to "unmount" them - then the delete option will appear in the right-click menu the next time. Note that you can only do this through the gparted program on the LiveCd session of either GpartedLive or the Ubuntu Cd. Hopefully that should help!

Note that if you have neither the Ubuntu cd nor the Windows Cd thn this will leave your system worse off than before. If you don't have either of those Cd's then there is another option i could suggest so please let me know!

Good luck and regards from
Tom :)

Revision history for this message
ynatalia (ynatalia) said :
#30

I am writing from my phone, o please forgive any errors here. first off, yes I have the win xp cd. I also have the ubuntu cd. I just want to make ure that deleting the sda5 and sda6 won't harm my computer. I am following the instructiions I found on that site, and it seems easy ennough. but that never really works out for me anyway. for some reason, my wireless is not working on the computer anymore either. go figure. anyway, will booting into win xp and then fixing the mster boot record and then deleting sda5 and 6 let me boot back in to windows normally? oh and last question- why can't I delete sda4 from witin gparted? I mean, take the entire thing and delete it. there's a lock next to it. from what I see, it only contains sda5 and 6. thank you for your help! sorry if something doesn't make sense here.

Revision history for this message
Tom (tom6) said :
#31

Don't worry. There's a lot of confusing things about all this type of stuff and a lot of mis-information too so don't worry that you are not completely clear about it all yet, most other people are quite confused by it all too (hence the mis-info).

To just get Xp working again forget about the partitions and stuff (tidy them up later), just do this part

To restore your MBR:

   1. Insert the Windows Setup CD into the CD or DVD tray on your computer.
   2. Restart your computer.
   3. Hit Enter to reboot from the Windows CD when prompted to do so.
   4. Type “R” and hit Enter in Windows Setup to enter the Recovery Console. The Recovery Console will appear and list the Windows OSs on your machine.
   5. Select the number corresponding to the Windows installation you wish to boot into. For most people this will be a “1”. (In some versions of the Recovery Console the installations will be numbered. In others, you will have to deduce the installation number from the order of priority in the list.)
   6. Windows will prompt you for an Administrator password. Try your Administrator password or, if your Administrator password does not work, hit Enter.
   7. At the Windows prompt, type “fixmbr”.
   8. Type “exit” to restart the computer.

Your computer should restart using the Windows installation you selected. Sorry i didn't realise you had a proper Xp Cd. Most people don't but it does make it much easier.

Good luck and regards from
Tom :)

Can you help with this problem?

Provide an answer of your own, or ask ynatalia for more information if necessary.

To post a message you must log in.