Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Kernel panic - not syncing: Attempted to kill init!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
folkdanskung
n00b
n00b


Joined: 23 Jul 2013
Posts: 7
Location: Umeå

PostPosted: Sun Dec 07, 2014 9:40 pm    Post subject: [SOLVED]Kernel panic - not syncing: Attempted to kill init! Reply with quote

Hello everyone,
I recently decided to reinstall my media server because of problems piling up after a world update, figured I'd be saving some time. Anyway, I basically followed every step in the x64 installation instructions, except for an additional partition as home and using systemd instead of OpenRC. I reformatted drive with GPT and had no issues at all during installation. Used my old kernel config (3.8.13) as reference when configuring the new one (3.16.5) to ensure I got all the drivers needed and so fourth.

My problem revealed itself when I rebooted, as the newly compiled kernel decided to panic and with it's last breath spat out:
"Kernel panic - not syncing: Attempted to kill init!"
I've been researching the issue extensively and usually it seems related to SELinux, though that isn't the case here. I recorded the kernel output during boot and found out it couldn't resolve root:
"!! Unable to resolve root: UUID=055a..."
I had previously used UUID's in fstab, but as the current installation docs didn't recommend it I stuck to /dev/sdX. I found these two threads partially covering the topic of systemd with UUID in GRUB2:
https://forums.gentoo.org/viewtopic-p-7556490.html
https://forums.gentoo.org/viewtopic-p-7631980.html
I disabled UUID in "/etc/default/grub" as per instructed in one of the threads, but to no avail. The kernel still panicked with the same output. I recorded the boot process this time as well, but was not able to capture anything regarding "unable to resolve root" as previously though. Maybe I'll have to take a stab at kexec to get crash dumps if all else fails..

So I'd be very grateful if some kind soul could take a look at my configs and perhaps determine if I've done any mistakes, or if you have any other ideas or suggestions as to what might be the cause of this.

I created my initramfs with genkernel: "genkernel --install --no-ramdisk-modules --mdadm initramfs"
A sidenote, --mdadm option is perhaps not necessary, I have a RAID-6 for storage, but it doesn't have to be mounted at boot. I included drivers for hardware in kernel, so I thought I should include that option when creating initramfs for it to work at all.. I don't think this is related to problem however.

/etc/default/grub
Code:
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-3,v 1.4 2014/10/16 04:04:02 floppym Exp $
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
#     'grub2-mkconfig -o /boot/grub/grub.cfg'
#
# See the grub info page for documentation on possible variables and
# their associated values.

GRUB_DISTRIBUTOR="Gentoo"

# Default menu entry
#GRUB_DEFAULT=0

# Boot the default entry this many seconds after the menu is displayed
GRUB_TIMEOUT=5
#GRUB_TIMEOUT_STYLE=menu

# Append parameters to the linux kernel command line
#GRUB_CMDLINE_LINUX=""
#
# Examples:
#
# Boot with network interface renaming disabled
# GRUB_CMDLINE_LINUX="net.ifnames=0"
#
# Boot with systemd instead of sysvinit (openrc)
GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd"

# Append parameters to the linux kernel command line for non-recovery entries
GRUB_CMDLINE_LINUX_DEFAULT="rootfstype=ext4 domdadm"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal.
# Note that you can use only modes which your graphic card supports via VBE.
# You can see them in real GRUB with the command `vbeinfo'.
#GRUB_GFXMODE=640x480

# Set to 'text' to force the Linux kernel to boot in normal text
# mode, 'keep' to preserve the graphics mode set using
# 'GRUB_GFXMODE', 'WIDTHxHEIGHT'['xDEPTH'] to set a particular
# graphics mode, or a sequence of these separated by commas or
# semicolons to try several modes in sequence.
#GRUB_GFXPAYLOAD_LINUX=

# Path to theme spec txt file.
# The starfield is by default provided with use truetype.
# NOTE: when enabling custom theme, ensure you have required font/etc.
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"

# Background image used on graphical terminal.
# Can be in various bitmap formats.
#GRUB_BACKGROUND="/boot/grub/mybackground.png"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY=true


make.conf
Code:
CFLAGS="-march=core2 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j3"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
DISPLAYMANAGER="kdm"
INPUT_DEVICES="evdev synaptics"
VIDEO_CARDS="nvidia"
ACCEPT_KEYWORDS="~amd64"

USE="-gnome alsa bindist community dbus dvd extraengine gtk3 hddtemp javascript kde lm_sensors mmx mplayer opengl pam perl plasma policykit pulseaudio qt4 samba sound sse sse2 sse3 ssl ssse3 sse4 sse4a sse4_1 systemd udisks x264 xml"

GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ ftp://gentoo.tiscali.nl/pub/mirror/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.df.lth.se/pub/gentoo/ ftp://mirror.mdfnet.se/gentoo"


*EDIT* The kernel config was apparently to long and didn't fit in the code box, thought it'd be scrollable.. Anyhow, just tell me if there's a specific section of it you would like to see and I'll post it.
*/EDIT*

Here's a screen of the kernel panic, if it's of any use:
http://i.imgur.com/O1JaU8t.jpg

I hope I haven't omitted any important information, if that is the case, just ask and I'll try to provide it. Thank you in advance, I'm off to bed now, but I'll be able to answer any replies tomorrow.

Best regards, Marc


Last edited by folkdanskung on Mon Dec 08, 2014 9:29 pm; edited 2 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13836

PostPosted: Sun Dec 07, 2014 10:06 pm    Post subject: Reply with quote

Since you set init=systemd, systemd must not exit or this will happen. As a temporary measure, boot with an init= that specifies a program that actually works, then debug systemd from there.
Back to top
View user's profile Send private message
folkdanskung
n00b
n00b


Joined: 23 Jul 2013
Posts: 7
Location: Umeå

PostPosted: Mon Dec 08, 2014 6:27 am    Post subject: Reply with quote

Hu wrote:
Since you set init=systemd, systemd must not exit or this will happen. As a temporary measure, boot with an init= that specifies a program that actually works, then debug systemd from there.

Ah, I see. I think. You mean comment it out in /etc/default/grub and use OpenRC? (Also, setting -systemd USE flag, unmasking udev/eudev and install one of them and run emerge -uDN --with-bdeps=y @world?)

Thanks
Back to top
View user's profile Send private message
folkdanskung
n00b
n00b


Joined: 23 Jul 2013
Posts: 7
Location: Umeå

PostPosted: Mon Dec 08, 2014 6:46 pm    Post subject: Reply with quote

Unfortunately, switching from systemd to OpenRC made no difference at all. I recreated grub.cfg with mkconfig-grub2 after I edited /etc/default/grub and switched profile from kde-systemd to kde, just forgot to mention them in the previous post.
I believe the problem is kernel related. I also believe it initially consisted of two (or more) problems. First the "unable to resolve root", which was fixed by disabling UUID in grub config and second (and rest), the unknown problem(s).

Here's a link to the complete kernel config:
http://m.uploadedit.com/b043/1418062939123.txt

Best regards, Marc
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43184
Location: 56N 3W

PostPosted: Mon Dec 08, 2014 7:43 pm    Post subject: Reply with quote

folkdans,

folkdans wrote:
I reformatted drive with GPT ...

/usr/src/linux/.config:
# CONFIG_EFI_PARTITION is not set


Oops. Your kernel cannot understand GPT partition tables.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
folkdanskung
n00b
n00b


Joined: 23 Jul 2013
Posts: 7
Location: Umeå

PostPosted: Mon Dec 08, 2014 9:27 pm    Post subject: Reply with quote

NeddySeagoon wrote:
folkdans,

folkdans wrote:
I reformatted drive with GPT ...

/usr/src/linux/.config:
# CONFIG_EFI_PARTITION is not set


Oops. Your kernel cannot understand GPT partition tables.

..aaand everything works like a charm. Here I thought EFI was just for UEFI booting.. Hadn't done my research on GPT it appears. Thank you NeddySeagoon and Hu!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13836

PostPosted: Tue Dec 09, 2014 12:35 am    Post subject: Reply with quote

I see you solved this, but for completeness:
folkdans wrote:
Hu wrote:
Since you set init=systemd, systemd must not exit or this will happen. As a temporary measure, boot with an init= that specifies a program that actually works, then debug systemd from there.

Ah, I see. I think. You mean comment it out in /etc/default/grub and use OpenRC? (Also, setting -systemd USE flag, unmasking udev/eudev and install one of them and run emerge -uDN --with-bdeps=y @world?)
That is one choice, and as someone who avoids systemd, it is the one I would have made. However, your other choice would be to set init=/bin/bash to give you a root shell on the system so that you could debug why your configured init exited. Based on later posts in the thread, this was not a systemd problem, so switching to init=/bin/bash would not have helped you to debug it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum