Deleting 1 of 2 Ubuntus Without Affecting Windows and Other Ubuntu
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Deleting 1 of 2 Ubuntus Without Affecting Windows and Other Ubuntu
The topic says the most of it.
I am writing an instruction manual for dual booting Ubuntu for English class. I couldn't find another computer to install Ubuntu on, so I installed it again on my computer (to make sure I got the step by step procedures right). I now have Windows Vista, Ubuntu1, and Ubuntu2. I want to delete Ubuntu2 and return that space to my vista drive.
Most of the uninstall ways I have found here are for COMPLETELY removing Ubuntu and Grub. I want to keep grub and my first Ubuntu. Anyone out there able to help a newbie out on this problem?
Ouch, this could be tricky > Do You Have Webmin Installed On ubuntu 1? I know if you go into that you can change what grub see's you could get rid of ubuntu 2 in grub, then delete the partition...
Im not even sure that it would work> If u just deleted the ubuntu 2 partition tho grub would continue to search and u would have errors booting, so get webmin and make sure grub stops searching for Ubuntu 2 before you go whipping the partition.
If you are going to recover the full space you will probably have to nuke the version of grub on the 2nd installs grub, however you should be able to place a Ubuntu CD in afterwards and restore the 1st installs grub as the primary bootstrap loader. Their maybe ways to fix this but I thought I would mention that should things go wrong, you should be able to fix it, I would look up how you fix it before attempting anything.
Okay, this definitely sounds doable so far. I'm going to look into this and do this if no one has a better way to do it by tomorrow. Thanks to you and everyone else that may reply! Super helpful community.
hmm u may be right about that ... But Webmin Can Control The System> It chooses What Grub Looks for You Delete ubuntu 2 from the GRUB bootloader then delete the partition would that work? (Ive had similar problems before)
however you should be able to place a Ubuntu CD in afterwards and restore the 1st installs grub as the primary bootstrap loader.
How do I go about this? The Ubuntu menu has:
Try Ubuntu without any change to your computer
Install Ubuntu
Check disc for defects
Test memory
Boot from first hard disk
How do I go about this? The Ubuntu menu has:
Try Ubuntu without any change to your computer
Install Ubuntu
Check disc for defects
Test memory
Boot from first hard disk
Would I take the "Check disc for defects" route?
From memory, Check disc for defects refers to the installation media, basically a CD Check
Not all the methods here are applicable but one or two of them should work.
To quote from their, I believe the following is likely to be the best route...
Quote:
1. Boot with any live CD (I've done it with Knoppix 3.x and Ubuntu)
2. Get a root shell and make a folder (mkdir ubuntu)
3. mount the root (/) partition of ubuntu (e.g. mount /dev/hdb ubuntu if you have two disks)
4. chroot the mounted partition (chroot ubuntu)
5. grub-install /dev/hda [1]
5. Exit the shell
6. Reboot
Last edited by r3sistance; 09-07-2009 at 08:11 PM.
Not all the methods here are applicable but one or two of them should work.
To quote from their, I believe the following is likely to be the best route...
Urrr, This Could Work But From Live CD you Cant Get A Shell Prompt Can You? Other Then The Gnome *Terminal* Prompt.
Witch Isnt Native Commands Anyways.
1. Boot with any live CD (I've done it with Knoppix 3.x and Ubuntu)
2. Get a root shell and make a folder (mkdir ubuntu)
3. mount the root (/) partition of ubuntu (e.g. mount /dev/hdb ubuntu if you have two disks)
4. chroot the mounted partition (chroot ubuntu)
5. grub-install /dev/hda [1]
5. Exit the shell
6. Reboot
The live terminal should have all the necessary commands for this procedure as the grub-install should be available as should the mount commands and a method to make yourself a super user (I know you can make yourself a super user in the live part, I have had to do it before in the past)
Basically load up the live version of Ubuntu that allows you to try before installing.
From here you open up a terminal and make yourself a root session (i.e sudo /bin/bash)
Create a directory within /mnt/ to mount the / filing system of your primary installation too.
Then chroot that mounted partition and finally run grub-install on the partition itself (ie it's reference in /dev/ not the mounted parition reference) to get grub to reinstall.
Once completed reboot the box and you should be done.
Last edited by r3sistance; 09-07-2009 at 08:31 PM.
IIRC, all you need to do is run a Linux partition manager (like GParted). You will be giving the free space to Ubuntu, not Vista, but simply delete the partition on which 'Ubuntu 2' is installed, then resize the partition on which 'Ubuntu 1' is installed to take up the free space.
Someone else can correct me if I'm wrong, but AFAIK, there's no feasible way to give the space back to Vista, outside of formatting the drive and reinstalling everything from scratch.
That's right but not the actual issue at hand. The problem is the files stored on /boot/grub/grub.conf will be deleted if/when you delete the partition leaving the computer in a state where it can't boot/reboot because configuration files that grub uses no longer exist.
That's right but not the actual issue at hand. The problem is the files stored on /boot/grub/grub.conf will be deleted if/when you delete the partition leaving the computer in a state where it can't boot/reboot because configuration files that grub uses no longer exist.
Hmmm... I could've sworn that the OP's question was on removing one of the installations of Ubuntu. My apologies for assuming everyone knows you'd also need to edit the Grub configuration... Silly me.
Code:
sudo gedit /boot/grub/menu.lst
Make sure the changes are made under Ubuntu 1 before removing Ubuntu 2.
BTW- Grub is in the MBR, not the boot partition...
Last edited by DragonSlayer48DX; 09-07-2009 at 10:01 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.