LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 06-21-2011, 07:49 AM   #1
Blackened Justice
Member
 
Registered: Jun 2011
Posts: 82

Rep: Reputation: Disabled
Linux installations leaving behind 4 GB swap partitions


I've installed some Linux distributions over the past few weeks, and I've recently noticed that previous installations of Linux have left my hard drive cluttered with numerous 4 GB swap partitions. I've since deleted them, but is there any way to avoid this a priori in the future?
 
Old 06-21-2011, 08:05 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Please note that you don't need a separate swap partition for each linux distro. It can be shared by systems. For example, If you dual/triple boot, there's no need to create more than 1 swap filesystem:
eg.

/dev/sda1 Slackware
/dev/sda2 SWAP
/dev/sda3 Debian
/dev/sda4 Arch

Each distro can utilise /dev/sda2 as swap filesystem
I hope it makes sense.
 
Old 06-21-2011, 10:44 AM   #3
Blackened Justice
Member
 
Registered: Jun 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
I'm not installing simultaneous OSs, I install a distribution and then when I install the next one, I choose to install over the current one.
 
Old 06-21-2011, 11:06 AM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
Originally Posted by Blackened Justice View Post
I'm not installing simultaneous OSs, I install a distribution and then when I install the next one, I choose to install over the current one.
That's fine. It was just an example. Just make sure you don't CREATE a new swap partition each time you install a new distro. Use the one that you created during the previous installation.
 
Old 06-21-2011, 11:17 AM   #5
Blackened Justice
Member
 
Registered: Jun 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sycamorex View Post
That's fine. It was just an example. Just make sure you don't CREATE a new swap partition each time you install a new distro. Use the one that you created during the previous installation.
Hmm, how can I control if the installation will or won't create a new swap partition? Do I have to select custom partition options instead of just selecting the overwrite option? Shouldn't the overwrite option use the existing partition by default?
 
Old 06-21-2011, 11:19 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,679

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
It depends on the distribution and the options available during the installation. The manual/custom partition option will allow one to create and assign partitions as desired and use the same swap. If you select automatically create partitions the installer may not search for or use existing partitions.
 
Old 06-21-2011, 11:30 AM   #7
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
I always do manual setup, but I'm surprised that the automatic option doesn't always detect the existing swap system.
 
Old 06-21-2011, 11:38 AM   #8
Blackened Justice
Member
 
Registered: Jun 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
Okay, thank you for the explanation, I'll do a manual installation next time

Cheers
 
Old 06-21-2011, 05:17 PM   #9
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
You don't have to do a manual install. Most automatic installs will give you the option to check the partition layout before proceeding. Do it, and delete any existing swap before the install starts.
 
Old 06-22-2011, 10:42 AM   #10
Blackened Justice
Member
 
Registered: Jun 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
Well, I had to reinstall Mint and this time chose the custom partitions option. I think I did everything well, my partitions are nice and tidy as they should be


Cheers
 
Old 06-22-2011, 10:35 PM   #11
Willrandship
Member
 
Registered: Oct 2009
Location: Utah
Distribution: Debian Testing (Wheezy atm.)
Posts: 109

Rep: Reputation: 17
Just make sure you have swap partitions set to mount to the "swap" option, or you'll have to do "sudo swapon sda*" every time you boot. I learned that the hard way. Nothing a simple startup bash scripting can't handle, but still an unnecessary pain.
 
Old 06-23-2011, 04:04 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,679

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
Willrandship,
No need for a startup script, just add the appropriate line to your /etc/fstab.
 
Old 06-23-2011, 11:03 AM   #13
Willrandship
Member
 
Registered: Oct 2009
Location: Utah
Distribution: Debian Testing (Wheezy atm.)
Posts: 109

Rep: Reputation: 17
not an issue anymore anyways, since that particular distro is now gone, thanks to a horrible GRUB-related mistake :P but it's nice to learn new things. I'll keep that in mind.
 
  


Reply



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 Installation vitually, services for Virtual Installations, Partitions LVM Muhammad Shakir Linux - General 1 02-21-2009 06:34 PM
Linux Installation vitually, services for Virtual Installations, Partitions LVM Muhammad Shakir Linux - Distributions 1 02-21-2009 06:29 PM
Linux Installation vitually, services for Virtual Installations, Partitions LVM Muhammad Shakir Linux - Server 1 02-21-2009 06:26 PM
Linux Installation vitually, services for Virtual Installations, Partitions LVM Muhammad Shakir Linux - Newbie 1 02-21-2009 06:25 PM
Linux Installation vitually, services for Virtual Installations, Partitions LVM, Muhammad Shakir Linux - Enterprise 1 02-21-2009 06:24 PM

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

All times are GMT -5. The time now is 10:52 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
Open Source Consulting | Domain Registration