Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 09-13-2009, 10:37 PM   #1
Registered: Jul 2009
Location: Columbus, OH, USA
Distribution: Ubuntu 12.04; Knoppix 7
Posts: 122

Rep: Reputation: 16
Question deleate extra operating systems

Compaq Presario 543OUS series 5000
Pentium 4 processor 1800 Hz
Processor speed 1800/400 Hz
Processor stepping F12
Cache size (L1/L2) 20/256 KB
RAM 256Mb; Clock 1.8 Gb
Hard Drive 30 Gb
VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev b2)
Ubuntu 9.04; Ffx 3.5.3, Ffx 3.0.14; Chromium dev

I have 10 operating systems on my computer - all the same thing: Jaunty 9.04. Six are broken and two have graphics issues. I only want to keep one (and its recovery mate). How do I delete the others?
Old 09-13-2009, 11:02 PM   #2
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
Boot through the ubuntu that you wanna keep, be root and delete all the other os' (they'd be on partitions other than your 'File System' )

After that edit your /boot/grub/menu.lst (to delete all the unwanted entries on system boot menu)
Old 09-13-2009, 11:23 PM   #3
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Reformat or delete the partitions where your broken oses are present and remove entries from grub

Old 09-14-2009, 01:12 AM   #4
Registered: Jul 2009
Location: Columbus, OH, USA
Distribution: Ubuntu 12.04; Knoppix 7
Posts: 122

Original Poster
Rep: Reputation: 16
Please assume that I know nothing. Precisely how do I do all that? I mean, like, hold my hand and walk me through step-by-step.
Old 09-14-2009, 03:09 AM   #5
Registered: Oct 2007
Location: London UK
Distribution: Fedora Core 17
Posts: 296

Rep: Reputation: 32
The step by step stuff is at and its great.

One point thats not obvious until you've got into trouble with it: the MBR (Master Boot Record) is the first bit of your master hard disk (as opposed to slave if you have others).

When you turn on the 1st software thats read is on your motherboard (ie the BIOS) that hands over to where you've told it to- eg CD if present, if not then to the MBR.

The MBR under GRUB is set up to pass the ball to wherever GRUB has told it to- and this is important- if you configured grub automatically, its the /boot/grub/menu.lst on whatever partition you last installed your root directory on. So when you add another linux OS, it rewrites the MBR to ignore the previous menu.lst and use the entries in the new one.

Grub will have detected all your other vmlinuz files and put them on as entries so it will seem to you that its simply added your new OS. No it hasn't. Its written a whole new menu.lst.

I'm about to do what you're doing. I have to delete an OS that I added later, so I'll be reverting to the menu.lst that was written earlier. The MBR will no longer refer to it. So if I just delete the partition, then afaik I can't boot automatically. EDIT: Have now completed the process.

What I have to do (and you as well I think) is this:
please don't try this until you have comments from LQ people who've done this successfully, I'm feeling my way hereEDIT: no, go ahead, just read on.

EDIT start with
fdisk -l
and make a note of all the partitions it shows you. This gives you the partition table before you weed out the partitions you don't want.
Deletion of partitions and moving/resizing the ones you are keeping takes ages. Get fully backed up first, you might lose all your data if power fails halfway through a move.
Then fdisk again to see the new table. You will find that eg sda7 is now sda4. THIS IS VERY IMPORTANT.

At this stage, grub will probably not work on reboot, because the entry in the MBR has probably either moved or no longer exists.

Into terminal, either sudo before each command or su root.
localhost# grub
grub> root(hd0,[number of the partition containing the valid menu.lst MINUS ONE]
grub> setup(hd0)
grub> quit
EDIT:before the root command, you could (from grub prompt)
find /boot/grub/stage1
. This will list any partition that has the menu.lst in the right place, in grub naming style. So /dev/sdb3 would be (hd1,2).

You can do this either from within your OS or from a live CD although the tutorial assumes that your OS is down, so you would have used a live CD to get in.

Watch that device drive protocol. Under /dev you will see hda1, hda2, or sda1, sda2 etc. In grub its hd0,0, hd0,1, whether its hd or sd.

Again a word of caution- I'm picking this stuff up from various sources and haven't had to do it for real- yet!EDIT
No, its done. Now the rest:
3 things:
1 You have to rewrite the MBR as above to point it to the correct MBR. The name of the valid partition might have changed.
2 menu.lst might now have incorrect references. Eg, if you have deleted a partition before the one that contains the kernel you are using, the /dev/sd[whatever] reference in menu.lst is now wrong. You need that sd number to give the device node that contains the kernel you want. I suggest that, while you are in a working OS, and after removing the redundant partitions, you get into the partition that you believe has the OS you want. You might need to mount it- please read up elsewhere how to do that. When you are sure, write down the device node (the /dev/sd{} entry) and convert it to grub style (hd{},{}), you will need both in order to correct menu.lst. Again, I would recommend you backup the menu.lst before altering it. And use vim or gedit. If not sure, research this first.
3 You might find that the partition containing your home files has gone. All that has happened, in fact, is that the "mount point" remains (/home/yourname) but the partition has a different name! So you need to go to /etc/fstab and change the line that contains the wrong mount information. if it read /dev/sda8 before, it might need, eg, /dev/sda6 now. That's why you need to make a note of the correct partition name.
I hope this helps you and anyone else looking for this information.

Last edited by sonichedgehog; 09-17-2009 at 12:24 PM. Reason: Sorted!
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What other operating systems do you know about? oskar General 27 10-21-2008 12:46 PM
two operating systems harbey altai Linux - Newbie 7 05-07-2008 06:11 AM
Other Operating Systems? phantom_cyph General 30 01-08-2008 05:39 AM
3 Operating Systems James_the_Great Linux - Newbie 10 08-23-2006 06:40 PM
two operating systems at once scales Linux - Newbie 1 08-12-2006 11:40 PM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:45 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration