Kernel / Grub Boot issue <SOLVED>

lwfitz

So, for maybe the last 4-5 months (I think) I have had an issue where every time I reboot I have to wait 1:30 with a warning that a start job is running for ............ (enter uuid #). The uuid numbers are anything other than my root partition. Including home.

Thinking it might be a hard drive issue I tried a reinstall from the latest ISO and had the same issue. Then I ran a dist-upgrade and all hell broke loose. I got an error regarding initramfs-tools and linux-image-4.6.0-1-amd64.

Finally I got those packages repaired and installed properly. I ran apt-get update & apt-get dist-upgrade and everything came back clean. No errors.

When I rebooted I got to the normal grub screen, hit enter, and was greeted with a lovely flashing cursor. If I boot normally the flashing cursor lasts about 2 minutes, then it goes past and finally hangs without booting up all the way.
If I boot into recovery mode I get the flashing cursor but after two minutes it will go past and get to the emergency mode warning and I can hit ctrl/D and bypass. Once Im booted and logged in Im fine but it takes 2-5 minutes to boot and its annoying.

Any ideas?


SOLUTION

This worked for me



Don't Be A Dick!

jedi

Quote from: lwfitz on September 04, 2016, 04:18:27 AM
So, for maybe the last 4-5 months (I think) I have had an issue where every time I reboot I have to wait 1:30 with a warning that a start job is running for ............ (enter uuid #). The uuid numbers are anything other than my root partition. Including home.


only one really, /etc/fstab.  check to see if it created a swap partition somehow and if so comment it out and reboot. 
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

Snap

AFAIK drivers are somewhat troublesome lately... once again.

Try running in no modesetting. When reaching grub press the e key. and in the line that begins with "Linux..." add the following at the end.

For nouveau drivers (Nvidia GPUs) just add nomodeset. It should look something like this:

"quiet splash nomodeset"

For Intel cards:

"quiet splash nomodeset i915.modeset=0"

if it boots normally then add these changes to /etc/default/grub and to make the changes permanent run

sudo update-grub

Sorry, I have zero experience with AMD/ATI cards, but I read they're problematic lately too.

hakerdefo

Remove any duplicate entry and/or swap related entry from /etc/fstab and you should be good to go.
Cheers!!!
You Can't Always Git What You Want

lwfitz

Quote from: jedi on September 04, 2016, 07:12:14 AM
only one really, /etc/fstab.  check to see if it created a swap partition somehow and if so comment it out and reboot.

Hi Jedi  ;D ;D How are you buddy?

Quote from: hakerdefoRemove any duplicate entry and/or swap related entry from /etc/fstab and you should be good to go.
Cheers!!!

Yep, Ive checked this numerous times. None of this makes any sense.


/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>

proc   /proc   proc   defaults   0   0
# /dev/sda1
UUID=27ef8073-2c1b-4726-83ba-bb5ec70236fe   /   ext4   relatime,errors=remount-ro   0   0
# /dev/sda3
UUID=18731e08-3798-4358-a82e-09eda6a703f5   /home   ext4   defaults   0   0
# /dev/sda2
UUID=e19086b3-142a-4206-88c1-638353a36cbf   none   swap   sw   0   0




QuoteAFAIK drivers are somewhat troublesome lately... once again.

I had everything but "splash" so I added that, updated grub and no luck unfortunately.


I guess I couldve given you guys a bit more info. Im on a temporary desktop as I have sold my MSI laptop.

This PC is a Dell Inspiron desktop with an Intel i5, 8gb ddr3, nVidia geforce 610 and 60gb ssd.


Don't Be A Dick!

hakerdefo

#5
Hi there lwfitz,
Make a backup of /etc/fstab and remove the following line from it,

UUID=e19086b3-142a-4206-88c1-638353a36cbf   none   swap   sw   0   0

Save the file.
Next run the following command,

sudo swapoff --all

Reboot & hope for the best ;)
Cheers!!!
You Can't Always Git What You Want

PackRat

Two items-

First, are you running an NFS or samba server, I know that it can take up to two minutes to shut down if NFS is running, never it stall on startup though.

Second, try a reinstall without a swap file. If you need/want one, pre-partition the disk but leave the partition that will be the swap unused. After boot up use swapon to mount it and leave it mounted when you shut down. If it all works, add the swap partition to fsfab.
,
I've had install issues lately, especially on my older desktop. Same issues you're having. It appears to be related to creating the swap during install. Adding the swap manually post install seems to work, but I occasionally get an error about unmounting the swap partition on shutdown. Leads me to believe this is a systemd issue related to swap file. 
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

lwfitz

Quote from: hakerdefo on September 04, 2016, 05:52:29 PM
Hi there lwfitz,
Make a backup of /etc/fstab and remove the following line from it,

UUID=e19086b3-142a-4206-88c1-638353a36cbf   none   swap   sw   0   0

Save the file. Reboot & hope for the best ;)
Cheers!!!

Quote from: PackRatTwo items-

First, are you running an NFS or samba server, I know that it can take up to two minutes to shut down if NFS is running, never it stall on startup though.

Second, try a reinstall without a swap file. If you need/want one, pre-partition the disk but leave the partition that will be the swap unused. After boot up use swapon to mount it and leave it mounted when you shut down. If it all works, add the swap partition to fsfab.
,
I've had install issues lately, especially on my older desktop. Same issues you're having. It appears to be related to creating the swap during install. Adding the swap manually post install seems to work, but I occasionally get an error about unmounting the swap partition on shutdown. Leads me to believe this is a systemd issue related to swap file.

I thought the same thing(s) so I did away with the swap partition and removed it from /etc/fstab but that still left the same issue /home partition.

Ive reinstalled with  and without swap and it doesnt seem to make any difference.

I am pretty sure this is kernel related starting in 4.6.0-1 but I dont have any clue how to fix it. MAybe just have to deal with it until things get fixed.


BTW, PackRat I hadnt thought of Samba or NFS. Being that this is a stock install I would think that others wouldve seen a similar issue if it was Samba.
Don't Be A Dick!

hakerdefo

Can you try out the following,

Make absolute sure swap is not in use,

cat /proc/swaps


If swap is in use find out the UUID,

lsblk -f | grep -E 'swap|SWAP'


Make sure the swap UUID matches the entry in fstab,

cat /etc/fstab | grep -E 'swap|SWAP'


And finally check the boot log for errors,

sudo journalctl -b -p 3


This should get us something!

Cheers!!!
You Can't Always Git What You Want

PackRat

QuoteMake sure the swap UUID matches the entry in fstab,

This, I forgot to point out I have had this issue - but it was for all partitions, not just the swap.

QuoteI am pretty sure this is kernel related starting in 4.6.0-1 but I dont have any clue how to fix it. Maybe just have to deal with it until things get fixed.

Is there a way to get an older kernel - like 4.4 series which is long-term support - from backports or something?

Debian Stable is still 3.16, I think. A lot of effort but maybe a netinsall of stable and edit the sources to upgrade to Sid. VSIDO-ize it from there.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

lwfitz

Heres my boot log


luke@montech1:~$ sudo journalctl -b -p 3
-- Logs begin at Sun 2016-09-04 16:44:26 PDT, end at Sun 2016-09-04 16:53:01 PDT
Sep 04 16:45:56 montech1 systemd[1]: Timed out waiting for device dev-disk-by\x2
Sep 04 16:45:56 montech1 root[1849]: /etc/dhcp/dhclient-enter-hooks.d/avahi-auto
Sep 04 16:45:57 montech1 systemd[1122]: emergency.service: Failed at step EXEC s
Sep 04 16:46:03 montech1 root[2431]: /etc/dhcp/dhclient-enter-hooks.d/avahi-auto
Sep 04 16:46:03 montech1 ntpdate[2490]: no servers can be used, exiting




This is a fresh install with no swap




luke@montech1:~$ sudo blkid
/dev/sda1: UUID="693aeeee-795f-4a4d-99c2-d82eb1e91e99" TYPE="ext4" PARTUUID="ce66e1ad-01"
/dev/sda3: UUID="18731e08-3798-4358-a82e-09eda6a703f5" TYPE="ext4" PARTUUID="ce66e1ad-03"



Gonna try and older version and see how bad it breaks things.

Might just have to net install like PackRat said.
Don't Be A Dick!

lwfitz

#11
And this is after running dist-upgrade and holding back linux-image-4.6.0-1-amd64


luke@montech1:~$ sudo journalctl -b -p 3
[sudo] password for luke:
Sep 04 17:18:38 montech1 pidof[1089]: can't get program name from /proc/1056/stat
Sep 04 17:20:08 montech1 systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-18731e08\x2d3798\x2d4358\x2da82e\x2d09eda6a703f5.device.
Sep 04 17:20:08 montech1 root[1346]: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1
Sep 04 17:20:13 montech1 systemd[1141]: emergency.service: Failed at step EXEC spawning /bin/plymouth: No such file or directory
Sep 04 17:20:16 montech1 lvmetad[1076]: Failed to accept connection.
Sep 04 17:20:17 montech1 ntpd[1486]: error resolving pool 0.debian.pool.ntp.org: Name or service not known (-2)
Sep 04 17:20:17 montech1 root[1834]: /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd returned non-zero exit status 1
Sep 04 17:20:17 montech1 ntpdate[1890]: no servers can be used, exiting






luke@montech1:~$ systemd-analyze blame
    1min 30.628s dev-sda1.device
    1min 30.265s quota.service
           539ms keyboard-setup.service
           413ms networking.service
           346ms wicd.service
           313ms exim4.service
           214ms hddtemp.service
           202ms ntp.service
           137ms irqbalance.service
           131ms systemd-logind.service
           126ms lm-sensors.service
           113ms nfs-common.service
            89ms lvm2-monitor.service
            83ms lightdm.service
            77ms systemd-user-sessions.service
            77ms rpcbind.service
            75ms rsyslog.service
            60ms rc-local.service
            58ms avahi-daemon.service
            53ms systemd-udev-trigger.service
            53ms alsa-restore.service
            51ms systemd-tmpfiles-setup-dev.service
            43ms systemd-udevd.service

Don't Be A Dick!

lwfitz

So nobody else has had this issue at all? This has been going on for me on two different machines and starts on a fresh install

I have now installed yet again and when updating held back initramfs-tools and linux-image-4.6.0-1-amd64

Finally after all the updates were installed I was able to install linux-image-4.7.0-1-amd64 (I thought it might be kernel related)

removing swap fixes one error but /home still errors and systemd seems to be unable to mount it properly

Im not sure what else to try at this point.

Don't Be A Dick!

lwfitz

#13
Solved!

Im not sure wtf was going on I just figured out how to get around it.

It appears to have been a systemd issue so rather than fight it anymore I just did away with systemd and went back to sysvinit. Please someone tell me why I will regret this. I dont see any downside but I could be wrong.

Heres what I did and it seems to have fixed all my issues

sudo apt-get install sysvinit-core sysvinit sysvinit-utils

Reboot

Then remove systemd
apt-get remove --purge --auto-remove systemd


And stop systemd from being installed later on
sudo su
echo -e 'Package: systemd\nPin: origin ""\nPin-Priority: -1' > /etc/apt/preferences.d/systemd


Don't Be A Dick!

Snap

QuotePlease someone tell me why I will regret this. I dont see any downside but I could be wrong.

I won't be the one.  8)

OpenRC everywhere here. VastOne wrote an specific switching guide for Vsido somewhere in the forum. But the essentials work for any Debian and from Jessie to Sid. Tested several times.