LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Deleting 1 of 2 Ubuntus Without Affecting Windows and Other Ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/deleting-1-of-2-ubuntus-without-affecting-windows-and-other-ubuntu-753420/)

Foozah 09-07-2009 06:25 PM

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?

29t88 09-07-2009 06:41 PM

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.

Hope this helps!

r3sistance 09-07-2009 06:43 PM

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.

Foozah 09-07-2009 06:43 PM

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.

29t88 09-07-2009 06:47 PM

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)

Foozah 09-07-2009 06:50 PM

Quote:

Originally Posted by r3sistance (Post 3673609)
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

Would I take the "Check disc for defects" route?

29t88 09-07-2009 06:57 PM

Lmao, ive got no idea> Ubuntu Version your using =?
So that i can look into Restoring GRUB boot loader

Foozah 09-07-2009 07:08 PM

Ubuntu 9.04

r3sistance 09-07-2009 07:09 PM

Quote:

Originally Posted by Foozah (Post 3673614)
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

I would look here http://ubuntuforums.org/archive/index.php/t-24113.html

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

Foozah 09-07-2009 07:13 PM

That isn't in my native language, english. >.<

29t88 09-07-2009 07:22 PM

Quote:

Originally Posted by r3sistance (Post 3673627)
From memory, Check disc for defects refers to the installation media, basically a CD Check

I would look here http://ubuntuforums.org/archive/index.php/t-24113.html

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

r3sistance 09-07-2009 07:26 PM

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.

DragonSlayer48DX 09-07-2009 07:45 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.

r3sistance 09-07-2009 08:00 PM

dragonslayer48dx,

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.

DragonSlayer48DX 09-07-2009 08:47 PM

Quote:

Originally Posted by r3sistance (Post 3673659)
dragonslayer48dx,

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. :doh:

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...


All times are GMT -5. The time now is 01:47 AM.