Delay on startup after switching to SSD on laptop + Upgrade to 13.1

After switching to the SSD from the HDD on my laptop (and following upgrade to 13.1) I’m experiencing a pretty long delay on startup. It happens somewhere before Login request.

If I use arrow keys, then I can see output telling me something about time out on trying to connect to a partition on my old HDD as well as a couple of other messages. Last of them says about apparmor.
The strange thing is, the graphical startup screen seems to blink multiple times and console seems to generate messages, but they seems to be the same messages again and again.
The whole system start till the login screen takes about one minute.

In the boot logs I’ve found following entries:


 /usr/sbin/cron[2311]: pam_unix(crond:session): session opened for user root by (uid=0)
systemd[1]: Starting user-0.slice.
systemd[1]: Created slice user-0.slice.
systemd[1]: Expecting device dev-disk-by\x2did-ata\x2dHitachi_HTS545050B9A300_120517PBN4751710V8WE\x2dpart5.device...
systemd[1]: Starting User Manager for 0...
systemd[1]: Starting Session 2 of user root.
systemd[1]: Started Session 2 of user root.
systemd: pam_unix(systemd-user:session): session opened for user root by (uid=0)
systemd[2312]: Failed to open private bus connection: Failed to connect to socket /run/user/0/dbus/user_bus_socket: No such file or directory
...
systemd[1]: Job dev-disk-by\x2did-ata\x2dHitachi_HTS545050B9A300_120517PBN4751710V8WE\x2dpart5.device/start timed out.systemd[1]: Timed out waiting for device dev-disk-by\x2did-ata\x2dHitachi_HTS545050B9A300_120517PBN4751710V8WE\x2dpart5.device.
systemd[1]: Dependency failed for /dev/disk/by-id/ata-Hitachi_HTS545050B9A300_120517PBN4751710V8WE-part5.

And the systemd-analyze tells, that I should take a look on the user space:

Startup finished in 3.731s (kernel) + 3min 312ms (userspace) = 3min 4.043s

It brought me to the idea, that my system tries to find/mount the exchanged hdd and waits till timeout and possibly repeats the attempts multiple times.

The systemd-analyze blame command generates following output:


           566ms systemd-udev-settle.service
           335ms apparmor.service
           325ms SuSEfirewall2.service
           175ms media-DataStore.mount
           163ms SuSEfirewall2_init.service
           108ms ModemManager.service
           101ms systemd-fsck@dev-disk-by\x2duuid-60ca15d7\x2d01ce\x2d4f48\x2d95ce\x2d60d2ef77997d.service
            84ms xdm.service
            76ms kmod-static-nodes.service
            72ms bluetooth.service
            71ms systemd-vconsole-setup.service
            71ms media-readyshare.mount
            68ms avahi-daemon.service
            68ms systemd-sysctl.service
            66ms wpa_supplicant.service
            64ms systemd-readahead-replay.service
            63ms systemd-readahead-collect.service
            63ms NetworkManager.service
            63ms dev-hugepages.mount
            62ms dev-mqueue.mount
            62ms systemd-udev-root-symlink.service
            53ms systemd-tmpfiles-clean.service
            51ms rsyslog.service
            48ms systemd-logind.service
            45ms systemd-remount-fs.service
            42ms alsa-restore.service
            41ms udisks2.service
            32ms polkit.service
            27ms lvm2-activation.service
            27ms lvm2-activation-early.service
            26ms user@0.service
            26ms plymouth-start.service
            25ms user@1000.service
            21ms systemd-udev-trigger.service
            15ms plymouth-read-write.service
            14ms home.mount
            14ms rc-local.service
            12ms systemd-tmpfiles-setup-dev.service
            11ms upower.service
             9ms systemd-tmpfiles-setup.service
             8ms systemd-modules-load.service
             7ms systemd-journal-flush.service
             7ms systemd-backlight@acpi_video0.service
             6ms NetworkManager-dispatcher.service
             5ms systemd-update-utmp.service
             5ms systemd-random-seed.service
             5ms systemd-readahead-done.service
             5ms NetworkManager-wait-online.service
             5ms systemd-update-utmp-runlevel.service
             4ms var-lock.mount
             4ms var-run.mount
             4ms sys-kernel-debug.mount
             3ms sys-fs-fuse-connections.mount
             3ms systemd-user-sessions.service
             3ms systemd-udevd.service

Any help would be appreciated.

Please post output of


su -c 'fdisk -l'

cat /etc/fstab

You can also inspect and alter the partitioning / mounting in Yast - System - Partitioner.

The output of the first command is as follows:

$ su -c 'fdisk -l'
Passwort: 

Disk /dev/sda: 256.1 GB, 256060514304 bytes, 500118192 sectors
Units = Sektoren of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d4025


   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sda1            2048      821247      409600   27  Hidden NTFS WinRE
/dev/sda2   *      821248   252479487   125829120    7  HPFS/NTFS/exFAT
/dev/sda3       252479488   500118191   123819352    5  Extended
/dev/sda5       252481536   260290559     3904512   82  Linux swap / Solaris
/dev/sda6       260292608   340684799    40196096   83  Linux
/dev/sda7       340686848   500117503    79715328   83  Linux

And of the second one:

$ cat /etc/fstab
/dev/disk/by-id/ata-Hitachi_HTS545050B9A300_120517PBN4751710V8WE-part5 swap                 swap       defaults              0 0
UUID=339d1528-cd63-4622-8b55-526836f61ea0 /                    ext4       errors=remount-ro     1 1
UUID=60ca15d7-01ce-4f48-95ce-60d2ef77997d /home                ext4       defaults              1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
#readyshare smb
//10.0.0.1/USB_Storage  /media/readyshare       cifs    guest,user,rw,noexec,uid=1000,gid=100,file_mode=0117,dir_mode=007      0       0
# windows DataStore
UUID=36E8F65BE8F618B7   /media/DataStore        ntfs    rw,auto,users,exec,nls=utf8,fmask=117,dmask=007,gid=100,uid=1000       0       0

It looks like it wants to mount the swap partition from the removed drive… I’ll try to correct it and see what happen.

Thanks a lot for a good tip.

I was a little bit confused by the yast partitioner.
It has shown the swap on the /sda5 and I only have noticed, that it wasn’t mounted as I’ve chosen the editing of the swap partition. After having selected to mount this swap partition and having applied the changes I’ve noticed, that the fstab got the new row for swap on /sda5 but the old erroneous one remained.

The new output of the ‘cat /etc/fstab’:

/dev/disk/by-id/ata-Hitachi_HTS545050B9A300_120517PBN4751710V8WE-part5 swap                 swap       defaults              0 0UUID=339d1528-cd63-4622-8b55-526836f61ea0 /                    ext4       errors=remount-ro     1 1
UUID=60ca15d7-01ce-4f48-95ce-60d2ef77997d /home                ext4       defaults              1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0                                 
#readyshare smb                                                                                                
//10.0.0.1/USB_Storage  /media/readyshare       cifs    guest,user,rw,noexec,uid=1000,gid=100,file_mode=0117,dir_mode=007      0       0                                                                                      
# windows DataStore                                                                                            
UUID=36E8F65BE8F618B7   /media/DataStore        ntfs    rw,auto,users,exec,nls=utf8,fmask=117,dmask=007,gid=100,uid=1000       0       0                                                                                      
                                                                                                               
/dev/disk/by-id/ata-SanDisk_SDSSDHP256G_134343401379-part5 swap                 swap       defaults              0 0

I’ll comment the row manually and try to reboot.

By the way, is it correct to mount the swap at the end?

On 2013-12-21 19:36, kostgr wrote:

> By the way, is it correct to mount the swap at the end?

Traditionally, fstab entries were activated in the order they appear. Swap entry at the end might be
important if you need swap space early.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” (Elessar))

You can have multiple swaps/ so you have to tell Yast to not mount the old one or remove the line in fstab

Noe that the second line seems to be connected to the first in your output.it could be a copying error to the board but you should correct that it UUID is really at the end of the first line

Sorry, I haven’t seen that effect on preview: it seems to be an issue of the copy command from the terminal output. It seems not to copy the first line break. Actually the UUID in the first line of my post is located in the second line.

I’ve commended the first line out and moved the last one with the correct swap mount to the top of the file and it has done the job - my laptop is starting in under a 40 seconds.

Thanks to all for help.

Is it really important to have the swap mounting point at the end of the file? Some googling around has shown, that systems currently do mount the partitions in unpredictable order (at least as it was said on ubuntu forum mount - How can I specify the order in which filesystems are automatically mounted? - Ask Ubuntu and on redhat one https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Global_File_System_2/s1-manage-mountorder.html).
Does openSuse handle mounts differently?

Cheers / Konstantin

On 2013-12-21 22:36, kostgr wrote:
>
> robin_listas;2610450 Wrote:
>> On 2013-12-21 19:36, kostgr wrote:
>>
>>> By the way, is it correct to mount the swap at the end?
>>
>> Traditionally, fstab entries were activated in the order they appear.
>> Swap entry at the end might be
>> important if you need swap space early.

> Is it really important to have the swap mounting point at the end of the
> file?

I think it should be at the start.

What I meant is that if you put it at the end, you would mount swap at the very end, and if it is
needed because you have little memory, boot would crash. A people nowdays have lots of memory, this
would not happen and possition of the swap entry would be irrelevant.

You understood me the other way round.

> Does openSuse handle mounts differently?

As I said, traditionally entries were mounted in read order. Nowdays, with systemd, I think I heard
it was different, but I don’t clearly remember this. It is possible that the system decides
automatically what to do.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” (Elessar))