What's new

Problem with USB Flash Drive containing Swap File and Entware, no Swap File found after cold boot

  • 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!

One more question: Last time when I reinstalled Entware and stuff from scratch to a new stick and haven't uninstalled the remains of Skynet and I was in the middle of installing Diversion, I got these messages of Skynet and whitelist (see below): "Waiting for Skynet to finish task..."

I just forgot them (but saved the install "log") and after installing Diversion I uninstalled Skynet

Code:
sh /jffs/scripts/firewall uninstall

and installed it again from amtm and configured it. Should I do things differently next weekend if I reinstall all stuff again?

Code:
✔  pixelserv-tls installed
  ✔  pixelserv-tls CA certificate found

  i  Checking /jffs/scripts entries
  ✔  dnsmasq.postconf
  ✔  mount-entware
  ✔  services-stop
  ✔  unmount (Diversion)
  ✔  unmount entry added (swap file)
  ✔  service-event (Diversion WebUI)

  i  Initializing Diversion

  ✔  WebUI               remounted
  i  Running update-bl.div to create the blocking list


preparing temporary whitelist

preserving assembled hardcoded whitelist
updated shared-Diversion-whitelist

refreshing Skynet to whitelist domains in shared-Diversion-whitelist

Skynet lockfile detected
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Waiting for Skynet to finish task...
Error: Unable to refresh Skynet to whitelist domains in shared-Diversion-whitelist.
Error: Restart Skynet manually to immediately include the new whitelisted domains.
including /jffs/addons/shared-whitelists/shared-Skynet-whitelist in Diversion
including /jffs/addons/shared-whitelists/shared-Skynet2-whitelist in Diversion

downloading Custom (primary) blocking list, 4 file(s)
using 192.168.1.3 as blocking IP, adding "::" as IPv6 blocking IP
 
Formatted the stick with Format disk (fd) of amtm. Ext4 with journalling. Is there something wrong with the "number of cylinders" of the stick? Or is it because it is not a HDD or SDD? Format disk log (fdl) shows these messages:

Code:
 Enter option  fdl

 ---------------------------------------------------
 amtm-format-disk.log has this content:

 START FILE, --- lines are not part of file
 ---------------------------------------------------
 amtm format disk log Mon, 10 Oct 2022 13:18:13 +0300

  Zeroing disk sda Kingston DataTraveler 3.0 (31.0 GB)


  Creating partition(s) on sda Kingston DataTraveler 3.0 (31.0 GB)

 Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel
 Building a new DOS disklabel. Changes will remain in memory only,
 until you decide to write them. After that the previous content
 won't be recoverable.


 The number of cylinders for this disk is set to 29560.
 There is nothing wrong with that, but this is larger than 1024,
 and could in certain setups cause problems with:
 1) software that runs at boot time (e.g., old versions of LILO)
 2) booting and partitioning software from other OSs
    (e.g., DOS FDISK, OS/2 FDISK)

 Command (m for help): Building a new DOS disklabel. Changes will remain in memory only,
 until you decide to write them. After that the previous content
 won't be recoverable.


 The number of cylinders for this disk is set to 29560.
 There is nothing wrong with that, but this is larger than 1024,
 and could in certain setups cause problems with:
 1) software that runs at boot time (e.g., old versions of LILO)
 2) booting and partitioning software from other OSs
    (e.g., DOS FDISK, OS/2 FDISK)

 Command (m for help): Command action
    e   extended
    p   primary partition (1-4)
 Partition number (1-4): First cylinder (1-29560, default 1): Using default value 1
 Last cylinder or +size or +sizeM or +sizeK (1-29560, default 29560): Using default value 29560

 Command (m for help): The partition table has been altered.
 Calling ioctl() to re-read partition table

  Formatting disk as "ext4", enabling journalling

 Creating filesystem with 7567356 4k blocks and 1892352 inodes
 Filesystem UUID: 13a81bfe-034a-4663-9eb5-1e4585221b9c
 Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

 Allocating group tables: done
 Writing inode tables: done
 Creating journal (32768 blocks): done
 Writing superblocks and filesystem accounting information: done

  Setting disk device label "ASUSENTWARE"

 tune2fs 1.45.6 (20-Mar-2020)

 ---------------------------------------------------
 END FILE

_____________________________________________

 Delete log file now? [1=Yes e=Exit]
 
Tested the first cold boot with Ext4/Journalling. The disk check was quick. The stick was mounted pretty fast and Skynet needed only 3 Attempts (or 4). And the Swap File was found. Problem solved (I hope).


Code:
Oct 10 16:16:53 amtm disk-check: Probing 'ext4' on device /dev/sdb1
Oct 10 16:16:53 amtm disk-check: Running disk check v3.1, with command 'e2fsck -p' on /dev/sdb1
Oct 10 16:16:57 Skynet: [*] USB Not Found - Sleeping For 10 Seconds ( Attempt 3 Of 10 )
Oct 10 16:17:00 amtm disk-check: Disk check done on /dev/sdb1
Oct 10 16:17:00 syslog: USB ext4 fs at /dev/sdb1 mounted on /tmp/mnt/ASUSENTWARE
Oct 10 16:17:00 usb: USB ext4 fs at /dev/sdb1 mounted on /tmp/mnt/ASUSENTWARE.
Oct 10 16:17:00 kernel: EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: user_xattr
Oct 10 16:17:02 custom_script: Running /jffs/scripts/post-mount (args: /tmp/mnt/ASUSENTWARE)


dcl:

Code:
 Mon Oct 10 16:16:53 DST 2022 Probing 'ext4' on device /dev/sdb1
Running disk check v3.1, with command 'e2fsck -p' on /dev/sdb1
ASUSENTWARE: recovering journal
ASUSENTWARE: clean, 711/1892352 files, 2073941/7567356 blocks
Mon Oct 10 16:17:00 DST 2022 Disk check done on /dev/sdb1
---------------------------------------------------
END FILE

_____________________________________________

Delete log file now? [1=Yes e=Exit]
 
That sounds promising.

A core issue is still the fact that the drive is in use when you power off the router. It's not a good idea to rely on the filesystem being recoverable or the USB stick not being corrupted, especially if this is something you say you do often.

We're all lazy (well, I am), but if at all possible try to remember to unmount the drive before powering off the router.
 
^^^^ Yeah. I know. At least the stick containing Entware/Swap File will be "dirty" every time if you just power OFF the router (without first unmounting the drive(s)).

By the way, this Kingston DataTraveler Exodia 32 GB USB 3.2. costs only 5 euros. I wonder how many months it will last...
 

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