weixin_39747293
weixin_39747293
2021-01-05 10:55

BerryBoot | Swap File Disabled

Hello, i enabled swap file from DietPi-Config/advanced options/swap file size and put it manual to 100mb and rebooted Writing the command free -m i see that the swap file is not enabled its 0mb How can it be enabled?

Thanks

该提问来源于开源项目:MichaIng/DietPi

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

11条回答

  • weixin_39747293 weixin_39747293 4月前

    i change it to 500mb and i see that is taking the disk space,so my question is is it loading only when needed?

    点赞 评论 复制链接分享
  • weixin_39639965 weixin_39639965 4月前

    Thanks for the report, please paste results:

    
    cat /etc/dphys-swapfile
    systemctl status dphys-swapfile.service
    free -m
    which dphys-swapfile
    
    点赞 评论 复制链接分享
  • weixin_39639965 weixin_39639965 4月前

    Reference: https://github.com/Fourdee/DietPi/issues/1572#issuecomment-369917050

    点赞 评论 复制链接分享
  • weixin_39747293 weixin_39747293 4月前

    i have the picture here from the results

    https://ibb.co/h7RU2n

    点赞 评论 复制链接分享
  • weixin_39639965 weixin_39639965 4月前

    Swapon failed due to IO error.

    Please try with and capture output:

    
    /DietPi/dietpi/func/dietpi-set_dphys-swapfile 512 /var/swap
    

    And if you can:

    
    dmesg | grep swap
    

    Could possibly be a file-system corruption, but we'll know more after the above.

    Your idea to add global error handling is a good one. 👍

    点赞 评论 复制链接分享
  • weixin_39747293 weixin_39747293 4月前

    Here is the capture

    https://image.ibb.co/cYbmF7/2018_03_02_22_02_55.jpg

    点赞 评论 复制链接分享
  • weixin_39639965 weixin_39639965 4月前
    • Which DietPi image did you use to install this system? eg: DietPi_v6.2_RPi_xxxx.img
    • Did you modify for Berryboot?
    • SD card used?
    • Power Supply used?

    Try:

    
    rm /var/swap
    /DietPi/dietpi/func/dietpi-set_dphys-swapfile 512 /mnt/swap
    

    Failing the above, it may be an idea to try a fresh image write.

    点赞 评论 复制链接分享
  • weixin_39747293 weixin_39747293 4月前

    i use the latest 6.2 it is a berryboot image 8GB Toshiba class 10 UHS-1 micro sd 2amp supply

    点赞 评论 复制链接分享
  • weixin_39747293 weixin_39747293 4月前

    the command rm /var/swap /DietPi/dietpi/func/dietpi-set_dphys-swapfile 512 /mnt/swap

    does not enable the swap i get the same error as in the photo: https://image.ibb.co/cYbmF7/2018_03_02_22_02_55.jpg

    what is the problem the berryboot image?

    i did a fresh install on this image

    点赞 评论 复制链接分享
  • weixin_39639965 weixin_39639965 4月前

    what is the problem the berryboot image?

    Not sure, but searching the net shows this is an issue limited to BerryBoot.

    We do not officially provide support for BerryBoot images of DietPi (we do not create them), however, our user community has been successful in creating them for testing: https://github.com/Fourdee/DietPi/issues/1545

    Please continue this discussion in the above ticket. I'll mark this as closed in favor of https://github.com/Fourdee/DietPi/issues/1545

    点赞 评论 复制链接分享
  • weixin_39747293 weixin_39747293 4月前

    sorry i did not realize about berryboot since its the same OS. Do you know with software/s use/need swapfile??

    点赞 评论 复制链接分享

相关推荐