Adding swap /hibernation after install

Although if you follow the Arch Wiki, it actually does explain (mostly) what each step is doing. Not always WHY you need to do it (such as the WHY do you need a swap_file_offset and the like), but it does say exactly WHAT you’re doing so you can understand it.

It’s hard to know when you read the wiki and it really doesn’t tell you. It only gives you parts of the equation and thinks you know the rest of it. That’s the problem with the Arch wiki.

The Arch Wiki is a brilliant resource, you just need to learn how to use it effectively.

I tried to point you in the right direction rather than just give the exact commands because I personally believe it benefits you more.

Everyone is trying to help, just in different ways.

That is why you test things in a VM first. Trial and error is probably more important than just reading as it forces you to troubleshoot when something doesn’t work.

Arch wiki won’t spoon feed you, but it contains everything you need, you just need a little persistence.

1 Like

I know @ricklinux for a long time and not everyone does get knowledge from a-z you can learn also in other ways.

1 Like

My biggest problem is doing it and remembering it. If i do it enough times maybe?

That is my point though, copy and paste is not really learning.

It is the old teach someone to fish rather than catching fish for them conundrum.

Users can still create threads with the WHY questions, nobody is suggesting the Arch Wiki should be used in solitary isolation. Better quality help can be given in this way than by giving them a copy and paste solution that is not understood.

Anyway, each to their own. Like I said we are all trying to help, just in our own ways.

Take notes. I have a terrible memory and rely on the detailed notes I have taken over the years.

I use Cherrytree for this, but you can you whatever note taking app you prefer.

It is a good habit to get into.

This is also why learning concepts is more important than commands, they are easier to remember.

1 Like

I’ll admit with stuff like this, I’ve never remembered a single thing. I still have to google “swap fstab entry” EVERY TIME I set up a swap file to get the “none swap defaults” portion right.

But I figure since we all pretty much carry a computer with us 24/7, as long as I remember that I need to do the thing, google can find how to do the thing properly for me. :smiley:

3 Likes

command line parameter “resume_offset=” allowing us to specify
the offset, in <PAGE_SIZE> units, from the beginning of the partition pointed
to by the “resume=” parameter at which the swap header is located.

Source: https://www.lkml.org/lkml/2006/9/23/41

I do not find any information if this is needed or optional? But looks like needed for hibernating to get the info on where to find the swapfile?

The swapfile implementation on calamares seems to not create resume_offset= entry on swapfile installs… but it also do not have the same selection as for swap partition where you can choose “swap with hibernate”

Feel free to discuss such thing: open another post to do so.

As it is not helping the topic to get solved :wink:
You could give info instead or link to the parts of the Archwiki and give background info on what it provides.

1 Like

resume=UUID points to the device/volume which harbors the swapfile
resume_offset points to where on that device the file is to be found

??

The arch wiki is a convoluted masterpiece of an oxymoron. I always wonder what the attraction is to figuring out how to set up your os is more fun and takes up more of your time then actually using it. Yes this is a serious forum but I think we try to have fun as well. It should not feel like work supporting the forum. If @joekamprad or anyone else wants to provide help as they see fit it is their prerogative.

1 Like

Fallocate only works on the LTS kernel. It has since been deprecated on the latest.

As I mentioned in the other thread I don’t bother setting it up anymore I just use hibernator from the AUR.

I had forgotten that you had mentioned this before. I guess it also uses a swap file?

Yes. When I’m home on my computer I can send you a link to the walk thru I used to use so you can know how it’s done and to learn. But realistically, hibernator will setup everything for you either you left a swap partition or need to create a swap file. It can do both.

Sure, anything to learn how to do something else. Sounds easy in comparison.

Here’s the last time I posted it up. I don’t necessarily want to start creating repeat topics for searching later. I just want to note - this will ONLY work on the lts kernel (5.4) fallocate has since been deprecated. You will need to use dd on the newer kernels - there may also be a new command that has replaced fallocate . . . (I’ve never bothered to re-learn, and as a running theme, I tend to do thing the easiest/most efficient way. Therefore I use hibernator.. BUT, there’s a lot to learn in the process here.

2 Likes

It seems to still work (deprecated or not) for me. I just reinstalled last night (an attempt at creating an external bootable NVMe KDE Neon install may have caused me to replace Endeavour with Neon) on my Latitude 7490, and with the latest release kernel it had no issues using a swap file created with fallocate.
I don’t ever even use Hibernate though. I only use swap on 1 machine (this machine it’s already been swapoff’d and deleted, just created it to test), and haven’t used hibernate in nearly 2 years on anything I owned.

1 Like

Good advice if you want to keep your life simple.

For my last install. I installed EnOS first, then Windows. I formatted whole ssd as ext4 (apart from the boot partition). Windows got 120gb on the HDD.
Not the best install experience imo. Even though the other way its possible, I will second what tlmiller76 says. Install windows first.

Awesome. I thought I read somewhere it was once when I had it working fine on the lts kernel but like 5.6 or 5.7 it wouldn’t.

Anyway, that little guide was incredibly helpful. The Arch wiki is . . . well. Very straight forward at explaining things to people who already understand them.

Okay.

So according to @BONK the Arch Wiki is trash; learning and understanding is pointless.

Good to know.