Forum › Forums › New users › New Users and General Questions › [solved] swapfile warning on boot
- This topic has 4 replies, 4 voices, and was last updated May 11-6:08 pm by Anonymous.
-
AuthorPosts
-
May 11, 2021 at 1:04 pm #59229Member
banned
Hi
I made a swapfile and it works. But when booting, I get a warning:
“warn Aktivate swapfile failed”
The swapfile still works. Where is the problem?
Here are the commands I used:
sudo dd if=/dev/zero of=/swapfile bs=1M count=2048 sudo chmod 0600 /swapfile sudo mkswap /swapfile sudo swapon /swapfileThen put this line in fstab:
/swapfile none swap sw 0 0- This topic was modified 1 year, 12 months ago by banned.
May 11, 2021 at 3:09 pm #59239MemberPPC
::I tested the procedure explained here: https://itsfoss.com/create-swap-file-linux/
and it works great, but I did not try adding the swapfile to fstab.
Please note that the file is created without the use of dd,but fallocate in this tutorial:sudo fallocate -l 1G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfileYou can try to live dangerously and activate the swap file only when you think it’s needed, ord add “gksudo swapon /swapfile &” to be run at startup (but you’ll have to always enter you password)…
Try following itsfoss procedure and see if it works for you…
P.
May 11, 2021 at 4:24 pm #59245Forum Admin
Dave
::Not 100% certain but I think your fstab entry needs to read as follows.
/swapfile swap swap defaults 0 0Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
May 11, 2021 at 5:50 pm #59249Memberbanned
::Ok, thanks for the two tips!
@Dave
No, the error came with your version too π But I kept looking π@PPC
I have not tried your code because I read somewhere that it is better to use dd. However, I don’t know why π But I think it works with your version too πNow the solution:
The entry in fstab must be further up, I inserted it at the end. I then found this forum post, see link. Now everything is ok, no warning and swapfile is active π
https://www.antixforum.com/forums/reply/46098/
It was interesting that I only received the warning, but the swapfile was activated anyway. Maybe it was activated later and I missed the log entry?
- This reply was modified 1 year, 12 months ago by banned.
May 11, 2021 at 6:08 pm #59253Anonymous
::thanks for following up to report the solution
(and, a hats off salute to @Askic, for paving the way) -
AuthorPosts
- You must be logged in to reply to this topic.