Kernel panic - not syncing:Attempted to kill init - linux-kernel

I'm using the buildroot version-20011.02 for kernel, toolchain and filesystem.My customized board ARMV7 cortexA9 SoC.Kernel version is 3.18.41.
Build the kernel(uImage), Buildroot toolchain, rootfs.tar.gz.
Enable the filesystem tyep ext4 in buildroot and also in kernel.
Extracting this rootfs.tar.gz to /export/users/buildroot/.
exporting this directory by using
exportfs -a, exportfs -rv and restart the nfs server.It seems everything is fine on nfs server side.
Here I'm sharing the "make menuconfig" system configuration -->
Init system (BusyBox) --->
Even I tried with Init system (systemV) --->
with bootargs as bootargs console=ttyAM0,115200n8 root=/dev/nfs rw rootwait ip=dhcp nfsroot=192.168.1.40:/export/users/buildroot,tcp,v3 init=/sbin/init
Every time I'm getting below log:
VFS: mounted fs via nfs
devtmpfs is mounted.
Kernel panic - not syncing:Attempted to kill init, exit code=0x000000b
Please help me out how to resolve this issue.

This may help you.
As you said, there is a log like below.
Kernel panic - not syncing:Attempted to kill init, exit code=0x000000b
This means init(busybox) is exited and the exit code is 0xb.
So kernel goes into panic.
Maybe this is caused by a network problem. But we cannot conclude this is due to network or not, for now.
You said, you saw crashing, without NFS.
I think resolving that crash maybe better way to solve this situation.
Please share crash log without NFS configuration. If you share log, I will check it.

Related

Which linux device driver is responsible for formatting and writing root file system?

I'm getting started with imx6 processors and the procedure involved to bring up the board is to flash u-boot kernel dtb and rootfs which is taken care of by mfg tools provided by nxp.
For creating a rootfs partition the command run is
mkfs.ext3 -F -E nodiscard /dev/mmcblk1p2
and for untaring the rootfs into this partition it is.
pipe tar -jxv -C /mnt/mmcblk1p2
I'd like to know the working of this, which kernel driver is being called for executing these commands?
My kernel version is 4.9.88.
I did find a few driver files related to mmc in the path
/drivers/mmc/core
but there is nothing related to filesystem reading or writing here.
Can anyone explain which driver files are used to create filesystems?
Creating the filesystem is done by the userspace program mke2fs (of which mkfs.ext3 is an alias) which is part of the e2fsprogs package. The kernel and drivers have no way of creating filesystems. Therefore, only the block driver for accessing the MMC device is involved, but no file system driver.

Custom built kernel produces non-bootable initramfs on Centos 7

I've been building my own kernel (4.19.37) and have no issues during build (make) or install (make install_modules + make install). Everything seems to go fine until I execute grub2-mkconfig -o /boot/grub2/grub.cfg. When executing this command, grub finds both my existing and new vmlinuz-* kernels in /boot/ as well as their corresponding initramfs-*.img. However, at that point the system hangs indefinitely (> several hours). Ctrl+C does not seem to stop it and I must reboot. I have looked into this issue and all I have found that could be a problem is the probing of removal disks for bootable OS's, which I have eliminated by both removing them and by adding GRUB_DISABLE_OS_PROBER=true to /etc/default/grub per this SE post. Neither has helped.
Upon reboot, I end up at the grub> command line, presumably because the grub2-mkconfig never finished and corrupted the grub configuration file. Here I can load both the old and new kernel without any issue, as well as initramfs, but when I execute boot I get a kernel panic:
end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Naturally, it is my assumption that there is something wrong with my initramfs-4.19.37.img that was created by my build process. As an experiment, I tested if I could load the new kernel, but use the old initramfs (4.19.10), and indeed it does boot into emergency mode. I however cannot do the opposite, old kernel with new initramfs. So something is fishy with my new initramfs image.
Getting smarter, my last experiment was mounting the old and new initramfs image with mount. They both mount successfully with no errors, and seem to have identical file structures. I have also compared both my new and old .config files for the kernel builds, and the differences are trivial.
A few other notes/observations:
In the image above, you can see List of all partions: produces nothing, so I am wondering if there is an issue with the file system type? My hard drive is xfs, what is the file system for the initramfs? CPIO?
At the grub> command line, ls / produces what I expect to see in /boot. It contains all my vmlinuz-* and initramfs-*.img files
My file system is xfs
I've tried various other kernel versions with same results
I have twice had successful builds and installs, once was the existing kernel (4.19.10), it was an upgrade, and a second time with the same kernel with a low-latency pre-emption model. I can't for the life of me figure out what I did differently then.
So the final question(s) are - What's wrong with the initramfs form these builds? What else can I do to validate it's integrity? Are there any .config changes I should make when building the kernel for the xfs file system?
Disclaimer: So this actually an continuation of [this question][3], but I've simplified the problem a bit. Some background info there might be relevant.
After updating the kernel using yum update, reboot the VM using the new kernel you get a kernel panic error.
Following commands will fix this problem.
yum remove kernel
yum update

Error after incomplete upgrade from ubuntu14.04 to 16.04 -- Kernel panic, not syncing: Attempted to kill init: exit code = 0x00007f00

I was in the progress of upgrading my ubuntu system from 14.04 to 16.06 using the GUI software updater.My battery died and machine went off. When I tried to restart,I get this error below.
run-init: /sbin/init: No such file or directory
Target file system does not have requested /sbin/init
run-init: /sbin/init: No such file or directory
run-init: /etc/init: Permission denied
run-init: /bin/init: No such file or directory
/bin/sh O: Can'topen splash
[5.210492] Kernel panic, not syncing: Attempted to kill init! exitcode=0x00007f00
kernel offset 0x0 from 0xffffffff8100000000
drm_kms_helper: panic occured, switching back to text console
At this point it stays in this black screen till I restart, and it happens like this again.
I searched on other forums and I was advised to download and run the bootinfoscript. I run it and had results in a text file but I am unable to attach it here (more than 30000 characters)
Kindly help me resolve this. I don't want to reinstall as I have too much to lose.
Thanks.

Yocto is not booting up

I get a new kernel(3.14) from kontron for my board after i compiled and try to run it on my board but i getting the following error any one can help me !
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
The kernel can't find its root filesystem.
Investigate why that is the case. Where is the kernel looking for it? Check the kernel config and/or the command line passed from the bootloader. Check that the kernel has all the drivers to actually access the hardware hosting the root filesystem. Has the kernel the needed filesystem support complied in?

AWS auto scaling test failed instance

I have an autoscaling cloudformation that I think I have set up to replace failed instances based on StatusCheckFailed_Instance. I want to test this. Can I test this by terminating one of the EC2 instances? Thanks!
Instance Status Check might fail for one of the following reasons:
Memory Errors
Out of memory: kill process
ERROR: mmu_update failed (Memory management update failed)
Device Errors
I/O error (Block device failure)
IO ERROR: neither local nor remote disk (Broken distributed block device)
Kernel Errors
request_module: runaway loop modprobe (Looping legacy kernel modprobe on older Linux versions)
"FATAL: kernel too old" and "fsck: No such file or directory while trying to open /dev" (Kernel and AMI mismatch)
"FATAL: Could not load /lib/modules" or "BusyBox" (Missing kernel modules)
ERROR Invalid kernel (EC2 incompatible kernel)
File System Errors
request_module: runaway loop modprobe (Looping legacy kernel modprobe on older Linux versions)
fsck: No such file or directory while trying to open... (File system not found)
General error mounting filesystems (Failed mount)
VFS: Unable to mount root fs on unknown-block (Root filesystem mismatch)
Error: Unable to determine major/minor number of root device... (Root file system/device mismatch)
XENBUS: Device with no driver...
... days without being checked, check forced (File system check required)
fsck died with exit status... (Missing device)
Operating System Errors
GRUB prompt (grubdom>)
Bringing up interface eth0: Device eth0 has different MAC address than expected, ignoring. (Hard-coded MAC address)
Unable to load SELinux Policy. Machine is in enforcing mode. Halting now. (SELinux misconfiguration)
XENBUS: Timeout connecting to devices (Xenbus timeout)
It seems to me that #1 is the easiest to implement to fail on demand. You can add web hook or launch a shell script with the delay to start some process which will result in OutOfMemory failure, to confirm that your autoscaling configuration works as configured.
Terminating the instance will not help to test your configuration, as when you gracefully terminating the instance, it is removed from the pool of available instances, and the check will not be performed.
More details on status checks can be found here: Troubleshooting Instances with Failed Status Checks

Resources