My friend whats to create a 4GB swap file on his ext4 file system. because he is using a chromebook acer c7 the way he installed he did not have a chance to specify swap partition
and now he want to create a swap file on his file system.
This is the guide he is following
First you have to create a 2GiB file, for example in /mnt:
Then format the file to swap:
sudo dd if=/dev/zero of=/mnt/swap bs=1M count=2048
Add the swap file to the system:
sudo mkswap /mnt/swap
Check it out, i.e.:
sudo swapon /mnt/swap
Edit the fstab file:
and add this line at the end of the file:
gksu gedit /etc/fstab
Save the file and exit. That's all.
/mnt/swap none swap sw
This is what he is getting
and his fstab looks like this
user@chrubuntu:~$ sudo swapon /mnt/swap
swapon: /mnt/swap: swapon failed: Invalid argument
any way to fix this ??
One more thing he is using ubuntu 14.04 and it is not a fresh install
Thank you for your time