[DNG] cryptsetup-initramfs "Try again later"

2022-03-20 Thread Alexander Bochmann
Hi -

I've been converting a chimaera setup to an encrypted root file system 
with the option to enter the unlock passphrase via dropbear-initramfs.

This almost works, except I'm running into the problem that the 
cryptsetup-initramfs script terminates with a "Try again later" message 
(unlocking the root fs from the console is still possible).

This problem is being mentioned a few times, but without a real solution,
like here:
http://dev1galaxy.org/viewtopic.php?id=3642
http://maemo.cloud-7.de/irclogs/freenode/_devuan/_devuan.2020-02-09.log.html

As quoted in the dev1galaxy thread, the code that displays "Try again 
later" is this, right at the top of cryptsetup-initramfs:

 > TABFILE="/cryptroot/crypttab"
 > unset -v IFS
 >
 > if [ ! -f "$TABFILE" ] || [ "$TABFILE" -ot "/proc/1" ]; then
 > # Too early, init-top/cryptroot hasn't finished yet
 > echo "Try again later" >&2
 > exit 1
 > fi

After some poking around I found the --full-time option in the busybox 
ls, and it turns out that $TABFILE is actually a few seconds older than 
the /proc/1 directory in the initramfs on my system:

~ # ls -al --full-time /cryptroot/crypttab
-rw---1 root root75 2022-03-21 00:54:12 + 
/cryptroot/crypttab
~ # ls -ald --full-time /proc/1
dr-xr-xr-x9 root root 0 2022-03-21 00:54:31 + /proc/1

When I then touch /cryptroot/crypttab to update the timestamp, the
script runs successfully...?

Does anyone have an idea why that happens? Is the cryptsetup-initramfs 
logic wrong, or did -ot at some point have less resolution and didn't 
look at the timestamp seconds? 
Is this something Devuan-specific for some reason? Searching the 'net 
only finds a small handful of results, and only in relation to Devuan.

Alex.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Wifi problem - dhclient times out with no reply

2022-03-20 Thread aitor

Hi,

On 20/3/22 20:33, aitor wrote:

On 20/3/22 19:50, Steve Litt wrote:

This is probably unresponsive to your question, but what the heck? I
just switched from wpa_supplicant to iwd and its suite, and am
incredibly pleased.


Looking at the code of iwgtk, I can see a strong dependence on DBus.


What about ubus?

https://openwrt.org/docs/techref/ubus 



Aitor.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Wifi problem - dhclient times out with no reply

2022-03-20 Thread aitor

Hi,

On 20/3/22 19:50, Steve Litt wrote:

This is probably unresponsive to your question, but what the heck? I
just switched from wpa_supplicant to iwd and its suite, and am
incredibly pleased.


Looking at the code of iwgtk, I can see a strong dependence on DBus.

Cheers,

Aitor.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Wifi problem - dhclient times out with no reply

2022-03-20 Thread Steve Litt
Joel Roth via Dng said on Sat, 19 Mar 2022 12:52:31 -1000

>I've resolved this problem with a workaround: I found a
>TPLINK r8188eu based usb wifi adapter that I managed to get
>working with little fuss. So I'm back to my regular wifi
>setup script using netaid (below). I also blacklisted
>the wl and b43 drivers which I won't be needing.

This is probably unresponsive to your question, but what the heck? I
just switched from wpa_supplicant to iwd and its suite, and am
incredibly pleased.

I made the switch as follows:

1. Installed iwd and iwgtk
2. Killed the wpa_supplicant daemon
3. Removed wpa_supplicant as a daemon to run
4. Added iwd as a daemon to run
5. rebooted (important, didn't work til I did that)

By the way, using runit I run both dhcpcd and iwd as respawning
daemons. I took no precautions to make sure one started before the
other, and it's worked every time, although I might just be lucky in
that regard.

The way I use iwd is to make all changes using iwgtk, *as a normal
user*. Using iwgtk I can scan networks, connect to networks, connect to
new networks if I know the password, and even forget networks. I like
it much better than NetworkManager or WICD.

It would be interesting to see if iwd would have the same problem with
your original wifi adapter.

SteveT

Steve Litt 
March 2022 featured book: Making Mental Models: Advanced Edition
http://www.troubleshooters.com/mmm
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng