Author Topic: Kernel / Grub Boot issue <SOLVED>  (Read 3218 times)

lwfitz

  • DEFCON 1
  • Posts: 1747
  • sudo rm -rf /
    • View Profile
Kernel / Grub Boot issue <SOLVED>
« 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.

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




jedi

  • DEFCON 1
  • Posts: 1515
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Re: Krrnel / Grub Boot issue
« Reply #1 on: September 04, 2016, 07:12:14 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

  • Posts: 469
    • View Profile
Re: Krrnel / Grub Boot issue
« Reply #2 on: September 04, 2016, 08:01:22 AM »
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:

Code: [Select]
"quiet splash nomodeset"
For Intel cards:

Code: [Select]
"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

Code: [Select]
sudo update-grub
Sorry, I have zero experience with AMD/ATI cards, but I read they're problematic lately too.

hakerdefo

  • Posts: 520
    • View Profile
    • Looking at Linux through the Windows of Life
Re: Krrnel / Grub Boot issue
« Reply #3 on: September 04, 2016, 08:18:44 AM »
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

  • DEFCON 1
  • Posts: 1747
  • sudo rm -rf /
    • View Profile
Re: Krrnel / Grub Boot issue
« Reply #4 on: September 04, 2016, 09:16:37 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: hakerdefo
Remove 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
Code: [Select]
# /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



Quote
AFAIK 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.



hakerdefo

  • Posts: 520
    • View Profile
    • Looking at Linux through the Windows of Life
Re: Krrnel / Grub Boot issue
« Reply #5 on: September 04, 2016, 05:52:29 PM »
Hi there lwfitz,
Make a backup of /etc/fstab and remove the following line from it,
Code: [Select]
UUID=e19086b3-142a-4206-88c1-638353a36cbf   none   swap   sw   0   0
Save the file.
Next run the following command,
Code: [Select]
sudo swapoff --all
Reboot & hope for the best ;)
Cheers!!!
You Can't Always Git What You Want

PackRat

  • Posts: 1909
    • View Profile
Re: Krrnel / Grub Boot issue
« Reply #6 on: September 04, 2016, 06:13:06 PM »
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

  • DEFCON 1
  • Posts: 1747
  • sudo rm -rf /
    • View Profile
Re: Krrnel / Grub Boot issue
« Reply #7 on: September 04, 2016, 06:38:59 PM »
Hi there lwfitz,
Make a backup of /etc/fstab and remove the following line from it,
Code: [Select]
UUID=e19086b3-142a-4206-88c1-638353a36cbf   none   swap   sw   0   0
Save the file. Reboot & hope for the best ;)
Cheers!!!

Quote from: 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 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.

hakerdefo

  • Posts: 520
    • View Profile
    • Looking at Linux through the Windows of Life
Re: Kernel / Grub Boot issue
« Reply #8 on: September 04, 2016, 07:18:56 PM »
Can you try out the following,

Make absolute sure swap is not in use,
Code: [Select]
cat /proc/swaps

If swap is in use find out the UUID,
Code: [Select]
lsblk -f | grep -E 'swap|SWAP'

Make sure the swap UUID matches the entry in fstab,
Code: [Select]
cat /etc/fstab | grep -E 'swap|SWAP'

And finally check the boot log for errors,
Code: [Select]
sudo journalctl -b -p 3

This should get us something!

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

PackRat

  • Posts: 1909
    • View Profile
Re: Kernel / Grub Boot issue
« Reply #9 on: September 04, 2016, 11:32:52 PM »
Quote
Make 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.

Quote
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.

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

  • DEFCON 1
  • Posts: 1747
  • sudo rm -rf /
    • View Profile
Re: Kernel / Grub Boot issue
« Reply #10 on: September 05, 2016, 12:14:11 AM »
Heres my boot log

Code: [Select]
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



Code: [Select]
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.

lwfitz

  • DEFCON 1
  • Posts: 1747
  • sudo rm -rf /
    • View Profile
Re: Kernel / Grub Boot issue
« Reply #11 on: September 05, 2016, 12:23:27 AM »
And this is after running dist-upgrade and holding back linux-image-4.6.0-1-amd64

Code: [Select]
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




Code: [Select]
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


lwfitz

  • DEFCON 1
  • Posts: 1747
  • sudo rm -rf /
    • View Profile
Re: Kernel / Grub Boot issue
« Reply #12 on: September 16, 2016, 03:27:47 AM »
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.


lwfitz

  • DEFCON 1
  • Posts: 1747
  • sudo rm -rf /
    • View Profile
Re: Kernel / Grub Boot issue
« Reply #13 on: September 16, 2016, 04:55:03 AM »
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

Code: [Select]
sudo apt-get install sysvinit-core sysvinit sysvinit-utils
Reboot

Then remove systemd
Code: [Select]
apt-get remove --purge --auto-remove systemd

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


Snap

  • Posts: 469
    • View Profile
Re: Kernel / Grub Boot issue <SOLVED>
« Reply #14 on: September 16, 2016, 08:02:33 AM »
Quote
Please 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.