LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-28-2014, 12:37 PM   #1
julianvb
Member
 
Registered: Apr 2009
Posts: 390

Rep: Reputation: 3
Removing First-Installed OS from Linux Dual-Boot System


Early this year I installed Linux Mint 11 first on a computer after I replaced its defective hard drive and subsequently I added Ubuntu 12.04 to the system. I would like to know how to remove Linux Mint 11 properly. Any help will be much appreciated.

julianvb
 
Old 08-28-2014, 12:40 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,265

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
i would boot up something like gparted live-usb and delete the partitions i didnt want.
 
1 members found this post helpful.
Old 08-28-2014, 12:51 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
But first, boot into Ubuntu and, as root, run "grub-install /dev/sda" without quotes. That will assure that the Ubuntu grub first stage is written to the MBA and you can continue booting Ubuntu without any problems while you decide what to do with the Mint partition(s).

With regard to the Mint partition, you could:
a. reformat the partition and install another distro.
b. delete the Mint partition and grow the Ubuntu partition to take up the free space.

Bear in mind that any partition operations should be done on unmounted partitions, using something like Gparted running as a livecd.

Last edited by bigrigdriver; 08-28-2014 at 12:56 PM.
 
1 members found this post helpful.
Old 08-28-2014, 01:10 PM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Before removing anything run
Quote:
sudo fdisk -l
to list your current partitions.
Then run
Quote:
cat /etc/fstab
The last command is run from the OS that you want to keep.

The importance of fstab is that if any of the partitions from linux mint are in the extended partition before the Ubuntu's partitions you'll need to edit fstab accordingly.
For instance, if you have sda 5, 6, 7, 8 & remove sda5 & 6,
sda7 becomes sda5 & sda8 becomes sda6.

As far as removing linumint partitions they can be done from within Ubuntu. Keep in mind that installing grub & editing fstab has to be done before shutdown or reboot or your system will not boot.
Don't forget to update-grub.

Last edited by EDDY1; 08-28-2014 at 01:16 PM.
 
1 members found this post helpful.
Old 08-29-2014, 01:50 PM   #5
julianvb
Member
 
Registered: Apr 2009
Posts: 390

Original Poster
Rep: Reputation: 3
Hi, Everyone,

Thank you so much for your good advice. I'll certainly put it to use.

bigrigdriver,

Do you mean to run Gparted from Ubuntu Live CD in the following instruction?

"Bear in mind that any partition operations should be done on unmounted partitions, using something like Gparted running as a livecd."

julianvb

Last edited by julianvb; 08-31-2014 at 12:53 AM.
 
Old 08-29-2014, 03:48 PM   #6
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,635

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
Personally i'd just boot the preferred OS
Delete/wipe the partitions related to the un-desired
The run update-grub

If don't see what I expect .. do what bigrigdriver suggested ..

Then again.. unless I needed the space, I might leave it there.. as a backup

in the pasted i've tended to 'dual boot' linux/linux , alternating old/new
Eventually the old gets s new Linux installed over it, making it the 'new' new
When happy.. the now old is either 'left as is', or I use the partitions for 'junk'

Been a while since I've done that, I've found Debian 'rolling release' model to be very stable (I currently track testing (Jessie at time of touching a touch screen) )
 
Old 08-29-2014, 04:02 PM   #7
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
update-grub alone will not help if os being removed is the first to be installed. Make sure to edit fstab or recovery will be more difficult
 
Old 08-29-2014, 04:14 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,654

Rep: Reputation: 1782Reputation: 1782Reputation: 1782Reputation: 1782Reputation: 1782Reputation: 1782Reputation: 1782Reputation: 1782Reputation: 1782Reputation: 1782Reputation: 1782
Less potential for problems if you just format the partition on which you have Mint and use it for data because if you delete that partition, it will change the partition numbers of other higher numbered partitions. Grub2 is probably installed from Ubuntu as it was the last installed but you should verify that as suggested by bigrigdriver and the post by EDDY1 explains the problems with deleting partitions.
 
1 members found this post helpful.
Old 08-29-2014, 04:21 PM   #9
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,635

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
Quote:
Originally Posted by EDDY1 View Post
update-grub alone will not help if os being removed is the first to be installed. Make sure to edit fstab or recovery will be more difficult
but the last probably wrote grub to the mbr.

But you are right, I left many details out.

Can you please explain the red , it makes little sense to me
 
Old 08-29-2014, 04:30 PM   #10
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
You can erase sda2, sda3 & sda4 as lo.g as they don't contain logical partitions & are not part of the Os that controls gru & MBR.
Logical partitions when erased:
If you remove sda5 the next partition will be renamed to sda5.
If you have vbox
start it up with gparted live
Create partitions on it
1 primary & 1 extended with multiple logical parts
Remove sda5 & reboot
View the new results
If sda5 changes the part # it can affect the fstab especially if system is not using UUID. If Ubuntu 12.04 is using UUID maybe OP will be ok.

Last edited by EDDY1; 08-29-2014 at 04:35 PM.
 
Old 08-29-2014, 05:38 PM   #11
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,635

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
Question

Quote:
Originally Posted by EDDY1 View Post
You can erase sda2, sda3 & sda4 as lo.g as they don't contain logical partitions & are not part of the Os that controls gru & MBR.
Logical partitions when erased:
If you remove sda5 the next partition will be renamed to sda5.
If you have vbox
start it up with gparted live
Create partitions on it
1 primary & 1 extended with multiple logical parts
Remove sda5 & reboot
View the new results
If sda5 changes the part # it can affect the fstab especially if system is not using UUID. If Ubuntu 12.04 is using UUID maybe OP will be ok.
Dude! Are you 'drunker' than I?
That makes for little sense
 
Old 08-29-2014, 05:40 PM   #12
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Try it & see
Test in virtualbox

No haven't had 1 but I'll bet you the next 1 that logical partition /dev/# changes after removing the /dev/# preceeding it.

Last edited by EDDY1; 08-29-2014 at 05:44 PM.
 
Old 08-29-2014, 06:05 PM   #13
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,635

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
Quote:
Originally Posted by EDDY1 View Post
Try it & see
Try what?
Quote:
Originally Posted by EDDY1 View Post
Test in virtualbox
Test what?
I know that unless 'dodged' a typical Linux disto will install its own grub

Quote:
Originally Posted by EDDY1 View Post
No haven't had 1 but I'll bet you the next 1 that logical partition /dev/# changes after removing the /dev/# preceeding it.
what?


Granted, I'm not sober.. but I'm not so far gone as to not understand that what you wrote makes little sense.

Last edited by Firerat; 08-29-2014 at 06:08 PM.
 
Old 08-29-2014, 06:05 PM   #14
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Deleting a Partition
http://gparted.org/display-doc.php?n...lete-partition
Read yellow warning.
However it does say that using UUID's avoids the problem while still changi.g /dev names.

Last edited by EDDY1; 08-29-2014 at 06:31 PM.
 
Old 08-30-2014, 06:51 AM   #15
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,635

Rep: Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749Reputation: 749
Eddy1, please accept my apologies,
I understand what you meant now.

It has been a long time since I saw a distro default to 'hard coded' /dev/sdaX
UUID seems to be the 'normal', and for good reason (the pitfall you pointed out)
 
  


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
Using qemu to boot a full hardware installed Windows partion on dual boot system dwmolyneux Linux - General 8 05-13-2012 01:11 PM
Removing Ubuntu with a dual boot system with Windows 7 scottpioso General 8 09-02-2011 10:48 AM
removing umbuntu from dual boot system leow Linux - Newbie 4 10-02-2008 06:32 PM
Has anybody successfully installed a windows/linux dual boot system on a Compaq PC? bugsbunny Linux - Newbie 16 04-03-2004 02:24 PM
Removing Windows partition from dual-boot system sjkirkpatrick Linux - Newbie 1 07-12-2002 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:58 AM.

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