Slow boot Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
warchild
Posts: 6
Joined: Tue Jan 19, 2021 7:36 am

Slow boot

Post by warchild »

I searched already a bit, though there are plenty of similar threads, it seems none is really "fitting" so i have to start a new one.
I'm new to Raspi, Dietpi etc. I installed Dietpi a few weeks ago on my new Pi4b (directly on USB SSD) but Boot times are really slow (5mins+) which is obviously not ok.
My first try was install on SD, than copy SD to SSD. When i expected this slow boot, i thought ok maybe is that not the best way and reinstalled directly to ssd. But boot times did not improve. So i now tried the ARM64 build - but still the same.
So i changed the SSD (now a 256GB MX100, which "retired" from my PC), i changed the USB Cord as well as the USB Port on the Pi. But always the same slow boot times. Only thing i installed is Samba, MinIO and PiHole.
When i benchmark the ssd i got ~300mb read speed, so that shouldn't be the problem.

Following systemd-analyze blame
1min 30.019s php7.3-fpm.service
1min 3.620s lighttpd.service
1min 998ms rpi-eeprom-update.service
1min 836ms dietpi-preboot.service
34.175s dev-sda2.device
32.446s keyboard-setup.service
32.354s systemd-fsck-root.service
32.044s systemd-sysctl.service
5.451s dietpi-boot.service
4.760s unbound.service
570ms pihole-FTL.service
461ms systemd-udev-trigger.service
259ms systemd-journald.service
230ms smbd.service
228ms systemd-fsck@dev-disk-by\x2dpartuuid-ad09722e\x2d01.service
163ms nmbd.service
105ms systemd-remount-fs.service
96ms networking.service
86ms systemd-tmpfiles-setup.service
81ms dietpi-ramlog.service
69ms systemd-udevd.service
67ms systemd-journal-flush.service
63ms systemd-modules-load.service
62ms fake-hwclock.service
55ms dev-mqueue.mount
53ms kmod-static-nodes.service
52ms systemd-tmpfiles-setup-dev.service
47ms systemd-sysusers.service
46ms systemd-update-utmp.service
42ms systemd-random-seed.service
38ms sys-kernel-config.mount
37ms sys-kernel-debug.mount
36ms dropbear.service
23ms boot.mount
22ms tmp.mount
21ms console-setup.service
21ms systemd-update-utmp-runlevel.service
21ms rng-tools.service
20ms ifupdown-pre.service
19ms systemd-user-sessions.service
19ms var-log.mount
8ms minio.service

I can see now for what it need that much time - but the question remains: why?

Hope someone can help me - though my Pi isn't expected to be rebooted that often it's definitely annoying if it takes that long!

Thanks in advance to all aand especially to the DietPi-Team for their work!
User avatar
Joulinar
Posts: 5096
Joined: Sat Nov 16, 2019 12:49 am

Re: Slow boot

Post by Joulinar »

well it takes 35 seconds for your USB device to get ready, which is incredibly slow. That's why the rest of the system takes that long to boot up

Code: Select all

34.175s dev-sda2.device
Usually less than 1 sec should be the goal. you could check dmesg and/or journalctl right after reboot on further timings
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
warchild
Posts: 6
Joined: Tue Jan 19, 2021 7:36 am

Re: Slow boot

Post by warchild »

Joulinar wrote: Tue Jan 19, 2021 10:29 am well it takes 35 seconds for your USB device to get ready, which is incredibly slow. That's why the rest of the system takes that long to boot up

Code: Select all

34.175s dev-sda2.device
Usually less than 1 sec should be the goal. you could check dmesg and/or journalctl right after reboot on further timings
OK, when i'm later back home i'll check this.
And i ordered another SATA->USB adapter. Maybe there's something wrong. Though i know i used it unter Windows before and did not experience any odd behavior?!
User avatar
Joulinar
Posts: 5096
Joined: Sat Nov 16, 2019 12:49 am

Re: Slow boot

Post by Joulinar »

can you have a look what adapter you are using? We have some reports about challenges on JMicron adapter

viewtopic.php?f=9&t=8349
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
warchild
Posts: 6
Joined: Tue Jan 19, 2021 7:36 am

Re: Slow boot

Post by warchild »

Joulinar wrote: Tue Jan 19, 2021 4:40 pm can you have a look what adapter you are using? We have some reports about challenges on JMicron adapter

viewtopic.php?f=9&t=8349
Indeed JMicron:

Code: Select all

Bus 002 Device 002: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
User avatar
Joulinar
Posts: 5096
Joined: Sat Nov 16, 2019 12:49 am

Re: Slow boot

Post by Joulinar »

we have a couple of reports for these adaptor using JMicron chip. If possible try to use a different one, as this was the solution nearly all case.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
warchild
Posts: 6
Joined: Tue Jan 19, 2021 7:36 am

Re: Slow boot

Post by warchild »

New USB-SATA adapter will be delivered today, will give update once i exchanged them.

Thanks so far for the help!
User avatar
Joulinar
Posts: 5096
Joined: Sat Nov 16, 2019 12:49 am

Re: Slow boot

Post by Joulinar »

Hope the new adapter is going to work and did not contain this chip
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
warchild
Posts: 6
Joined: Tue Jan 19, 2021 7:36 am

Re: Slow boot

Post by warchild »

As per Description it should be AsMedia Chip.
So I'm optimistic it will solve the problem.
warchild
Posts: 6
Joined: Tue Jan 19, 2021 7:36 am

Re: Slow boot

Post by warchild »

Joulinar wrote: Tue Jan 19, 2021 9:09 pm we have a couple of reports for these adaptor using JMicron chip. If possible try to use a different one, as this was the solution nearly all case.
It's obviously the JMicron. The new adapter arrived, i changed it and "boom":

Code: Select all

6.474s dietpi-boot.service
          5.793s unbound.service
          2.240s dev-sda2.device
           443ms systemd-udev-trigger.service
           434ms keyboard-setup.service
           392ms systemd-fsck-root.service
           388ms rpi-eeprom-update.service
           374ms pihole-FTL.service
           284ms netfilter-persistent.service
           279ms systemd-journald.service
           253ms php7.3-fpm.service
           230ms dietpi-preboot.service
           227ms systemd-fsck@dev-disk-by\x2dpartuuid-ad09722e\x2d01.service
           222ms smbd.service
           215ms lighttpd.service
           212ms phpsessionclean.service
           154ms wg-quick@wg0.service
           152ms nmbd.service
           124ms systemd-modules-load.service
           117ms fake-hwclock.service
           114ms systemd-remount-fs.service
           101ms systemd-tmpfiles-setup.service
            95ms networking.service
            90ms dietpi-ramlog.service
            79ms systemd-sysctl.service
            71ms kmod-static-nodes.service
            66ms systemd-udevd.service
            56ms systemd-journal-flush.service
            53ms systemd-tmpfiles-setup-dev.service
            53ms systemd-update-utmp.service
            49ms sys-kernel-debug.mount
            47ms systemd-sysusers.service
            42ms dev-mqueue.mount
            40ms systemd-random-seed.service
            34ms systemd-tmpfiles-clean.service
            34ms dropbear.service
            27ms rng-tools.service
            27ms console-setup.service
            22ms tmp.mount
            21ms systemd-user-sessions.service
            21ms systemd-update-utmp-runlevel.service
            20ms boot.mount
            20ms sys-kernel-config.mount
            18ms var-log.mount
            16ms ifupdown-pre.service
             9ms minio.service
Thanks for the help, and maybe this should be mentioned on some place, that you better NOT use JMicron USB-Sata adapters?!
Post Reply