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.

User avatar
Roken
Posts: 370
Joined: Sun Dec 31, 2017 4:35 pm
Location: UK

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: 5
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: 2945
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: 2945
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'.

User avatar
rin67630
Posts: 1017
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: 39169
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest 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: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

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 !

RUSH53
Posts: 1
Joined: Wed Oct 30, 2019 4:21 pm

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

Wed Oct 30, 2019 4:26 pm

I found this problem in the buster release (2019-07-10) on a PI Zero board. When I reflashed my SD card with stretch-lite (2018-11-13), the problem went away. Possible bug?

swahren
Posts: 141
Joined: Mon Sep 19, 2016 5:24 pm
Location: Germany

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

Fri Nov 01, 2019 6:24 pm

The kernel output "random: crng init done" isn't an issue. It's only the information that the random number generator is initialized, which happend usually happend very late at boot process.

In the most described cases the rootfs won't get mounted, but this is hard to say because of the lack of real helpful information like dmesg.

LdB
Posts: 1576
Joined: Wed Dec 07, 2016 2:29 pm

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

Thu Nov 07, 2019 3:10 am

Ran across this problem myself, it comes if you edit cmdline.txt and change the PARTUUID number in any way usually by accidental keypress :-)

Polo Nord
Posts: 4
Joined: Sun Dec 08, 2019 5:21 pm

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

Sun Dec 08, 2019 5:50 pm

I have the same problem but pressing enter don't anythings

User avatar
Roken
Posts: 370
Joined: Sun Dec 31, 2017 4:35 pm
Location: UK

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

Mon Dec 30, 2019 2:31 pm

A vital piece if information, especially for those that have changed cmdline.txt would be to boot a desktop linux distro (liveCD will suffice) and, with your SDCard/USB HDD plugged in, run

Code: Select all

sudo blkid
and include the output in your post.
Headless PI. OMG, someone cut it's head off. Oh, hang on. it didn't have one to start with.

mdshami
Posts: 1
Joined: Sun May 03, 2020 10:31 am

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

Sun May 03, 2020 11:05 am

Roken wrote:
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
Hi this is shami,

At present, I am facing same issue in NFS . When i try to boot from NFS it is showing the same error. May i know how do you to the solution of this issue?

Thank you in advance

Return to “Linux Kernel”