[solved] swapfile warning on boot

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.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #59229
    Member
    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 /swapfile
      

      Then put this line in fstab:

      
      /swapfile    none    swap    sw      0 0
      
      • This topic was modified 1 year, 12 months ago by banned.
      #59239
      Member
      PPC
        Helpful
        Up
        0
        ::

        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 /swapfile

        You 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.

        #59245
        Forum Admin
        Dave
          Helpful
          Up
          0
          ::

          Not 100% certain but I think your fstab entry needs to read as follows.
          /swapfile swap swap defaults 0 0

          Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

          #59249
          Member
          banned
            Helpful
            Up
            0
            ::

            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.
            #59253
            Anonymous
              Helpful
              Up
              0
              ::

              thanks for following up to report the solution
              (and, a hats off salute to @Askic, for paving the way)

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.