Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
aports
aports
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 651
    • Issues 651
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 189
    • Merge Requests 189
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • aportsaports
  • Issues
  • #11216

Closed
Open
Opened Feb 11, 2020 by Davy Landman@davy.landman
  • Report abuse
  • New issue
Report abuse New issue

70 seconds delay during boot of raspberry pi due to lack of entropy?

I've been enjoying alpine on the raspberry pi, after the initial setup struggle (#11210) it works quite nicely.

But I did notice a quite long delay during booting. It's after the loading progress bar and the creating initramfs image message. Looking at the dmesg, there seems to be a 70 seconds before random is done initializing. Seeing #9960 (closed) and comments about not having an ARM solution, I guess this is related to entropy?

So I did 2 things:

  1. As suggested in #9960 (closed) I installed rng-tools and added rngd at boot level
  2. Flashed lastest rasbian on same SD card.

Here is what I learned.

Raspian Lite

[    0.000000] Linux version 4.19.97+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1294 Thu Jan 30 13:10:54 GMT 2020 
....
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x494 with crng_init=0 
....
[    2.246096] random: fast init done
....
[    8.755949] random: systemd: uninitialized urandom read (16 bytes read)
[    8.787834] random: systemd: uninitialized urandom read (16 bytes read)
[    8.797997] systemd[1]: Listening on udev Control Socket.
[    8.809610] random: systemd: uninitialized urandom read (16 bytes read)
....
[   24.256082] random: crng init done
[   24.256107] random: 7 urandom warning(s) missed due to ratelimiting

raspbian-dmesg.log

Alpine 3.11.3

[    0.000000] Linux version 5.4.12-0-rpi (buildozer@build-3-11-armhf) (gcc version 9.2.0 (Alpine 9.2.0)) #1-Alpine Thu Jan 16 14:37:06 UTC 2020
....
[    0.000000] random: get_random_u32 called from __kmem_cache_create+0x20/0x310 with crng_init=0
....
[    2.306888] random: fast init done
....
[    3.609602] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:e9:4e:e0
[   76.841124] random: crng init done

alpine-rngd-dmesg.log

(there are no messages excluded between 3.6 and 76.8)

Analysis

Raspbian takes 30s to boot the kernel, alpine takes 93s. More than a minute slower.

I love to help and debug this, but I'm a bit lost what else to try.

(For installation I followed the Wiki's instructions)

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: alpine/aports#11216