I am sorry for the inconvenience!
I tried to replicate the steps above and, even though they follow the wiki, to my surprise, it resulted in the same error.
However I tried with the following steps and it works on my end:
1. sudo -s
2. rm /swap/swapfile
3. chattr +C /swap
4. dd if=/dev/zero of=/swap/swapfile bs=1M count=512 status=progress
(change the count= to the size you wish)
5. chmod 0600 /swap/swapfile
7. mkswap /swap/swapfile
8. swapon /swap/swapfile
YES! it works. So there is need to be in “root” and not to sudo each command… OK, strange but indeed it works. Good intuition… or experience.
And @pebcak , don’t be “sorry for the inconvenience”. You are helping, and as they say in India (and other places) the “Path matters more than the result”. So the fact that you take the time to answer is already a great help !
All the best.
Not really, it was just for saving on typing sudo each time.
I take it as a complement! Hopefully both!
I had to try it somewhat differently than what we did before and it just worked!
That’s a great lesson! Thank you for that!
I am so grateful and so indebted towards this community so the little I can do to contribute is to help around the forum. I am mutually benefited by doing so as well. It makes me to do some research, reading wiki articles and little by little enlarging my Linux experience.
Have a nice weekend @pierrep56!
And all the best for you as well!