Are swap partitions not needed anymore?
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
Are swap partitions not needed anymore?
I just gave LMDE a whole, freshly formatted 160GB hard drive to install on. I wonder that the installer has not created more than one partition. Not even a swap partition. Nevertheless, hibernating to hard drive works out-of-the-box!
How is this achieved? By creating swap files when needed? If so, where are they placed?
If so, what's the use of creating a swap partition nowadays? Other installers let you explicitly create swap partition.
Greetings,
S.
How is this achieved? By creating swap files when needed? If so, where are they placed?
If so, what's the use of creating a swap partition nowadays? Other installers let you explicitly create swap partition.
Greetings,
S.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Are swap partitions not needed anymore?
Please post the output of;
That is a lower case L at the end the easiest way to do this is simply copy/paste the command to your terminal.
Code: Select all
sudo fdisk -l
Re: Are swap partitions not needed anymore?
Umm.....reallysimplex wrote:the installer has not created more than one partition. Not even a swap partition.
I'd like to see the fdisk too
Linux Mint 21.1 Cinnamon
Re: Are swap partitions not needed anymore?
Seems that I have made some kind of mistake. I looked at the partitions created with gparted, and it showed me only 1 partition. Here is the output you have asked for:
So the installer created one extended partition with 1 swap partition inside ("erweitert" = "extended" in German, 3 times the size of my physical memory).
Sorry, that was my mistake. Nevertehless, hibernating did not work yesterday, I do not know why.
Greetings,
S.
Code: Select all
ziegler@MeinNC10-Debian ~ $ sudo fdisk -l
[sudo] password for ziegler:
Platte /dev/sda: 160.0 GByte, 160041885696 Byte
255 Köpfe, 63 Sektoren/Spur, 19457 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00073eba
Gerät boot. Anfang Ende Blöcke Id System
/dev/sda1 * 1 19076 153219072 83 Linux
/dev/sda2 19076 19458 3068929 5 Erweiterte
/dev/sda5 19076 19458 3068928 82 Linux Swap / Solaris
Sorry, that was my mistake. Nevertehless, hibernating did not work yesterday, I do not know why.
Greetings,
S.
Re: Are swap partitions not needed anymore?
I'm confused
In your first post you said hibernating worked
Now you are saying it doesn't
Is it a Box or a Laptop?
What about Sleep (Suspend)?
In your first post you said hibernating worked
Now you are saying it doesn't
Is it a Box or a Laptop?
What about Sleep (Suspend)?
Linux Mint 21.1 Cinnamon
Re: Are swap partitions not needed anymore?
Yes, i am confused, too.caf4926 wrote:I'm confused
In your first post you said hibernating worked
Now you are saying it doesn't
Is it a Box or a Laptop?
What about Sleep (Suspend)?
It's a subnotebook, Samsung NC-10. Hibernating worked in the first days. Yesterday, after a lot of hibernations, it did not work anymore. Now that I have rebooted the machine, it works again. I have no explanation for this. The subnotebook has 1 GB of physical memory.
Sleep always works... at least until now.
The mistake I did was looking at the partitions with "df" instead of with "fdisk". I overlooked the various "/dev/sda*". Blame it on me. Sorry for this posting. I am always willing to help...
I think that everything is ok, and all mistakes were mine.
But back to my initial question: Are swap partitions still needed? I heard or read that Ubuntu does create files on-the-fly when swap space is needed.
Greetings from Germany,
S.
Re: Are swap partitions not needed anymore?
If you are hibernating you are going to need a /swap. Hard to create a file (a swap file) that will be hibernating and expect it to ever wake up.
Re: Are swap partitions not needed anymore?
I never use hibernate. Mine boots from cold as quickly as coming back from H
Only sleep
Only sleep
Linux Mint 21.1 Cinnamon
Re: Are swap partitions not needed anymore?
Don't you need swap for that too?caf4926 wrote:I never use hibernate. Mine boots from cold as quickly as coming back from H
Only sleep
I wouldn't know, don't use either.
I run boinc and usually just let the bugger run all the time. If I am rebooting it is usually to go play with my other installs. Have to do that or start messing with the one I use all the time. That can lead to breakage. I mean excessive improvements.
Just broke an install today. Sid netboot install. Got it all set for a DE and told it;
Code: Select all
apt-get -t experimental install xfce4
I don't want to brag too much but I am pretty good at breaking things.
Re: Are swap partitions not needed anymore?
@OP you started asking if swap was needed. The answer is Yes (there are some times you might not). And you thought Mint installed without it, but we see it didn't.
Regarding the options for Hibernate and Suspend(Sleep):
I personally don't recommend using Hibernate for the following reasons. It has little if any advantage over a cold boot. If the user also has windows installed, it can prove very problematic if you have hibernated in one system, (forget) and when you resume, allow it to boot the other...
Suspend or Sleep does use some power though, so it's a matter of deciding how that fits your lifestyle/needs.
I can't tell the extent to which each uses swap.
But the swap use in my system (Laptop) increases over time, because I don't reboot very often, maybe once every week or 2. But this is normal, as the system will also be seemingly using most of your RAM (although in reality it's not)
Regarding the options for Hibernate and Suspend(Sleep):
I personally don't recommend using Hibernate for the following reasons. It has little if any advantage over a cold boot. If the user also has windows installed, it can prove very problematic if you have hibernated in one system, (forget) and when you resume, allow it to boot the other...
Suspend or Sleep does use some power though, so it's a matter of deciding how that fits your lifestyle/needs.
I can't tell the extent to which each uses swap.
But the swap use in my system (Laptop) increases over time, because I don't reboot very often, maybe once every week or 2. But this is normal, as the system will also be seemingly using most of your RAM (although in reality it's not)
Linux Mint 21.1 Cinnamon
Re: Are swap partitions not needed anymore?
- I earn my money with IT (programming, giving courses...). It is very important for me that I start the next day exactly where I left the day before.caf4926 wrote: I personally don't recommend using Hibernate for the following reasons. It has little if any advantage over a cold boot. If the user also has windows installed, it can prove very problematic if you have hibernated in one system, (forget) and when you resume, allow it to boot the other...
Suspend or Sleep does use some power though, so it's a matter of deciding how that fits your lifestyle/needs.
- My lifestyle includes the pragma that we should save as much energy as possible around the globe, so I do not want to sleep in winter, I want to hibernate. Latin "hibernare" = "to survive the winter" It's a deeper sleep, with pulse going down to zero beats per minute.
Thank you very much for all your comments. I am interested in improving your "product", just because it gives me something, and I want to give something back.
S.