5

I have a problem with my laptop which have windows 7 and ubuntu 18 installed in my ASUS laptop. Whenever i tried to use Ubuntu OS it takes maybe an hour or more (like i do some chores while waiting for Ubuntu to startup, maybe like 2-5 hours, but the Ubuntu still on that logo "Ubuntu" and that 5 dote changed color constantly ).

The question is, sometimes it's boot like normal booting ( takes maybe 2-5 minutes, until the login screen appear ) but when i choose windows first, and shut down immediately after the Desktop Windows appear (with a procedural shutdown step ), and chose Ubuntu OS, it happens again, the ubuntu take maybe an hour, and it pain in the ass, because sometimes i am in hurry to use Ubuntu, and this problem make me so frustrated. When it's happening i pressed the power button to force-shutdown the laptop. But it's didn't solved the issue. I will have to wait for maybe 2-4 hours to make the ubuntu booting normally again ( 2-4 minutes), this is also happen with Ubuntu 16.x ( now i am using 18.x ). My windows took a normal booting times ( like 5-10 minutes, to completely load all the services and ready to used )

How could i make my Ubuntu load fast even when i changed from windows OS to Ubuntu ?

EDIT

I have did what WinEunuuchs2Unix had suggest, which Turn off Plymouth to see kernel boot messages, and that's really helpful. The process got stuck in XAMPP services like image below. Its already one hour and it still in that process.

enter image description here

How to resolved this ?

  • Do you have windows 7 setup for hibernation? – WinEunuuchs2Unix Dec 25 '18 at 13:00
  • @WinEunuuchs2Unix yes i do – gagantous Dec 25 '18 at 13:02
  • You need to turn off hiberatiion and then it should boot normally. – WinEunuuchs2Unix Dec 25 '18 at 13:03
  • 1
    You say you "usually choose shut down". You also say sometimes it reboots normally and sometimes it takes hours to reboot. If you don't really need hibernation in Windows the answer I posted allows you to totally remove it. I can't say for sure this is what is happening though. – WinEunuuchs2Unix Dec 25 '18 at 13:12
  • 1
    In case you didn't notice, I updated my answer with instructions to see what kernel message(s) the computer gets stuck on for an hour. – WinEunuuchs2Unix Dec 25 '18 at 13:50
3
+50

Turn off Plymouth to see kernel boot messages

When your computer boots up normally there is a purple screen with cycling dots. Kernel messages are hidden from you. If you computer stops to "think" for an hour we need to know what step is causing the delay. To see the steps do the following:

sudo -H gedit /etc/default/grub

This opens up gedit text editor find the line that starts with:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ..."

Change the line to read:

GRUB_CMDLINE_LINUX_DEFAULT="noplymouth ..."

Save the file and exit `gedit. Now run:

sudo update-grub

From now on when you boot up you won't see a fancy splash screen but rather scrolling kernel messages. The message(s) it pauses a long time at you can write down or take a picture of with your smartphone. Then post these messages into your question.

Reverse the above steps to get your plymouth splash screen back, ie use "quiet splash..." in place of "noplymouth...". Note the ... represents other instructions you may or may not have. DO NOT enter ... into the command.

Windows 7 turn off Hibernation

OP is using Hibernation in Windows 7. This article: Disable Windows hibernation and free up disk space provides steps to turn it off:

  1. Click Start, and then type cmd in the Start Search box.
  2. In the search results list, right-click Command Prompt, and then click Run as Administrator.
  3. If you are prompted by User Account Control, click Continue.
  4. At the Command Prompt, type powercfg.exe /hibernate off, and then press ENTER.
  5. Type exit and then press ENTER to close the Command Prompt window.

See the link for more explanations and helpful images.

Windows 8/10 turn off Fast Startup

For other users, it could be a case of Windows 8/10 "Fast Startup" causing Ubuntu to "Slow Startup". Please read this article: How to disable Windows 10 fast startup (and why you'd want to) highlights:

Why disable fast startup?

Leaving fast startup enabled shouldn't harm anything on your PC — it's a feature built into Windows — but there are a few reasons why you might want to nevertheless disable it.

One of the major reasons is if you're using Wake-on-LAN, which does not work when your PC is shut down with fast startup enabled. Others would like to save the hard drive space that is usually taken up with the hibernation file, and Linux users will likely see complications with dual boot and virtualization. Furthermore, some users have even reported that power buttons on their keyboard will not work and fans in their PCs will continue spinning. These problems are by no means across the board, but they can prove to be frustrating.

Steps to disable Fast Startup

  1. Right-click the Start button.

  2. Click Search.

  3. Type Control Panel and hit Enter on your keyboard.

  4. Click Power Options.

  5. Click Choose what the power buttons do.

  6. Click Change settings that are currently unavailable.

  7. Click Turn on fast startup (recommended) so that the checkmark disappears.

  8. Click Save changes.

Visit the link above for these same steps along with images and narrative.

  • Upgoated as your answer is more elaborate, but leaving in mine as that might help future users finding this question... – Fabby Dec 25 '18 at 14:35
  • hi, i have tried your advise and got a result, please check my edited question – gagantous Dec 25 '18 at 17:43
  • Can you tell me why you are using both Postres SQL and MySQL? They aren't mounting the same database are they? – WinEunuuchs2Unix Dec 25 '18 at 18:14
  • Well, i use two databases because i want to learn many kind of database, and i think postgresql is a bit different with mysql, so i ended install two databse. – gagantous Dec 25 '18 at 21:51
  • I would disable both SQL's from loading during kernel boot up and see if that fixes problem. If so then simply load one or the other after boot to use it. – WinEunuuchs2Unix Dec 25 '18 at 21:53
5

You're probably warm booting from Windows to Ubuntu and neither Microsoft nor the Linux kernel developers test side effects of one on the other and with UEFI nowadays it happens more and more.

The simple solution is to shut down Windows completely and then turn on your machine and cold boot into Ubuntu.

  • I deleted my answer and upvoted yours instead :) – WinEunuuchs2Unix Dec 25 '18 at 13:03
  • 1
    "shut down Windows and cold boot into Ubuntu." what do you mean by this ? – gagantous Dec 25 '18 at 13:03
  • 1
    OK I undeleted my answer 6 minutes later :p – WinEunuuchs2Unix Dec 25 '18 at 13:10
  • @gagantous Answer edited to clarify. If still unclear after reading the Wikipedia article, drop me another note. – Fabby Dec 25 '18 at 14:31
  • 1
    I've had to use your answer myself from time to time when the "physical power button" was required. – WinEunuuchs2Unix Dec 25 '18 at 14:51
2

The long boot time does not have anything to do with the windows OS. If linux starts, it doesn't know anything about concurrently installed OS. Grub just calls the initramfs image(the basic linux boot image) and the system is on its own.

Since your error messages are quite verbose about postgres check out this post https://serverfault.com/questions/323356/postgres-connection-establishment-slow to speed up your boot time. Ensure that the service is running:

 systemctl status postgresql
1

Just type in the terminal

systemd-analyze blame

or

systemd-analyze critical-chain

to see which service take more time to load and disable it after login with the command

sudo service your-service disable

or

sudo systemctl disable your-service.service

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.