0

I have the following output and my ubuntu boots very slowly. it takes like 2-3 minutes to boot up where was windows only takes like 15 seconds. Here the output of journalctl: http://paste.ubuntu.com/24706296/

It would be nice if someone could help me as i'd really like to boot fast into ubuntu.

I have everything on SSD (/) but only /var and /home on hdd.

Edit:

sudo blkid:

/dev/sda1: LABEL="Wiederherstellung" UUID="1E5EB9035EB8D4AD" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="daad9650-8cde-491d-80db-7dda8e1874c0"
/dev/sda2: UUID="56B9-5488" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="419f5006-cb88-4fcc-9b5e-39ca6d657edb"
/dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="e924079c-0c0c-4157-b82d-85f0a8ef5e8c"
/dev/sda4: UUID="6862CAA762CA78F8" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="4c2eb33b-8ea1-4c7e-9c72-25c490d407ce"
/dev/sda5: UUID="76A07C5BA07C2431" TYPE="ntfs" PARTUUID="887bbacf-c0e9-44b0-bf46-1385b114068b"
/dev/sda6: UUID="c89b4926-af5a-416a-b61a-006aaa34a3cc" TYPE="ext4" PARTUUID="abab0c8d-8d6e-4529-8d94-1a88d0900861"
/dev/sda7: UUID="69152b87-29d1-410d-a49b-b31e1e9885f4" TYPE="swap" PARTUUID="7d94acf0-a66c-44d4-ba94-d3cd4ca6a31b"
/dev/sdb1: PARTLABEL="Microsoft reserved partition" PARTUUID="bdc2d24e-e974-441f-b190-b8b285579f87"
/dev/sdb2: LABEL="Volume" UUID="1A4A64574A643225" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="ec522179-fc5b-4406-a029-1036e2e1df7c"
/dev/sdb3: UUID="da267417-9a48-45a2-a3e2-2bc62163003a" TYPE="ext4" PARTUUID="8c1e23df-5f97-44f8-a344-3fb713b13bf6"
/dev/sdb4: UUID="f2362bd0-5a3d-4e0f-b915-d7ab299d0be9" TYPE="ext4" PARTUUID="c85406d4-71fc-46f6-a9c4-a4f76b2cc185"

cat /etc/fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=c89b4926-af5a-416a-b61a-006aaa34a3cc /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=56B9-5488  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdb4 during installation
UUID=f2362bd0-5a3d-4e0f-b915-d7ab299d0be9 /home           ext4    defaults        0       2
# /var was on /dev/sdb3 during installation
UUID=da267417-9a48-45a2-a3e2-2bc62163003a /var            ext4    defaults        0       2
/swapfile                                 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

free -h:

              total        used        free      shared  buff/cache   available
Mem:           7,7G        2,8G        121M         92M        4,8G        4,5G
Swap:          7,8G          0B        7,8G

uwe@loopy-ubuntu:~$ swapon

NAME      TYPE      SIZE USED PRIO
/dev/sda7 partition 7,8G   0B   -1

uwe@loopy-ubuntu:~$ ls -al /

total 1541232
drwxr-xr-x  24 root root       4096 Mai 29 08:00 .
drwxr-xr-x  24 root root       4096 Mai 29 08:00 ..
drwxr-xr-x   2 root root       4096 Mai 29 08:00 bin
drwxr-xr-x   4 root root       4096 Mai 29 00:07 boot
drwxr-xr-x   2 root root       4096 Mai 28 23:02 cdrom
drwxr-xr-x  20 root root       4480 Mai 30 11:52 dev
drwxr-xr-x 139 root root      12288 Mai 29 21:38 etc
drwxr-xr-x   5 root root       4096 Mai 28 23:02 home
lrwxrwxrwx   1 root root         33 Mai 29 00:04 initrd.img -> boot/initrd.img-4.10.0-22-generic
drwxr-xr-x  25 root root       4096 Mai 29 00:24 lib
drwxr-xr-x   2 root root       4096 Mai 29 00:06 lib32
drwxr-xr-x   2 root root       4096 Apr 12 05:06 lib64
drwx------   2 root root      16384 Mai 28 22:51 lost+found
drwxr-xr-x   3 root root       4096 Mai 29 08:00 media
drwxr-xr-x   2 root root       4096 Apr 12 05:06 mnt
dr-xr-xr-x 325 root root          0 Mai 30 11:50 proc
drwx------   3 root root       4096 Apr 12 05:17 root
drwxr-xr-x  30 root root        940 Mai 30 11:56 run
drwxr-xr-x   2 root root      12288 Mai 29 00:06 sbin
drwxr-xr-x   2 root root       4096 Apr  6 10:32 snap
drwxr-xr-x   2 root root       4096 Apr 12 05:06 srv
-rw-------   1 root root 1578106880 Mai 28 23:01 swapfile
dr-xr-xr-x  13 root root          0 Mai 30 11:58 sys
drwxrwxrwt  19 root root       4096 Mai 30 11:56 tmp
drwxr-xr-x  11 root root       4096 Mai 29 00:06 usr
drwxr-xr-x  15 root root       4096 Apr 12 05:18 var
lrwxrwxrwx   1 root root         30 Mai 29 00:04 vmlinuz -> boot/vmlinuz-4.10.0-22-generic

New ls -alh /swapfile:

-rw------- 1 root root 4,0G Mai 30 22:40 /swapfile

uwe@loopy-ubuntu:~$ free -h total used free shared buff/cache available Mem: 7,7G 3,7G 1,3G 129M 2,8G 3,7G Swap: 4,0G 0B 4,0G

journalctl: uwe@loopy-ubuntu:~$ journalctl --boot | pastebinit http://paste.ubuntu.com/24737809/

I created the swapfile myself. http://paste.ubuntu.com/24737883/

1

Partial answer... work in progress...

Step 1:

You may have some disk corruption on your SSD.

Lets first check your file system for errors.

To check the file system on your Ubuntu partition...

  • boot to the GRUB menu
  • choose Advanced Options
  • choose Recovery mode
  • choose Root access
  • at the # prompt, type sudo fsck -f /
  • repeat the fsck command if there were errors
  • type reboot

Step #2: DON'T DO THIS UNTIL I TELL YOU TO

Now we begin to fix your /swapfile problem.

Edit your /etc/fstab...

gksudo gedit /etc/fstab

Change this line:

/swapfile   none   swap    sw              0       0

To this:

#/swapfile   none   swap    sw              0       0

Save the file and quit gedit.

Reboot and note if there's a boot time improvement.

More pending...

If boot times improved... delete /swapfile...

Create a swap partition or swapfile on /dev/sdb...

Edit /etc/fstab...

Delete /dev/sda7 swap partition...

Step #3:

There seems to be problems with 17.04 and encrypted swapfiles... and there are some workarounds...

Edit your /etc/crypttab like so:

gksudo gedit /etc/crypttab

Change this line:

cryptswap1 UUID=xxxx-xxxx-xxxx-xxxx /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

To this:

cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

Also make sure that your /etc/fstab contains this:

/swapfile               none  swap  sw  0  0
/dev/mapper/cryptswap1  none  swap  sw  0  0

References:

Ubuntu Desktop 17.04 64bit slow boot

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1668535

https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/1670336

  • I've completeley reinstalled before I read your answer. It didn't help my bootup still takes long. I've set up a completely new swapfile, now the swap works. After reboot I have 4GBs of swap. Anyway, I did what u said, scan my filesystem for errors, but i didnt get anything. What I got was some error about cryptswap. Because I set my home folder to be encrypted. Heres a picture of everything: goo.gl/photos/p6MwdPBJjNEXt9Cq6 – Uwe Pfeifer May 30 '17 at 20:52
  • ive tried commenting /swapfile in /etc/fstab but it didnt help. it still loads that long. one thing. when the system boots up, for a really short time it displays some text but it goes away too fast i cant read it. is it possible that my system scans something every time on boot up? – Uwe Pfeifer May 30 '17 at 23:41
  • I only wanted to comment out your original /swapfile because it was causing problems. It was sized incorrectly, and probably didn't have mkswap performed on it, and your journal log showed the problem. Since you've reinstalled, the /swapfile is probably fine, so commenting it out now won't make any boot difference, unless you have the same problem as before. You will still want to relocate /swapfile to the SSD. The message that you briefly see is fsck telling you that the file system is clean. – heynnema May 31 '17 at 2:49
  • this helped. thank you very much my system boots within 5 seconds now! :) – Uwe Pfeifer Jun 1 '17 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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