2bdkid
Posts: 8
Joined: Tue Oct 28, 2014 8:05 pm

Boot hang after "random: crng init done"

Sun Mar 25, 2018 11:51 pm

I pulled branch rpi-4.9.y from www.github.com/raspberrypi/linux and cross compiled the bcmrpi3 target for arm64. I copied over the kernel and *.dtb files into the boot directory. I also copied bootcode.bin, *.dat, and *.elf from www.github.com/raspberrypi/firmware into /boot. When the system boots, it stops at "random: crng init done" and will not continue. I found some other articles saying it was a power issue or sd card issue, but I built the system on a second sd card and had the same results. I'm thinking it's a kernel issue so would anyone know which kernel to try next?

2bdkid
Posts: 8
Joined: Tue Oct 28, 2014 8:05 pm

Re: Boot hang after "random: crng init done"

Wed Mar 28, 2018 3:29 am

Solution: press enter and the prompt appears.
Can't believe it took me this long...

tkninja
Posts: 1
Joined: Thu Apr 05, 2018 9:00 pm

Re: Boot hang after "random: crng init done"

Thu Apr 05, 2018 9:07 pm

By the way, this happens to me, too. You don't have to press Enter to get the prompt, however: just enter in a command, if Raspian automatically logs you in.

SoNic67
Posts: 1
Joined: Thu May 17, 2018 11:19 am

Re: Boot hang after "random: crng init done"

Thu May 17, 2018 11:27 am

In my case, pressing enter key or any command does nothing. It just moves the text on the screen one line up.

Roken
Posts: 265
Joined: Sun Dec 31, 2017 4:35 pm

Re: Boot hang after "random: crng init done"

Thu May 17, 2018 7:38 pm

I was getting this when experimenting with NFS boot - and it usually meant that the system couldn't find rootfs.

Check cmdline.txt
Headless PI. OMG, someone cut it's head off. Oh, hang on. it didn't have one to start with.

doomkin
Posts: 1
Joined: Fri Aug 10, 2018 12:47 am

Re: Boot hang after "random: crng init done"

Fri Aug 10, 2018 12:48 am

At boot, the kernel waits for mouse movements to initialize the random number generator.
Kernel messages on boot:

Code: Select all

sudo dmesg | less
The problem:

Code: Select all

kernel: random: crng init done
The solution:

Code: Select all

sudo apt install haveged
sudo systemctl enable haveged

nana199685
Posts: 4
Joined: Tue Dec 11, 2018 11:22 am

Re: Boot hang after "random: crng init done"

Fri Dec 14, 2018 11:55 am

doomkin wrote:
Fri Aug 10, 2018 12:48 am
At boot, the kernel waits for mouse movements to initialize the random number generator.
Kernel messages on boot:

Code: Select all

sudo dmesg | less
The problem:

Code: Select all

kernel: random: crng init done
The solution:

Code: Select all

sudo apt install haveged
sudo systemctl enable haveged

i meet the same problem that the screen stop at "random: crng init done"
i did modify my cmdline.txt before i reboot
but now i can't type any command you mentioned.
when i type something and press enter
it just wraps and happen nothing
i have check my power that was normal
please help me.QQ

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2134
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Boot hang after "random: crng init done"

Fri Dec 14, 2018 2:08 pm

The fact that the message says "crng init done" suggests the fault is with something else it is trying to start afterwards. Try with "initcall_debug=1" on in cmdline.txt, and then see what the last few messages say.

You say:
i did modify my cmdline.txt before i reboot
Can you remember what you changed, and have you tried changing it back?

Tmpod
Posts: 1
Joined: Thu Dec 27, 2018 10:18 am

Re: Boot hang after "random: crng init done"

Thu Dec 27, 2018 10:32 am

I have the exact same problem. I'm using raspbian lite and I started getting a kernal panic saying that it could not mount root fs onto

Code: Select all

unknown-block(179, 2) 
. After some searching I found a stackoverflow post that suggested changing something in the cmdline.txt file. So I did. And now I'm getting this. I've tried setting

Code: Select all

initcall_debug=1
and no more messages seem to appear. The boot still hangs on

Code: Select all

crng init done
. Here's cmdfile.txt copied and pasted

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=27504eef-06 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait initcall_debug=1
(what u changed was that last 06 digit at the end of the root part, that was previously 02)

Thanks in advance

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2134
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Boot hang after "random: crng init done"

Sun Dec 30, 2018 6:54 pm

Try using the old method for specifying a root fs, i.e. the name of the block device on which it appears:

Code: Select all

... root=/dev/mmcblk0p2 ...
To get more debug output you probably also need to add something like "loglevel=8'.

rin67630
Posts: 204
Joined: Fri Mar 04, 2016 10:15 am

Re: Boot hang after "random: crng init done"

Tue Jan 08, 2019 4:13 pm

doomkin wrote:
Fri Aug 10, 2018 12:48 am
At boot, the kernel waits for mouse movements to initialize the random number generator.
/quote]

Ugh! that seem a valid explanation: I am running headless and HAVE NO MOUSE NOR KEYBOARD.

Pluging a mouse releases the boot process. But that is'nt the purpose of a headless machine!

Installing haveged works!

terwik231
Posts: 1
Joined: Fri Mar 29, 2019 4:06 pm

Re: Boot hang after "random: crng init done"

Fri Mar 29, 2019 4:10 pm

I have the same issue, how do you edit that cmdline.txt file? I can`t leave boot screen

User avatar
DougieLawson
Posts: 35036
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Boot hang after "random: crng init done"

Fri Mar 29, 2019 6:03 pm

terwik231 wrote:
Fri Mar 29, 2019 4:10 pm
I have the same issue, how do you edit that cmdline.txt file? I can`t leave boot screen
You can edit cmdline.txt with your SDCard or USB device inserted into a Windows machine. Just DO NOT accept any requests where Windows will try to help you to reformat the drive - just say "NO!".
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a hippy & doctor free zone.

Ty13r
Posts: 1
Joined: Sat Apr 20, 2019 4:44 pm

Re: Boot hang after "random: crng init done"

Sat Apr 20, 2019 4:53 pm

Hello world,

i have the same trouble trying installing Kally on my PI 3 B+.

I change my cmdline.txt like this :

Code: Select all

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=27504eef-06 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait initcall_debug=1
i use this img "kali-linux-2019.1-rpi3-nexmon-64" flashing buy "balenaEtcher" after being format by SD Card formatter.
My Sd card is : scanDisk Ultra 16GB micro SD HC1

I tryed to press enter / move my moose / nothing happened. I don't find anything working on internet.

Tks !

Return to “Linux Kernel”