LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 03-28-2019, 05:28 AM   #1
bodge99
Member
 
Registered: Oct 2018
Location: Ashington, Northumberland
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368

Rep: Reputation: 66
Mint 19.1 with latest stable kernel. Ultra slow boot fix.


Fix for slow boot with newer kernels on older hardware.
Dmesg shows large delay before "crng init done."
I hope that this is useful to somebody...

Background:

I've recently been working to resurrect an old Zoostorm laptop. This is actually a rebadged Clevo W251HU laptop which died in 2015 due to thermal runaway in Windows 7.

I obtained a replacement motherboard from a similar model (a W251EU). The only difference is the connection of the audio jack/USB daughter board, (a flat cable on the W251EU and a mini plug/ribbon cable on the original W251HU).
I also needed a new battery as the old one was totally dead.

With parts obtained, coupled with a reasonable SSD, the latest BIOS update available and some decent heatsink paste, I then proceeded to rebuild the machine.
Everything went fine until I reached the point of installing Linux Mint 19.1 .

/Background

A "poor quality" BIOS which doesn't support GPT properly caused a few problems until I had hit on the correct BIOS settings for a working MBR Linux installation.

The installation was smooth and error free. On rebooting I fully updated the machine and installed the latest stable kernel using UKUU (kernel 5.0.5).

On rebooting again, the problems started. Boot times had increased from seconds to minutes, Bluetooth failed and wifi was shown as hard locked. The keyboard combo Fn + F11 would unlock wifi but it remained flakey.

I spent a couple of hours looking at the Bluetooth and wifi problems (a mistake here, I should have looked more closely at what dmesg was telling me).. After working out how to disable them fully on boot (no Bios options to do this) I found that the slow boot problem remained.

Original dmesg extract:
Code:
[    5.616124] RTL8211E Gigabit Ethernet r8169-302:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=r8169-302:00, irq=IGNORE)
[    5.802721] r8169 0000:03:00.2 enp3s0f2: Link is Down
[  139.712493] random: crng init done
[  139.712499] random: 7 urandom warning(s) missed due to ratelimiting
[  181.079833] iwlwifi 0000:02:00.0: RF_KILL bit toggled to enable radio.
[  181.079838] iwlwifi 0000:02:00.0: reporting RF_KILL (radio enabled)
There is a big clue at 139 seconds i.e. "crng init done."
A little research showed that prior to this point, "the entropy pool is depleted". This is used for random number generation purposes.

Another quote:
"The system has long reached its default boot target before the kernel gathered enough entropy to initialize the pool. Due to systemd requiring entropy at an early stage, it may happen though that the pool is depleted in the boot process without further kernel warnings."

The fix, in this case, is to use haveged.

Quote:
"Haveged is an easy-to-use, unpredictable random number generator based upon an adaptation of the HAVEGE algorithm. Haveged was created to remedy low-entropy conditions in the Linux random device that can occur under some workloads, especially on headless servers"

This is installed and initialised on a systemd machine as follows:
Code:
sudo apt install haveged
sudo systemctl enable haveged
After a reboot, the machine now works great. Boot times are now as expected and all hardware works perfectly.

Bodge99

Last edited by bodge99; 03-28-2019 at 05:30 AM. Reason: typo
 
Old 04-05-2019, 07:37 AM   #2
waylon.t.nii@gmail.com
LQ Newbie
 
Registered: Apr 2019
Posts: 1

Rep: Reputation: Disabled
Hi.
I am running Linux Mint 19.1 on an Advent 7208.

After following the procedures mentioned above my boot time was still about seven minutes.
On boot up there were numerous 'drm_kms_helper' error messages

I then entered the following in Terminal:-

sudo apt-get remove xserver-xorg-video-intel
xed admin:///etc/default/grub
sudo update-grub

After a reboot my boot time was less than a minute.

I hope this is of use to someone.

Regards, Waylon
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: UKTools – Easy Way To Install Latest Stable Linux Kernel On Ubuntu/Mint And Derivatives LXer Syndicated Linux News 0 05-08-2018 08:03 PM
long time boot linux mint at a toshiba laptop. Tested also Debian and Ubuntu latest stable releases geting similar issues. jorgespain76 Linux Mint 8 09-10-2016 02:54 PM
What is it that makes Ultra X Linux so "Ultra Fast" and "Ultra Reliable?" foodown Ultra X 1 07-10-2009 06:04 PM
ultra-2 and ultra-3 SCSI drives on the same bus? PsychosisNode Linux - Hardware 3 12-25-2004 12:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration