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?
Related
I want to run linux on qemu to test some system design, I use default config for x86_64, I found that I must append "console=ttyS0" to boot arguments so that I can get kernel message, without the ttyS0 I can't get any output.
So I want to check qemu's device tree, another strange thing is that I found there is no device-tree directory under /sys/fireware.
I want to check following question:
why we need "console=ttyS0" to get output ?
doesn't x86 use device-tree during booting ?
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.
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
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.
I'm running Docker for Windows (similar effect described below is observable on MacOSX)
I have a Docker Container in which a program tries to access a squashfs image. To access squashfs the kernel has to be either complied with loopdevice support statically or load the relevant kernel module.
When I try to mount the image or setup the loop device the kernel that's shared between docker containers cannot find the loopdevice module.
I could possibly use unsquashfs tool but the squashfs image is used for a reason: squashfs has a very decent property: it allows unlimited number of files and inodes - if I try to to unpack the image I quickly hit the inode limit of the images.
Is Moby Linux kernel which is shipped with docker a statically compiled kernel? What volume to mount to have access to its /lib/modules? lsmod run in a privileged container lists no loaded modules. Trying to modprobe loop yields the following error message:
root#6e1b23cc65e5:/# modprobe loop
modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.9.8-moby/modules.dep.bin'