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 ?

gagantous
  • 363

4 Answers4

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.

Fabby
  • 34,259
3

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.

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
kanehekili
  • 6,402
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
Bob91
  • 1,172