Linux installations leaving behind 4 GB swap partitions
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.
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?
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.
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.
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?
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.
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.