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
http://ubuntuforums.org/showthread.php?t=1618220&p=10098565#post10098565
First you have to create a 2GiB file, for example in /mnt:
sudo dd if=/dev/zero of=/mnt/swap bs=1M count=2048
Then format the file to swap:
sudo mkswap /mnt/swap
Add the swap file to the system:
sudo swapon /mnt/swap
Check it out, i.e.:
free -m
Edit the fstab file:
gksu gedit /etc/fstab
and add this line at the end of the file:
/mnt/swap none swap sw
Save the file and exit. That's all.
This is what he is getting
user@chrubuntu:~$ sudo swapon /mnt/swap
swapon: /mnt/swap: swapon failed: Invalid argument
and his fstab looks like this
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
swapon
, or just after he's added it to the fstab file? – jkt123 May 04 '14 at 21:25before this step every thing works Add the swap file to the system:
sudo swapon /mnt/swap
http://imgur.com/rFP0gbc
– Levan May 04 '14 at 21:30uname -a
show? – psusi May 04 '14 at 22:47ser@chrubuntu:~$ uname -a Linux chrubuntu 3.4.0 #1 SMP Fri Apr 11 19:07:10 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux user@chrubuntu:~$
– Levan May 04 '14 at 22:52