initramfs clevis no carrier after 1s, no retry

Bug #1873914 reported by Thorsten Bonhagen on 2020-04-20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
clevis (Ubuntu)

Bug Description


initramfs-clevis wait 1s for carrier to show up, this is not much and not working in most cases.
For me i have to up to 12 seconds for lan carrier.

i changed /usr/share/initramfs-tools/scripts/local-top/clevis
to 12s loop:

eth_check() {
    for device in $(clevis_all_netbootable_devices); do
        for i in {1..12}; do
            ip link set dev $device up
            sleep 1
            ETH_HAS_CARRIER=$(cat /sys/class/net/"$device"/carrier)
            if [ "$ETH_HAS_CARRIER" = '1' ]; then
                return 0
    return 1

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: clevis-initramfs 12-1ubuntu2 [modified: usr/share/initramfs-tools/scripts/local-top/clevis]
ProcVersionSignature: Ubuntu 5.4.0-25.29-generic 5.4.30
Uname: Linux 5.4.0-25-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Mon Apr 20 18:55:44 2020
InstallationDate: Installed on 2020-04-18 (2 days ago)
InstallationMedia: Kubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200401)
PackageArchitecture: all
SourcePackage: clevis
UpgradeStatus: No upgrade log present (probably fresh install)

Thorsten Bonhagen (viperomega) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in clevis (Ubuntu):
status: New → Confirmed
dann frazier (dannf) wrote :

Hi @Thorsten! This sounds like an issue we've been discussing upstream[1], and I think I have an approach that might work for you. It requires changes to both clevis and initramfs-tools. I've prepared test packages in a PPA[2]. Would it be possible for you to test these?

Note that you will need to specify the network interface to use on the kernel command line using the ip= syntax - for example: ip=:::::enp5s0:dhcp


To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.