What's new

Solved No Swap file detected

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

pmcarrion

Occasional Visitor
My RT-AX88U runs Asuswrt-Merlin 3004.388.4.

I plugged in a SanDisk 128 GB USB flash drive into my router, enabled JFFS, ran amtm, and formatted it using the fd command (1 partition, ext4, journaling on, and labeled).
I also installed Entware using the ep command.
The router works, the USB drive mounts, and Entware packages run as expected.

However, when attempting to install spdMerlin, I got a warning that a Swap File is required.
So I created a Swap File using the sw command with the recommended 2GB size.
The issues began right after cresting the Swap File and got these errors:

sw command error (USB drive doesn’t mount anymore):
Code:
Swap file created and activated:
 /mnt/ASUS-USB128/myswap.swp
 No swap file found, reference removed in
 /jffs/scripts/post-mount

spdMerlin installer error:
Code:
No Swap file detected!

I have reformatted the USB drive several times and repeated all the steps, but I still can't get the Swap File to work.

Is anyone else having this issue? How did you solve it?

Thanks
 
Maybe try to format one more time but label it with just alpha characters (I.e. AsusUSB128)?
I don't recall if a character like "-" trips up things.
Worth a shot.
 
"-" is a valid filename character (see it in /jffs/scripts/post-mount).

When it's said a swap file was created and activated above, what does
Code:
cat /proc/swaps
from the shell prompt return?

Not having used any of the packages mentioned here I have to wonder why use a swap /file/ as opposed to a swap /partition/ on the drive?
 
Maybe try to format one more time but label it with just alpha characters (I.e. AsusUSB128)?
I don't recall if a character like "-" trips up things.
Worth a shot.
Dashes seem to be OK.

"-" is a valid filename character (see it in /jffs/scripts/post-mount).

When it's said a swap file was created and activated above, what does
Code:
cat /proc/swaps
from the shell prompt return?

Not having used any of the packages mentioned here I have to wonder why use a swap /file/ as opposed to a swap /partition/ on the drive?
I get this output:

Code:
root@RT-AX88U:/tmp/home/root# cat /proc/swaps
Filename                Type        Size    Used    Priority

It doesn’t show any swap files.
 
Easy enough to test without a dash. 'Seems okay' is not good enough at this point.
 
Easy enough to test without a dash. 'Seems okay' is not good enough at this point.
I had reformatted the drive without a dash in the label (1 partition, ext4, journaling on, and labeled).

Here's the output after the creation of the 4GB swap file:

Code:
Swap file created and activated:
 /mnt/ASUS128USB/myswap.swp
 No swap file found, reference removed in
 /jffs/scripts/post-mount

And here's the output of root@RT-AX88U:/tmp/home/root# cat /proc/swaps
Code:
Filename                Type        Size    Used    Priority

The swap file list is empty, and the USB drive won't mount after the swap file creation.
 
I repeated the whole process to get the exact error from the system log:
1) Formatted USB drive using amtm's fd command. Success.
2) Installed Entware using amtm's ep command. Success.
3) Created a 4GB swap file using amtm's sw command. Failed.

Here's the system log for the swap file creation:
Code:
Nov 16 18:05:51 kernel: xhci-hcd xhci-hcd.0: Cannot set link state.
Nov 16 18:05:51 kernel: usb usb2-port2: cannot disable (err = -32)
Nov 16 18:05:51 kernel: xhci-hcd xhci-hcd.0: Cannot set link state.
Nov 16 18:05:51 kernel: usb usb2-port2: cannot disable (err = -32)
Nov 16 18:05:51 kernel: usb 2-2: USB disconnect, device number 2
Nov 16 18:05:51 kernel: sd 0:0:0:0: [sda] FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Nov 16 18:05:51 kernel: sd 0:0:0:0: [sda] CDB: Write(10) 2a 00 00 23 36 3f 00 02 00 00
Nov 16 18:05:51 kernel: blk_update_request: I/O error, dev sda, sector 2307647
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1006632960 size 8388608 starting block 288519)
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288448
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288449
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288450
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288451
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288452
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288453
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288454
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288455
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288456
Nov 16 18:05:51 kernel: Buffer I/O error on device sda1, logical block 288457
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1006632960 size 8388608 starting block 288647)
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1006632960 size 8388608 starting block 288711)
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1006632960 size 8388608 starting block 288775)
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1015021568 size 4198400 starting block 288839)
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1015021568 size 4198400 starting block 288903)
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1015021568 size 4198400 starting block 288967)
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1015021568 size 4198400 starting block 289031)
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1015021568 size 4198400 starting block 289095)
Nov 16 18:05:51 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1015021568 size 4198400 starting block 289159)
Nov 16 18:05:51 kernel: sd 0:0:0:0: [sda] FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Nov 16 18:05:51 kernel: sd 0:0:0:0: [sda] CDB: Write(10) 2a 00 00 23 38 3f 00 02 00 00
Nov 16 18:05:51 kernel: blk_update_request: I/O error, dev sda, sector 2308159
Nov 16 18:05:51 kernel: JBD2: Detected IO errors while flushing file data on sda1-8
Nov 16 18:05:51 kernel: Aborting journal on device sda1-8.
Nov 16 18:05:51 kernel: EXT4-fs (sda1): ext4_writepages: jbd2_start: 9223372036854762495 pages, ino 18; err -30
Nov 16 18:05:51 kernel: potentially unexpected fatal signal 7.
Nov 16 18:05:51 kernel: CPU: 0 PID: 7576 Comm: dd Tainted: P           O    4.1.51 #2
Nov 16 18:05:51 kernel: Hardware name: Broadcom-v8A (DT)
Nov 16 18:05:51 kernel: task: ffffffc029dc8100 ti: ffffffc02821c000 task.ti: ffffffc02821c000
Nov 16 18:05:51 kernel: PC is at 0x409410
Nov 16 18:05:51 kernel: LR is at 0x4031ec
Nov 16 18:05:51 kernel: pc : [<0000000000409410>] lr : [<00000000004031ec>] pstate: 40000000
Nov 16 18:05:51 kernel: sp : 0000007ffa8a6160
Nov 16 18:05:51 kernel: x29: 0000007ffa8a6180 x28: 00000000ffffffff
Nov 16 18:05:51 kernel: x27: 0000000000000001 x26: 0000007fa269a720
Nov 16 18:05:51 kernel: x25: 0000000000000000 x24: 00000000004222c0
Nov 16 18:05:51 kernel: x23: 000000001230e000 x22: 0000000000000000
Nov 16 18:05:51 kernel: x21: 000000000040f0e0 x20: 000000000000001e
Nov 16 18:05:51 kernel: x19: 0000000000422388 x18: 0000000000000000
Nov 16 18:05:51 kernel: x17: 0000000000000003 x16: 0000000000422248
Nov 16 18:05:51 kernel: x15: 0000000000000020 x14: 00242745b0000000
Nov 16 18:05:51 kernel: x13: ffffffff9aa96159 x12: 0101010101010101
Nov 16 18:05:51 kernel: x11: 0000000000000008 x10: 0101010101010101
Nov 16 18:05:51 kernel: x9 : 0000000000000038 x8 : 7f7f7f7f7f7f7f7f
Nov 16 18:05:51 kernel: x7 : fefefeff112eff42 x6 : 0080301280808080
Nov 16 18:05:51 kernel: x5 : 0000000012300000 x4 : 8080808000008000
Nov 16 18:05:51 kernel: x3 : 0000000000000000 x2 : 000000000000001e
Nov 16 18:05:51 kernel: x1 : 0000007ffa8a6e00 x0 : 0000000000000004
Nov 16 18:05:51 kernel: JBD2: Error -5 detected when updating journal superblock for sda1-8.
Nov 16 18:05:51 kernel: EXT4-fs error (device sda1): ext4_journal_check_start:56: Detected aborted journal
Nov 16 18:05:51 kernel: EXT4-fs (sda1): Remounting filesystem read-only
Nov 16 18:05:51 kernel: EXT4-fs (sda1): previous I/O error to superblock detected
Nov 16 18:05:51 kernel: EXT4-fs (sda1): ext4_writepages: jbd2_start: 9223372036854775807 pages, ino 18; err -30
Nov 16 18:05:51 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #4718594: comm [: reading directory lblock 0
Nov 16 18:05:51 kernel: EXT4-fs (sda1): previous I/O error to superblock detected
Nov 16 18:05:51 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #4718594: comm [: reading directory lblock 0
Nov 16 18:05:51 kernel: EXT4-fs (sda1): previous I/O error to superblock detected
Nov 16 18:05:52 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #4718594: comm [: reading directory lblock 0
Nov 16 18:05:52 kernel: usb 2-2: new SuperSpeed USB device number 3 using xhci-hcd
Nov 16 18:05:52 kernel: usb-storage 2-2:1.0: USB Mass Storage device detected
Nov 16 18:05:52 kernel: scsi host1: usb-storage 2-2:1.0
Nov 16 18:05:52 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #4718593: comm [: reading directory lblock 0
Nov 16 18:05:52 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #4718594: comm [: reading directory lblock 0
Nov 16 18:05:52 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #2: comm [: reading directory lblock 0
Nov 16 18:05:52 hotplug[7721]: USB partition unmounted from /tmp/mnt/ASUS128USB
Nov 16 18:05:52 rc_service: hotplug 7721:notify_rc restart_nasapps
Nov 16 18:05:52 custom_script: Running /jffs/scripts/service-event (args: restart nasapps)
Nov 16 18:05:52 rc_service: hotplug 7729:notify_rc restart_nasapps
Nov 16 18:05:52 rc_service: waitting "restart_nasapps" via  ...
Nov 16 18:05:53 iTunes: daemon is stopped
Nov 16 18:05:53 avahi-daemon[1972]: Files changed, reloading.
Nov 16 18:05:53 avahi-daemon[1972]: Loading service file /tmp/avahi/services/mt-daap.service.
Nov 16 18:05:53 FTP_Server: daemon is stopped
Nov 16 18:05:53 wsdd2[1986]: Terminated received.
Nov 16 18:05:53 wsdd2[1986]: terminating.
Nov 16 18:05:53 kernel: scsi 1:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
Nov 16 18:05:53 kernel: sd 1:0:0:0: [sda] 242614272 512-byte logical blocks: (124 GB/116 GiB)
Nov 16 18:05:53 kernel: sd 1:0:0:0: Attached scsi generic sg0 type 0
Nov 16 18:05:53 kernel: sd 1:0:0:0: [sda] Write Protect is off
Nov 16 18:05:53 kernel: sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Nov 16 18:05:53 kernel:  sda: sda1
Nov 16 18:05:53 kernel: sd 1:0:0:0: [sda] Attached SCSI removable disk
Nov 16 18:05:53 Samba_Server: smb daemon is stopped
Nov 16 18:05:53 avahi-daemon[1972]: Got SIGTERM, quitting.
Nov 16 18:05:53 avahi-daemon[1972]: Leaving mDNS multicast group on interface br0.IPv4 with address 192.168.50.1.
Nov 16 18:05:53 avahi-daemon[1972]: Leaving mDNS multicast group on interface lo.IPv4 with address 127.0.1.1.
Nov 16 18:05:53 avahi-daemon[1972]: avahi-daemon 0.8 exiting.
Nov 16 18:05:55 kernel: +++++ BRCM skipping port_feat_c_connection for warm reset
Nov 16 18:05:55 kernel: xhci-hcd xhci-hcd.0: Cannot set link state.
Nov 16 18:05:55 kernel: usb usb2-port2: cannot disable (err = -32)
Nov 16 18:05:55 kernel: usb 2-2: USB disconnect, device number 3
 
You have a hard error accessing the USB drive. Try switching it to USB 2 mode and repeating the procedure.
 
You have a hard error accessing the USB drive. Try switching it to USB 2 mode and repeating the procedure.
I switched to USB 2 and still get this error when creating the swap file:

Code:
Nov 16 20:48:18 kernel: usb 1-2: USB disconnect, device number 2
Nov 16 20:48:18 kernel: sd 0:0:0:0: [sda] FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Nov 16 20:48:18 kernel: sd 0:0:0:0: [sda] CDB: Write(10) 2a 00 00 26 e8 47 00 02 00 00
Nov 16 20:48:18 kernel: blk_update_request: I/O error, dev sda, sector 2549831
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 318792)
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318721
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318722
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318723
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318724
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318725
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318726
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318727
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318728
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318729
Nov 16 20:48:18 kernel: Buffer I/O error on device sda1, logical block 318730
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 318920)
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 318984)
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 319048)
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 319112)
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 319176)
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 319240)
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 319304)
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 319368)
Nov 16 20:48:18 kernel: EXT4-fs warning (device sda1): ext4_end_bio:332: I/O error -5 writing to inode 18 (offset 1128271872 size 4190208 starting block 319432)
Nov 16 20:48:18 kernel: sd 0:0:0:0: [sda] FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Nov 16 20:48:18 kernel: sd 0:0:0:0: [sda] CDB: Write(10) 2a 00 00 26 ea 47 00 02 00 00
Nov 16 20:48:18 kernel: blk_update_request: I/O error, dev sda, sector 2550343
Nov 16 20:48:18 kernel: JBD2: Detected IO errors while flushing file data on sda1-8
Nov 16 20:48:18 kernel: Aborting journal on device sda1-8.
Nov 16 20:48:18 kernel: potentially unexpected fatal signal 7.
Nov 16 20:48:18 kernel: CPU: 1 PID: 7746 Comm: dd Tainted: P           O    4.1.51 #2
Nov 16 20:48:18 kernel: Hardware name: Broadcom-v8A (DT)
Nov 16 20:48:18 kernel: task: ffffffc0292a14c0 ti: ffffffc028b74000 task.ti: ffffffc028b74000
Nov 16 20:48:18 kernel: PC is at 0x409410
Nov 16 20:48:18 kernel: LR is at 0x4031ec
Nov 16 20:48:18 kernel: pc : [<0000000000409410>] lr : [<00000000004031ec>] pstate: 40000000
Nov 16 20:48:18 kernel: sp : 0000007ff8971c80
Nov 16 20:48:18 kernel: x29: 0000007ff8971ca0 x28: 00000000ffffffff
Nov 16 20:48:18 kernel: x27: 0000000000000001 x26: 0000007f7c9fe720
Nov 16 20:48:18 kernel: x25: 0000000000000000 x24: 00000000004222c0
Nov 16 20:48:18 kernel: x23: 000000000376e000 x22: 0000000000000000
Nov 16 20:48:18 kernel: x21: 000000000040f0e0 x20: 000000000000001e
Nov 16 20:48:18 kernel: x19: 0000000000422388 x18: 0000000000000000
Nov 16 20:48:18 kernel: x17: 0000000000000003 x16: 0000000000422248
Nov 16 20:48:18 kernel: x15: 0000000000000020 x14: 00276c8320000000
Nov 16 20:48:18 kernel: x13: ffffffff9aa93adf x12: 0101010101010101
Nov 16 20:48:18 kernel: x11: 0000000000000008 x10: 0101010101010101
Nov 16 20:48:18 kernel: x9 : 0000000000000038 x8 : 7f7f7f7f7f7f7f7f
Nov 16 20:48:18 kernel: x7 : fefefeff0274ff42 x6 : 0080760380808080
Nov 16 20:48:18 kernel: x5 : 0000000003760000 x4 : 8080808000008000
Nov 16 20:48:18 kernel: x3 : 0000000000000000 x2 : 000000000000001e
Nov 16 20:48:18 kernel: x1 : 0000007ff8972e00 x0 : 0000000000000004
Nov 16 20:48:18 kernel: EXT4-fs (sda1): ext4_writepages: jbd2_start: 9223372036854772735 pages, ino 18; err -30
Nov 16 20:48:18 kernel: EXT4-fs (sda1): ext4_writepages: jbd2_start: 1024 pages, ino 18; err -30
Nov 16 20:48:18 kernel: EXT4-fs (sda1): ext4_writepages: jbd2_start: 1024 pages, ino 18; err -30
Nov 16 20:48:18 kernel: JBD2: Error -5 detected when updating journal superblock for sda1-8.
Nov 16 20:48:18 kernel: EXT4-fs error (device sda1): ext4_journal_check_start:56: Detected aborted journal
Nov 16 20:48:18 kernel: EXT4-fs (sda1): Remounting filesystem read-only
Nov 16 20:48:18 kernel: EXT4-fs (sda1): previous I/O error to superblock detected
Nov 16 20:48:18 kernel: EXT4-fs (sda1): ext4_writepages: jbd2_start: 9223372036854775807 pages, ino 18; err -30
Nov 16 20:48:19 kernel: EXT4-fs error (device sda1): __ext4_get_inode_loc:4047: inode #786876: block 3145787: comm [: unable to read itable block
Nov 16 20:48:19 kernel: EXT4-fs (sda1): previous I/O error to superblock detected
Nov 16 20:48:19 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #786434: comm [: reading directory lblock 0
Nov 16 20:48:19 dnsmasq-dhcp[1977]: DHCPSOLICIT(br0) 00:03:00:01:b4:b5:2f:0c:db:c3
Nov 16 20:48:19 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #786433: comm [: reading directory lblock 0
Nov 16 20:48:19 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #786434: comm [: reading directory lblock 0
Nov 16 20:48:19 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #786434: comm [: reading directory lblock 0
Nov 16 20:48:19 kernel: EXT4-fs error (device sda1): ext4_find_entry:1461: inode #2: comm [: reading directory lblock 0
Nov 16 20:48:20 kernel: usb 1-2: new high-speed USB device number 3 using ehci-platform
Nov 16 20:48:20 hotplug[8027]: USB partition unmounted from /tmp/mnt/ASUS128USB
 
I switched to USB 2 and still get this error when creating the swap file:
Then it sounds like your USB flash drive is incompatible with the router. Do you have another flash drive you could test with to see if that has the same problem?
 
I followed your guide and it worked!

Then it sounds like your USB flash drive is incompatible with the router. Do you have another flash drive you could test with to see if that has the same problem?
You're right, this was a USB drive issue. I reverted to USB 3 and used another drive.

Everything works as expected now.

Everyone should avoid using SanDisk Ultra Fit USB drives for this purpose.

Thanks, @ColinTaylor @L&LD @glens @JGrana!
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top