Announcement

Collapse
No announcement yet.

Creating a virtual swap file problem

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating a virtual swap file problem

    Using kubuntu 13.04
    Creating a Virtual Swap file: (instead of having swap created on disc)
    Code:
    sudo dd if=/dev/zero of=/mnt/bumpyswap.swap bs=1M count=17178
    sudo swapon /mnt/bumpyswap.swap
    Added on blank Terminal line:
    Code:
    sudo swapon -va
    Rebooted.
    Problem: on bootup, under the opening K graphic,
    message: “An error occurred while mounting .swap.
    Press S to skip mounting swap, or M for Manual”
    Pressed S & system boots OK.

    Code:
    bumpy@Bumpyputer:/mnt$ dir
    bumpyswap.swap
    bumpy@Bumpyputer:/mnt$
    How can I fix this

    #2
    Your swapfile must have the proper permissions and be mounted via fstab or a command entered into rc.local (or similar) for it to survive a re-boot.

    sudo chown root:root /mnt/bumpyswap.swap
    sudo chmod 0600 /mnt/bumpyswap.swap


    To activate /swapfile1 after Linux system reboot, remove old swap entry and add this entry to /etc/fstab file:


    /mnt/bumpyswap.swap swap swap defaults 0 0

    Please Read Me

    Comment

    Working...
    X