# Installer: swapfile as alternative of swap partition, including hibernation

**URL:** <https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553>\
**Category:** Features\
**Created:** [July 30, 2023, 7:25pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553 "2023-07-30T19:25:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [July 30, 2023, 7:25pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/1 "2023-07-30T19:25:26Z")

</div>

This thread is made for the people to subscribe / follow it if they wants to know the updates on the installer features

* * *

_mentions: @triantares @TheTechRobo @linux23dragon @yoda @Franc @zbd ..._

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [July 30, 2023, 7:27pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/2 "2023-07-30T19:27:17Z")

</div>

Now the installer will automatically create a swap file in the root partition if there's enough space to add it and there was not a swap partition added, this allows to:

- able to hibernate the computer
- freeing some ram usage by having swap featured (thanks to the very special elive confs for swap which doesn't bottleneck like by default in other distros)

If you want to try it, just run the installer which will be automatically updated

Note: must have "same amount as RAM + 10 gb" of **free space** in the root partition in order to be automatically added, the swapfile size will be the same amount of RAM + a few MB more. Also this will only be added if you don't have an already swap partition to use

---

<div class="post-metadata">

**Author:** ![Franc](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/franc/32/729_2.png) [@Franc](https://forum.elivelinux.org/u/Franc)\
**Post date:** [July 30, 2023, 10:45pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/3 "2023-07-30T22:45:37Z")

</div>

Hello!

Am I misunderstood something or:  
-What if having 1Go of RAM? Needs 11Go swap??? Always reads about swap=RAM or =RAMx2..?  
-As your write it, what if having 64Go of RAM? Means 74Go of swap???  
🤔

Salutations!

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [July 30, 2023, 11:07pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/4 "2023-07-30T23:07:33Z")

</div>

edited, check if is more clear now

---

<div class="post-metadata">

**Author:** ![linux23dragon](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/linux23dragon/32/2785_2.png) [@linux23dragon](https://forum.elivelinux.org/u/linux23dragon)\
**Post date:** [July 31, 2023, 8:09am UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/5 "2023-07-31T08:09:24Z")

</div>

> [@Thanatermesis](#):
>
> Now the installer will automatically create a swap file in the root partition if there's enough space to add it

I just reverted back to Elive Retrowave, and found that the swap partition was correctly installed automaticly.

Thank you

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [July 31, 2023, 8:01pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/6 "2023-07-31T20:01:44Z")

</div>

> [@Franc](#):
>
> having 64Go of RAM? Means 74Go of swap???

No, I read that it minimally requires 10Gb more of free diskspace than available RAM for the swapfile to automatically be created.  
I personally think RAM+10Gb is a bit over the top if there's 64Gb of RAM ....... for hibernation 2Gb should easily suffice. 🤔

So IMO a fixed **max 4GB swapfile** size should be more than enough for hibernation on the current Elive systems.  
That would mean needing 14Gb extra space in the root file system on a freshly installed system. Which still sounds a lot but makes sense. 🤔

---

<div class="post-metadata">

**Author:** ![TheTechRobo](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thetechrobo/32/3394_2.png) [@TheTechRobo](https://forum.elivelinux.org/u/TheTechRobo)\
**Post date:** [August 1, 2023, 4:24am UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/7 "2023-08-01T04:24:48Z")

</div>

> [@Thanatermesis](#):
>
> Note: must have "same amount as RAM + 10 gb" of **free space** in the root partition in order to be automatically added, the swapfile size will be the same amount of RAM + a few MB more. Also this will only be added if you don't have an already swap partition to use

Then please stop the installer's automatic partitioning from giving me a 40GiB root partition ://

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [August 1, 2023, 6:49am UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/8 "2023-08-01T06:49:29Z")

</div>

Wait what? You want it bigger or smaller? 😶

For a first install including a swap-file, you'd need 8-9Gb Elive-system + swapfile-space (4gb+10) = **23Gb as an absolute minimum.**

---

<div class="post-metadata">

**Author:** ![TheTechRobo](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thetechrobo/32/3394_2.png) [@TheTechRobo](https://forum.elivelinux.org/u/TheTechRobo)\
**Post date:** [August 1, 2023, 4:57pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/9 "2023-08-01T16:57:33Z")

</div>

> [@triantares](#):
>
> Wait what? You want it bigger or smaller? 😶

Bigger... my root partition keeps filling up.

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [August 1, 2023, 5:16pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/10 "2023-08-01T17:16:48Z")

</div>

Well you should clean out the "/var" directory more often or ...... set up a separate partition and mount it as "/var".

Or do you have "/home" in there as well?

I mean I've got an upgraded 3.8.30 here with external programs in "/opt" and a lot installed as .deb apps and its about 18G (including "/var"). 😶

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [August 1, 2023, 11:45pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/11 "2023-08-01T23:45:52Z")

</div>

> [@TheTechRobo](#):
>
> Then please stop the installer's automatic partitioning from giving me a 40GiB root partition ://

You mean to mix the /home and the root partition in a single one? This can be a wise option too (we don't necessarily need a separated /home at all)

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [August 2, 2023, 4:42am UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/12 "2023-08-02T04:42:10Z")

</div>

> [@Thanatermesis](#):
>
> (we don't necessarily need a separated /home at all)

**That would be very unwise IMO.**  
If you do a full fresh install with /home in the same partition as "/", you lose all your personal stuff because it gets reformatted.  
Along the same line: We might as well remove the "persistent" option from the live-USB and keep one partition....it isn't nescessary. :shocked:

---

<div class="post-metadata">

**Author:** ![linux23dragon](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/linux23dragon/32/2785_2.png) [@linux23dragon](https://forum.elivelinux.org/u/linux23dragon)\
**Post date:** [August 2, 2023, 1:46pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/13 "2023-08-02T13:46:43Z")

</div>

I prefer separate swap partition in automatic mode, while installing Elive

---

<div class="post-metadata">

**Author:** ![TheTechRobo](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thetechrobo/32/3394_2.png) [@TheTechRobo](https://forum.elivelinux.org/u/TheTechRobo)\
**Post date:** [August 2, 2023, 9:58pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/14 "2023-08-02T21:58:44Z")

</div>

> [@triantares](#):
>
> If you do a full fresh install with /home in the same partition as "/", you lose all your personal stuff because it gets reformatted.

Isn’t there upgrade mode?

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [August 2, 2023, 10:01pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/15 "2023-08-02T22:01:09Z")

</div>

Yes, there is but sometimes there's so much cruft and stuff gathered that a fresh install is needed.  
Especially if it's for testing.

---

<div class="post-metadata">

**Author:** ![TheTechRobo](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thetechrobo/32/3394_2.png) [@TheTechRobo](https://forum.elivelinux.org/u/TheTechRobo)\
**Post date:** [August 3, 2023, 3:30am UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/16 "2023-08-03T03:30:25Z")

</div>

IMO if there's cruft in the system as a whole, the home directory isn't going to be in a great state either.

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [August 3, 2023, 7:06am UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/17 "2023-08-03T07:06:43Z")

</div>

Yeah, but that is simply solved by creating another new user with default $HOME settings.

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [August 3, 2023, 5:31pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/18 "2023-08-03T17:31:59Z")

</div>

> [@triantares](#):
>
> If you do a full fresh install with /home in the same partition as "/", you lose all your personal stuff because it gets reformatted.

Elive doesn't works on that way:

- if you want to keep your user data, just use the upgrade mode of the installer (this is considered a full reinstall + home stuff, in the good way)
- if you want to do a "full fresh install" (as you mention), this means erasing everything

Note that we are debating if should be better to integrate the /home into / for simplicity, this will save cases like the one of @TheTechRobo that finds his root full, and Elive doesn't needs a separate /home because it controls it quite good... On the other hand, if a user is more "expert" and want to customize things on its own (@triantares case of separated /home) then you don't need to use the **auto** install mode but the custom (manual partitioning) one, also remember that you are arguing about advanced usages of the /home which still, a user that needs "auto" mode doesn't knows/understand how to manage a separated /home or for what. Remember that in the end, the installer always have "upgrade mode" which does a clean install without damaging the home directory & users & settings

> [@triantares](#):
>
> Along the same line: We might as well remove the "persistent" option from the live-USB and keep one partition....it isn't nescessary. :shocked:

What? 🤔 This is not the point of the persistence boot: [https://www.youtube.com/watch?v=9EfqL8D76xY&pp=ygUiZWxpdmUgcGVyc2lzdGVuY2UgdHJhdmVsIGxpbnV4IHVzYg%3D%3D](https://www.youtube.com/watch?v=9EfqL8D76xY&pp=ygUiZWxpdmUgcGVyc2lzdGVuY2UgdHJhdmVsIGxpbnV4IHVzYg%3D%3D)

> [@linux23dragon](#):
>
> I prefer separate swap partition in automatic mode, while installing Elive

this still the actual case 🙂

---

<div class="post-metadata">

**Author:** ![triantares](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/triantares/32/2550_2.png) [@triantares](https://forum.elivelinux.org/u/triantares)\
**Post date:** [August 3, 2023, 7:05pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/19 "2023-08-03T19:05:15Z")

</div>

> [@Thanatermesis](#):
>
> What? 🤔 This is not the point of the persistence boot:

I was being "tongue in cheek" there. :madness:

---

<div class="post-metadata">

**Author:** ![TheTechRobo](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thetechrobo/32/3394_2.png) [@TheTechRobo](https://forum.elivelinux.org/u/TheTechRobo)\
**Post date:** [September 7, 2023, 8:10pm UTC](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553/20 "2023-09-07T20:10:22Z")

</div>

> [@Thanatermesis](#):
>
> On the other hand, if a user is more "expert" and want to customize things on its own (@triantares case of separated /home)

What if there was an option for a separated /home like how Debian does it?

[Next page](https://forum.elivelinux.org/t/installer-swapfile-as-alternative-of-swap-partition-including-hibernation/3553.md?page=2)
