LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-07-2009, 06:25 PM   #1
Foozah
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Rep: Reputation: 0
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?
 
Old 09-07-2009, 06:41 PM   #2
29t88
Member
 
Registered: Jan 2009
Distribution: CentOS 5.3
Posts: 62

Rep: Reputation: 17
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!
 
Old 09-07-2009, 06:43 PM   #3
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
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.
 
Old 09-07-2009, 06:43 PM   #4
Foozah
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 09-07-2009, 06:47 PM   #5
29t88
Member
 
Registered: Jan 2009
Distribution: CentOS 5.3
Posts: 62

Rep: Reputation: 17
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)
 
Old 09-07-2009, 06:50 PM   #6
Foozah
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by r3sistance View Post
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?
 
Old 09-07-2009, 06:57 PM   #7
29t88
Member
 
Registered: Jan 2009
Distribution: CentOS 5.3
Posts: 62

Rep: Reputation: 17
Lmao, ive got no idea> Ubuntu Version your using =?
So that i can look into Restoring GRUB boot loader
 
Old 09-07-2009, 07:08 PM   #8
Foozah
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Ubuntu 9.04
 
Old 09-07-2009, 07:09 PM   #9
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by Foozah View Post
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

Last edited by r3sistance; 09-07-2009 at 07:11 PM.
 
Old 09-07-2009, 07:13 PM   #10
Foozah
LQ Newbie
 
Registered: Sep 2009
Posts: 8

Original Poster
Rep: Reputation: 0
That isn't in my native language, english. >.<
 
Old 09-07-2009, 07:22 PM   #11
29t88
Member
 
Registered: Jan 2009
Distribution: CentOS 5.3
Posts: 62

Rep: Reputation: 17
Quote:
Originally Posted by r3sistance View Post
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
 
Old 09-07-2009, 07:26 PM   #12
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
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 07:31 PM.
 
Old 09-07-2009, 07:45 PM   #13
DragonSlayer48DX
Registered User
 
Registered: Dec 2006
Posts: 1,454
Blog Entries: 1

Rep: Reputation: 74
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.
 
Old 09-07-2009, 08:00 PM   #14
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
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.
 
Old 09-07-2009, 08:47 PM   #15
DragonSlayer48DX
Registered User
 
Registered: Dec 2006
Posts: 1,454
Blog Entries: 1

Rep: Reputation: 74
Quote:
Originally Posted by r3sistance View Post
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.

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 09:01 PM.
 
  


Reply


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
Linux VS Windows affecting Memory apnorton Linux - Software 2 02-05-2009 07:47 AM
Ubuntu install affecting WinXp return from standby? frznchckn Linux - General 2 03-09-2007 10:21 AM
Upgrade FC without affecting Solaris and Windows zillah Linux - Software 2 01-21-2007 12:18 PM
915 resolution affecting windows xp mnk123 Linux - Laptop and Netbook 1 09-24-2006 01:56 PM
How to Change Windows without affecting GRUB or Ubuntu?? crash_override_me Ubuntu 5 10-19-2005 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:35 PM.

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