[SOLVED] 3 min boot with SSD

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
valerio-pescatori
Level 1
Level 1
Posts: 4
Joined: Mon Jun 11, 2018 5:12 pm

[SOLVED] 3 min boot with SSD

Post by valerio-pescatori »

Hi everyone, first of all, let me say I'm a really newbie so I guess someone should slowly take me step by step through the solution in order to solve my problem.
I've just installed linux mint on a new 60GB SSD but booting looks like slower than before and I can't understand where the problem is.. I've searched and searched through the forum but i weren't able to solve my problem.. running systemd-analyze i get:

Code: Select all

Startup finished in 13.428s (kernel) + 3min 548ms (userspace) = 3min 13.977s
and I don't really know what does "userspace" means.. Can someone help me pls?
Running Linux Mint 18.3 Sylvia
Last edited by valerio-pescatori on Tue Jun 12, 2018 12:08 pm, edited 1 time in total.
User avatar
xenopeek
Level 24
Level 24
Posts: 24979
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: 3 min boot with SSD

Post by xenopeek »

Userspace, or userland, is code that doesn't run in the Linux kernel. Overview here: https://en.wikipedia.org/wiki/User_space#Overview. Most things on your computer run in userspace.

Suggest running the commands from this post viewtopic.php?t=226892 and sharing the output here on your topic. This will collect information about your boot and any errors during boot.
Image
valerio-pescatori
Level 1
Level 1
Posts: 4
Joined: Mon Jun 11, 2018 5:12 pm

Re: 3 min boot with SSD

Post by valerio-pescatori »

Thank you for your time, here's what came out:
https://pastebin.com/TyXFBDfq
User avatar
xenopeek
Level 24
Level 24
Posts: 24979
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: 3 min boot with SSD

Post by xenopeek »

It shows a delay waiting for your swap partition to become available. It's configured in your /etc/fstab file as such:

Code: Select all

# swap was on /dev/sda5 during installation
UUID=1c270168-2a04-49ad-904c-87515cfab16b none            swap    sw              0       0
But in your partition overview that partition does not exist:

Code: Select all

sdb     55,9G disk                  
└─sdb1  55,9G part ext4   /          ee59c40b-734a-4db3-b752-629e37454baa
sda    232,9G disk                  
└─sda1 232,9G part ext4   /hdd       28342077-b01f-4a04-b12e-0f6772b7d8bc
To fix your boot time edit your /etc/fstab file (gksudo xed /etc/fstab) and put a # in front of the UUID=1c270168-2a04-49ad-904c-87515cfab16b none swap sw 0 0 line.

Then you have to decide as to whether you indeed don't need swap on this system. Strictly put you could run without swap but depending on the kind of programs you run you might get out of memory errors. If you're fine not using swap you're done. If you do want to use swap it's probably easiest to just add a swap file instead of a swap partition. I can share how to do that if you want.
Image
valerio-pescatori
Level 1
Level 1
Posts: 4
Joined: Mon Jun 11, 2018 5:12 pm

Re: 3 min boot with SSD

Post by valerio-pescatori »

yes, it was the old swap partition before I formatted the sda disk.. it would be great if you could show me how to add a swap file, thank you.
User avatar
xenopeek
Level 24
Level 24
Posts: 24979
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: 3 min boot with SSD

Post by xenopeek »

Sure. First consider how large your swap should be. If you want to be able to hibernate it should be at least equal to your system RAM so 4 GB. You could otherwise do less or more, depending on what you think you need.

Then run this command to pre-allocate the swapfile space. Replace 4G with how large you want swap to be (e.g, 2G for 2 GB if you think half will suffice). You can easily adjust this later.
sudo fallocate -l 4G /swapfile

May take a bit to complete. Then set the swapfile permissions with this command:
sudo chmod 600 /swapfile

Finally make the swapfile an actual swap and turn it on:
sudo mkswap /swapfile
sudo swapon /swapfile


Now your swap is in use. Last actual is to edit your /etc/fstab file again and add a line at the end of the file to configure your swapfile to be used automatically on future boots. Add this line:
/swapfile none swap defaults 0 0
Image
valerio-pescatori
Level 1
Level 1
Posts: 4
Joined: Mon Jun 11, 2018 5:12 pm

Re: [SOLVED] 3 min boot with SSD

Post by valerio-pescatori »

Much easier than I thought!
I'm really grateful man, you really sped up my pc's boot, thank you a lot!

Code: Select all

Startup finished in 12.956s (kernel) + 6.405s (userspace) = 19.361s
(Maybe it ain't the faster boot ever but I spent only 30$ so that's ok I guess :lol: )
:D :D :D :D :D
User avatar
xenopeek
Level 24
Level 24
Posts: 24979
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: [SOLVED] 3 min boot with SSD

Post by xenopeek »

Welcome :)
Image
Post Reply

Return to “Installation & Boot”