Apparently the reason my computer has been taking 2 minutes to boot was a faulty network mount

  • @[email protected]
    link
    fedilink
    1658 months ago

    I’m pretty sure the main system startup bottleneck is me typing the disk encryption passphrase.

    • astrsk
      link
      fedilink
      338 months ago

      Combine that with the 20-30 seconds my system takes to do bios memory training on the DDR5 ram and we’re practically back to the “go make some coffee while the system boots up” days 🤦

      • R0cket_M00se
        link
        English
        48 months ago

        Glad I haven’t built a modern chipset PC yet, didn’t realize it was this bad.

        • @[email protected]
          link
          fedilink
          English
          28 months ago

          As another DDR5 user, it’s not always this bad - there’s a bios setting that makes it remember the previous configuration and skips this step, but sometimes it still needs to do it, and then it can take a minute or two

      • Ullebe1
        link
        fedilink
        14
        edit-2
        8 months ago

        It is supported by systemd to use FIDO2 + pin to decrypt luks partitions with many security keys, including Yubikeys. I use it every day on my laptop.

      • @[email protected]
        link
        fedilink
        English
        88 months ago

        It is, I have it set up on my laptop. It’s a bit finicky in how it works and it’s not easy to setup, but it is possible.

        • @[email protected]
          link
          fedilink
          38 months ago

          Does it work by emulating the keyboard and typing in the password? Or by the encrypted protocol that works using the on device secret?

          • @[email protected]
            link
            fedilink
            English
            18 months ago

            Both should be possible. I am using the psuedo 2FA method. First I type the PIN and after that I confirm with YubiKey.

      • @[email protected]
        link
        fedilink
        28 months ago

        You can’t even use a fucking fingerprint scanner while being in the system, that package is borked for months and nobody seem to care to solve it.

        I think using Yubikey at boot time is quite out of reach

    • @Flex
      link
      48 months ago

      Fucking true. Does anyone know why this is so slow?

  • @[email protected]
    link
    fedilink
    1108 months ago

    You can use systemd-analyze blame if you want raw numbers:

    This command prints a list of all running units, ordered by the time they took to initialize. This information may be used to optimize boot-up times.

    Good way to see if your systemd also waits 2 minutes for a network connection which already exists but it can’t see it because systemd doesn’t do the networking (lxc containers on proxmox in my case) lol.

    Also see systemd-analyze.

    • @[email protected]
      link
      fedilink
      8
      edit-2
      8 months ago

      systemd also waits 2 minutes for a network connection which already exists but it can’t see it because systemd doesn’t do the networking

      Any way to speed this up? On my system in every boot it waits for network for 30s.

      • @[email protected]
        link
        fedilink
        18 months ago

        In my case i masked the service because like i said, inside the lxc container there is no networking to do, it’s done on the host (proxmox). Note that disabling the service in my case was not enough since it could be invoked by other services, and then you would have to wait again.

        See this for further info and maybe arguments why you shouldn’t do it.

  • NaN
    link
    fedilink
    English
    588 months ago

    systemd-analyze plot > plot.svg

    • @[email protected]
      link
      fedilink
      158 months ago

      Honestly I laughed when it just spit an SVG in text at me. I was wholly expecting a GUI to appear.

      • @[email protected]
        link
        fedilink
        58 months ago

        If you go far enough, everything is.

        But SVGs are one of the few image types that can be human readable and editable

        • @[email protected]
          link
          fedilink
          198 months ago

          If you go far enough, everything is.

          No, SVG are text files, it’s XML. You can write an SVG file representing a square using only a text editor relatively easily.

        • @[email protected]
          link
          fedilink
          108 months ago

          No, not really. Most image formats produce completely unreadable jumbo only meant to be parsed with clever maths.

  • @Molecular0079
    link
    English
    308 months ago

    Is there a way to do this for shutdown? It’d be great to debug shutdown hangs.

    • qazOP
      link
      48 months ago

      No, there currently isn’t

      And it’s not as easy to add actually. Note that systemd only keeps units loaded as long as they are referenced by something else that is loaded, are running, have failed, or have a job queued. That means if a service is terminated at shutdown there’s a very good chance it is GC’ed away pretty quickly. Now, while systemd keeps timestamping info around for services that tell us how long a service was running, took to start or took to shut down all that info is lost the instant the unit is GC’ed away…

      Source

    • qazOP
      link
      3
      edit-2
      8 months ago

      Thanks for the article, I’ve already spotted a few utilities that can come in useful. I’ve heard a lot of criticism about systemd too, but never really actively used it myself until a few weeks ago. I actually quite like it from what I’ve seen so far.

    • @[email protected]
      link
      fedilink
      248 months ago

      The top/1st line is the first service and it cascaded down as each subsequent service starts. Left to right is time elapsed. Bright red line is time to start that service. Shorter is better.

      Does that help?

  • @[email protected]
    link
    fedilink
    208 months ago

    My bottleneck at boot is my damn Bios… I am so hyped about flashing Heads on my Thinkpad T430.

    Even the old legacy Lenovo bioses where very fast at startup. The UEFI (with extremely nice secure-boot settings too) of an AMD Acer starts up in like 2 seconds. My old intel Thinkpad T430 needs like 4 seconds.

    And then my Lenovo T495 bullshit UEFI comes. No secure boot configuration at all, I have no idea how to boot from USB sticks, and this thing needs nearly 10 seconds to boot! Linux compared, a full Desktop OS, needs 3 seconds to show SDDM (after the LUKS dialog)

    • @Dkarma
      link
      68 months ago

      I adore my T530. I could kill a moose with it if it ever stops working. Literally dug it out of a dumpster and saw the i7 sticker and almost shit myself. Honestly I’ve had it for years and never even looked at the bios cuz with an SSD even with encryption enabled on the disk it booted in 30 sec.

      Until I built my latest rig I was doing ai image generation on it with 8gigs of ram.

      • @[email protected]
        link
        fedilink
        3
        edit-2
        8 months ago

        If you have a T530, there is coreboot for it! Dont know if 1vyra.in works, check it.

        Its not the question, if it works, but how it works! Its trustworthy and not extremely outdated proprietary garbage. Actually extremely important to update

          • @[email protected]
            link
            fedilink
            18 months ago

            You can even install Heads! This requires Hardware flashing though, not soo easy like 1vyrain but actually secure.

      • @[email protected]
        link
        fedilink
        18 months ago

        how does it run modern OSses?

        Its crazy how expensive T430 etc still are. People know how great they are

        • @[email protected]
          link
          fedilink
          28 months ago

          I’m shocked how smoothly it runs Gnome on Debian 12. KDE on NixOS was okay but had some noticeable slowdown. Here I was thinking it would be relegated to being an Arch CLI terminal.

  • @[email protected]
    link
    fedilink
    148 months ago

    the only “bottleneck” i currently have is plymouth-quit-wait.service, which takes 3.9 seconds. i can live with that

    • @[email protected]
      link
      fedilink
      118 months ago

      I know you put bottleneck is quotes but just to explain… apparently this service is simply the splash screen that waits on a ready environment. It doesn’t actually delay anything.

  • @[email protected]
    link
    fedilink
    138 months ago

    It tells me that my system boots in 7 seconds. That’s pretty cool, considering that it’s installed on a plain old sata SSD.

    POST, however…

  • @droidpenguin
    link
    98 months ago

    Dang had no idea this was a thing, but this looks very useful! I’ve been meaning to troubleshoot slow startup on one of my servers.