[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pi vs swap on flash

On Thu, 13 Jul 2017 12:38:57 -0400
Gene Heskett <gheskett@shentel.net> wrote:

> I turned it off, then removed /var/swap. Won't reboot. WTH? THere isn't 
> anything in fstab but what I added, and nothing in /boot/config.txt or 
> cmdline.txt about swap. I can recover, but the most recent edits in the 
> linuxcnc tree haven't been backed up, damn!!!!! I'll try a full 
> powerdown before I swap cards to begin the recovery.

If you need to recreate a swap file, you can follow this step as root user:

dd if=/dev/zero of=/var/swap bs=$((1024*1024)) count=100 # 100MiB swap file
mkswap /var/swap

(supposing that /var/swap was a file used for swap)

For activate it:

swapon /var/swap

For checking swap usage, you can:

cat /proc/swaps

If you need to make some more ram available, and you don't want to use swap, you can use zram:



Diego Roversi <diegor@tiscali.it>

Reply to: