Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fresh instal: kernel panic not syncing attempted kill init
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Dec 15, 2015 5:29 pm    Post subject: Reply with quote

Drone4four,

If you issue the command eselect, you will be shown a list of installed modules.
eselect <module> will tell what commands the module supports.

For gentoo-sources the following are in the tree.
Code:
$ eix gentoo-sources
[?] sys-kernel/gentoo-sources
     Available versions: 
     (3.4.110) (~)3.4.110^bs
     (3.4.9999) **3.4.9999^bs
     (3.10.92) 3.10.92^bs
     (3.10.93) (~)3.10.93^bs
     (3.12.49) 3.12.49^bs
     (3.12.50) (~)3.12.50^bs
     (3.12.9999) **3.12.9999^bs
     (3.14.56) 3.14.56^bs
     (3.14.57) (~)3.14.57^bs
     (3.18.21) (~)3.18.21^bs
     (3.18.22) (~)3.18.22^bs
     (3.18.23) (~)3.18.23^bs
     (3.18.24) (~)3.18.24^bs
     (4.0.4) (~)4.0.4^bs{tbz2}
     (4.0.9) 4.0.9^bs
     (4.1.12) 4.1.12^bs
     (4.1.13) (~)4.1.13^bs
     (4.2.4) (~)4.2.4^bs
     (4.2.5) (~)4.2.5^bs{tbz2}
     (4.2.6) (~)4.2.6^bs
     (4.2.7) (~)4.2.7^bs
     (4.3.0) (~)4.3.0^bs{tbz2}
     (4.3.2) (~)4.3.2^bs{tbz2}

The (~) means that they are keyworded for testing. So you need to allow the testing gentoo-sources to be installed.
You do this with your package.accept_keywords file. Its covered in The Gentoo Handbook.

I can host my kernel, initrd and /lib/modules if you want to test with exactly the same kernel setup as I have.
_________________
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
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Fri Jun 10, 2016 5:06 pm    Post subject: Reply with quote

I’m back after a short vacation.

The issue with the kernel panic we began troubleshooting boils down to a bug in the kernel. So we established that the solution would be to try a newer kernel. That’s where we left off.

So thank-you NeddySeagoon for the Portage Branches guide. That helped. I found another guide which helped me upgrade my kernel to 4.4.x. The Kernel Configuration guide helped me set up the upgrade too. Now I’m stuck trying to update my grub2 bootloader.

/boot/ only has evidence of my old 4.1.x kernel and I don’t know why. I ensured that /boot was mounted to /dev/sda2 and then followed all the kernel update steps very closely. /boot still only contains the presence of the 4.1.x kernel:

Code:

# grub2-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg …
Found linux image: /boot/kernel-genkernel-x86-4.1.12-gentoo
Found initrd image: /boot/initramffs-genkernel-x86_64-4.1.12-gentoo
done

I figure that perhaps I missed a step when I was upgrading the kernel but I double checked my tracks and can't figure out which step places the necessary new kernel data into /boot . I just know that the solution I need is going to be obvious and that it is staring me in the face.

Here are the contents of my /boot directory: https://bpaste.net/show/99591b0b46b0

Sorry for going MIA for a while. =D
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
cal22cal
n00b
n00b


Joined: 19 Jan 2006
Posts: 36

PostPosted: Sat Jun 11, 2016 6:32 am    Post subject: Reply with quote

Don't know what exactly of your problem, though.
http://imgur.com/YrKS4Ud.png screenshot for
fdisk -l /dev/sda
fstab

/dev/sda2 is type EFI but fstab mount it as ext2 under /boot
/dev/sda3 is type Linux filesystem but fstab mount it as swap

Any special reasons for that ?
Back to top
View user's profile Send private message
guitou
Guru
Guru


Joined: 02 Oct 2003
Posts: 399
Location: France

PostPosted: Sat Jun 11, 2016 5:21 pm    Post subject: Reply with quote

Hello

To have grub2-mkconfig detecting newly build kernel, you need to copy kernel and initrd in your /boot part.
You can do it with simple 'cp' commands, and maybe as well running 'make install' when in the proper directory (path to kernel sources)

++
Gi)
Back to top
View user's profile Send private message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Sat Jun 11, 2016 6:09 pm    Post subject: Reply with quote

cal22cal wrote:
Don't know what exactly of your problem, though.
http://imgur.com/YrKS4Ud.png screenshot for
fdisk -l /dev/sda
fstab

/dev/sda2 is type EFI but fstab mount it as ext2 under /boot
/dev/sda3 is type Linux filesystem but fstab mount it as swap

Any special reasons for that ?


Now that you've pointed it out, yes, I do see /dev/sda2 is type EFI with ext2 file system and mounted to /boot. Could this configuration cause issues? Could I have configured my filesystems and partitions here with better practices?

guitou wrote:
Hello

To have grub2-mkconfig detecting newly build kernel, you need to copy kernel and initrd in your /boot part.
You can do it with simple 'cp' commands, and maybe as well running 'make install' when in the proper directory (path to kernel sources)

++
Gi)


I invoked grub2-mkconfig in my /boot directory and grub2 performed its configuration of the grub2 config file, but my /boot was still bare. My recently compiled kernel information isn’t present in /boot yet. The Gentoo wiki for GRUB2 under 'Installing the boot loader' and then 'BIOS with MBR' after mount /boot suggests:
Quote:

Run the grub2-install command to copy the relevant files to /boot/grub.

What relevant files? From where do I copy the kernel source files to /boot? The documentation continues:
Quote:
On the PC platform, this also installs a boot image to the Master Boot Record (MBR) or a partition's boot sector. If all goes well, after running grub2-install an output such as the one below is to be expected:
Code:
root #grub2-install /dev/sda
Installation finished. No error reported.

I tried that. /boot still isn’t populated with my kernel srcs. I also checked the kernel upgrade guide (which I linked to in my previous post) and there is no indication of how or when to copy the kernel src information to /boot.
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jun 12, 2016 9:18 pm    Post subject: Reply with quote

Drone4four,

How did you build your new kernel?

If you use genkernel, you need to mount /boot before you run it. It installs the kernel and initrd for you.
If you didn't mount /boot, the kernel and initrd will be installed to /boot on the root partition, you will only see that when /boot is not mounted.

If genkernel failed, you won't have the kernel and initrd to install.

When you make the kernel by hand, getting all the bits in the right places needs to be done by hand too.

-- edit --
genkernel follows the /usr/src/linux symlink. If you didn't update that, it would have spent a lot of time working out that it didn't need to do anything.
Do
Code:
ls -l /usr/src
What does linux point to?
_________________
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
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Sun Jun 12, 2016 10:18 pm    Post subject: Reply with quote

I believe I installed a regular kernel - - not the genkernel because I followed this kernel upgrade guide.

With eselect kernel list, I picked linux-4.4.6-gentoo.

When I performed the emerge, /boot was mounted to /dev/sda2.

The contents of my /usr/src are as follows:

Code:

total 152
drwxr-xr-x  4 root root   4096 Jun 12 22:14 .
drwxr-xr-x 13 root root   4096 Nov 28  2015 ..
-rw-r--r--  1 root root      0 Nov 19  2015 .keep
-rw-r--r--  1 root root      0 Jun 12 22:14 contents_src_contents.txt
-rw-r--r--  1 root root 138498 Jun 10 16:23 kernel_config_bk
lrwxrwxrwx  1 root root     18 Jun 10 15:31 linux -> linux-4.4.6-gentoo
drwxr-xr-x 22 root root   4096 Jun 10 15:38 linux-4.1.12-gentoo
drwxr-xr-x 25 root root   4096 Jun 10 16:24 linux-4.4.6-gentoo


So the linux symlink in that directory does indeed point to linux-4.4.6-gentoo.

Thanks Neddy for your help so far.
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jun 12, 2016 11:05 pm    Post subject: Reply with quote

Drone4four,

Heh, that link does not cover the build and install processes.
It does do the configuration.

A test.

Code:
cd /usr/src/linux
to get to your new kernel source tree.
Code:
ls arch/x86/boot/bzImage
That will return an error if the file is missing. Thats your kernel binary.
If its there copy it to /boot (with boot mounted).
If its missing, its not been built yet, or there was a build error.

The build process is
Code:
make -j4
make modules_install
will build the kernel and install the kernel modules.
Now
Code:
cp arch/x86/boot/bzImage /boot/<nice_kernel_name>
Installs the kernel into boot, ready for grub to detect it.
_________________
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
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Mon Jun 13, 2016 12:50 am    Post subject: Reply with quote

NeddySeagoon wrote:
Heh, that link does not cover the build and install processes.
It does do the configuration.

I forgot to mention in my previous that I also consulted this guide. This guide also instructs you to build the kernel with
Code:

# make -j5
# make modules_install

So I did build my kernel but the test you suggested proves me wrong because inside /usr/src/linux/arch/x86/boot/ there is no bzImage . So evidently I haven’t built my kernel yet.

OK so inside /usr/src/linux I very mindfully now configured my menuconfig, made the kernel and made the modules. I copied the newly created bzImage over to /boot.

But there is no initramfs inside /boot for my new kernel like there is from my previous kernel. I looked inside /usr/src/linux/arch/x86/boot/ for a initramfs file, nothing there to copy over to /boot . I found a nifty utility called cpio which supposedly builds initramfs’s which I installed via portage but the command, mkinitramfs doesn’t exist, neither does update-initramfs . How do I create an initramfs for my new kernel? None of the four guides I used earlier to install my kernel instruct you how to create an initramfs. Here are the four guides again:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Branches
https://wiki.gentoo.org/wiki/Kernel/Upgrade
https://wiki.gentoo.org/wiki/Kernel/Configuration
https://wiki.gentoo.org/wiki/GRUB2

I took a quick look at the Gentoo handbook’s creating the bootloader page:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
It refers to the initramfs 11 times, but doesn’t teach how to create one.

So I held my breath as I skipped building a new initramfs, made the grub2 config and rebooted my VM. Grub now gives me the option to boot from linux 4.4.6 but the kernel still panics. I need to generate that new initramfs. How do I create an initramfs?

edit: link formating fix
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Mon Jun 13, 2016 4:46 am    Post subject: Reply with quote

Drone4four wrote:
How do I create an initramfs?

Drone4four ... via genkernel, but as you're not using it then this leaves either creating your own or using some other method. I'd recommend better-initramfs ... a pre-built x64 release can be found here.

HTH & best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Jun 13, 2016 5:46 pm    Post subject: Reply with quote

Drone4four,

genkernel can build you an initrd only, without building your kernel.
However, if you make your own kernel, you may as well make your own initrd too.

Something to keep in mind when you do your own kernel and initrd is that the initrd can be reduced to a tiny root filesystem.
By careful choice of of kernel options, its possible to have an initrd with no kernel modules.
This means it will work with any kernel and you can build the initrd once for the life of the hardware, not every time you update the kernel.
If your kernel can boot without any user space tools, no initrd in needed.
_________________
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
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Tue Jun 14, 2016 9:26 pm    Post subject: Reply with quote

My grub configuration is fubar'ed. See here.
Here is the error I'm getting:
Code:
# ls
ls: cannot access grub.cfg: input/output error
Do any of you have an idea of wtf is going on here?

I shared a png rather than plain text because I couldn't figure out how to capture the text output of long list. I wanted to share it via wgetpaste but I couldn't figure out how to capture text. For example,
Code:
# grub2-mkconfig -o /boot/grub/grub.cfg >file.txt
was empty. I'm not doing it right. Any help here also?
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jun 14, 2016 9:42 pm    Post subject: Reply with quote

Drone4four,

All those ???? means that the grub.cfg directory entry is corrupt.

As /boot is easy to recreate, the easy fix is to save anything in /boot that might be useful then make a new filesystem over the top of the corrupt one.
Better is to remake boot from scratch, in case anything else is corrupt too.
_________________
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
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Tue Jun 14, 2016 9:43 pm    Post subject: Reply with quote

I btw just tried the SuperGrub iso it couldn't detect anything on my virtual disk.
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Tue Jun 14, 2016 9:44 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Drone4four,

All those ???? means that the grub.cfg directory entry is corrupt.

As /boot is easy to recreate, the easy fix is to save anything in /boot that might be useful then make a new filesystem over the top of the corrupt one.
Better is to remake boot from scratch, in case anything else is corrupt too.

Oh OK. So I'll reformat my boot partition in accordance with the Gentoo installation handbook and recompile the genkernel.

Thanks, Neddy.
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Wed Jun 15, 2016 12:26 am    Post subject: Reply with quote

I resolved a few issues but we’re still back at square one.

1. I reformatted my /boot partition as ext3
2. I re-built my genkernel, which automatically created an initramfs / initrd
3. I reinstalled grub2 successfully, no evidence of a corrupted file system this time

I rebooted my VM and Grub loaded perfectly, but when I selected the genkernel from the grub menu, the new 4.4.x kernel panicked at roughly the same time as the old 4.1.12-based genkernel kernel that we initially thought was the source of my problem. We’re right back where we started.

This is a long shot, but I’m all outta ideas: Neddy, back in December, you said,
NeddySeagoon wrote:
I can host my kernel, initrd and /lib/modules if you want to test with exactly the same kernel setup as I have.
Would you by chance still have this kernel, initrd and /lib/models stashed away somewhere still available today? My request here is a bit unrealistic as your post is from 6 months ago.
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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