hi
I'm using openwrt 19.07.1 on TP-Link TL-WR741N/ND v1 (tiny) , openwrt image and kernel are custom built to enable hardware mod for usb 1.1.
I added a usb thumb drive (very old 128Mb in size) as extroot and swap, everything works perfectly except swap.
blkid :
root@OpenWrt:~# blkid
/dev/mtdblock2: TYPE="squashfs"
/dev/sda1: UUID="73426687-b707-4d63-9fb7-7f6db772e644" TYPE="ext4" PARTUUID="2aa2f910-01"
/dev/sda2: UUID="130e5ebd-8be3-493c-8a26-6a06f79727c8" TYPE="swap" PARTUUID="2aa2f910-02"
root@OpenWrt:~#
df:
root@OpenWrt:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 3072 3072 0 100% /rom
tmpfs 13904 1056 12848 8% /tmp
/dev/sda1 84099 3190 74531 4% /overlay
overlayfs:/overlay 84099 3190 74531 4% /
tmpfs 512 0 512 0% /dev
root@OpenWrt:~#
fstab:
root@OpenWrt:~# cat /etc/config/fstab
config 'global'
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '0'
config 'mount'
option target '/overlay'
option uuid '73426687-b707-4d63-9fb7-7f6db772e644'
option enabled '1'
config 'swap'
option uuid '130e5ebd-8be3-493c-8a26-6a06f79727c8'
option enabled '1'
root@OpenWrt:~#
swapon:
root@OpenWrt:~# swapon -a
block: failed to swapon /dev/sda2
root@OpenWrt:~#
swapfile :
root@OpenWrt:~# mkswap /swapfile
mkswap: /swapfile: insecure permissions 0644, 0600 suggested.
Setting up swapspace version 1, size = 32 MiB (33550336 bytes)
no label, UUID=de92abfa-dedf-4225-83e0-477329e20309
root@OpenWrt:~# swapon /swapfile
block: failed to swapon /swapfile (-1)
root@OpenWrt:~#
I tried mkswap /dev/sda2 before swap on , but same results.
any help is apreciated