lost and found ( for me ? )

Fedora 16 : kernel panic not syncing vfs unable to mount root fs on unknown-block


After upgrading to a new kernel which version is 3.1.9-1 with “yum update” , I’ve faced a kernel panic error when booting 3.1.9-1.

Error message
kernel panic not syncing vfs unable to mount root fs on unknown-block

Seen from /boot directory , there is no initramfs file for 3.1.9-1.
# ls /boot/initramfs-3.1.*
/boot/initramfs-3.1.0-7.fc16.i686.PAE.img  /boot/initramfs-3.1.6-1.fc16.i686.PAE.img


initramfs is needed for booting Linux.

I don’t know why there is no initramfs for 3.1.9-1.
There are enough disk space for /boot partition.

Anyway , to resolve this , I need to make an initramfs for kernel 3.1.9-1.

Let’s make the initramfs with dracut.

At first , boot Fedora with a previous kernel  3.1.6-1 which works well.
[root@fc16 ~]# uname -ri
3.1.6-1.fc16.i686.PAE i386

install dracut via yum if you haven’t installed it.
[root@fc16 ~]# yum install dracut

make an initramfs for 3.1.9-1.
[root@fc16 ~]# dracut /boot/initramfs-3.1.9-1.fc16.i686.PAE.img 3.1.9-1.fc16.i686.PAE

nn , there is no modules.dep file for 3.1.9-1..
[root@fc16 ~]# dracut /boot/initramfs-3.1.9-1.fc16.i686.PAE.img 3.1.9-1.fc16.i686.PAE
E: FATAL: Could not load /lib/modules/3.1.9-1.fc16.i686.PAE/modules.dep: No such file or directory

actually there is no modules.dep file.. nn why ??
[root@fc16 ~]# ls /lib/modules/3.1.9-1.fc16.i686.PAE/modules.d*
/lib/modules/3.1.9-1.fc16.i686.PAE/modules.devname
/lib/modules/3.1.9-1.fc16.i686.PAE/modules.drm

Okay , how about  issuing yum-complete-transaction and yum reinstall kernel ?
[root@fc16 ~]#  yum-complete-transaction
[root@fc16 ~]# yum reinstall kernel
読み込んだプラグイン:langpacks, presto, refresh-packagekit
再インストール処理の設定をしています
実行中のカーネルを飛ばします: kernel-PAE-3.1.6-1.fc16.i686
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> Package kernel-PAE.i686 0:3.1.0-7.fc16 will be インストール
---> Package kernel-PAE.i686 0:3.1.9-1.fc16 will be インストール

after issuing above commands , initramfs and modules.dep for kernel 3.1.9-1 has been installed.
[root@fc16 ~]# ls /boot/initramfs-3.1.*
/boot/initramfs-3.1.0-7.fc16.i686.PAE.img  /boot/initramfs-3.1.9-1.fc16.i686.PAE.img
/boot/initramfs-3.1.6-1.fc16.i686.PAE.img

[root@fc16 ~]# ls /lib/modules/3.1.9-1.fc16.i686.PAE/modules.d*
/lib/modules/3.1.9-1.fc16.i686.PAE/modules.dep
/lib/modules/3.1.9-1.fc16.i686.PAE/modules.dep.bin
/lib/modules/3.1.9-1.fc16.i686.PAE/modules.devname
/lib/modules/3.1.9-1.fc16.i686.PAE/modules.drm

You can check contents of initramfs with lsinitrd
[root@fc16 ~]# lsinitrd /boot/initramfs-3.1.9-1.fc16.i686.PAE.img | head -10
/boot/initramfs-3.1.9-1.fc16.i686.PAE.img: 17M
========================================================================
========================================================================
drwxr-xr-x   1 root     root            0 Jan 22 23:15 .
drwxr-xr-x   1 root     root            0 Jan 22 23:15 run
drwxr-xr-x   1 root     root            0 Jan 22 23:15 run/initramfs
drwxr-xr-x   1 root     root            0 Jan 22 23:15 run/initramfs/lib
-rwxr-xr-x   1 root     root       115376 Oct 27 20:34 run/initramfs/lib/libgcc_s-4.6.2-20111027.so.1
lrwxrwxrwx   1 root     root           28 Jan 22 23:15 run/initramfs/lib/libgcc_s.so.1 -> libgcc_s-4.6.2-20111027.so.1
drwxr-xr-x   1 root     root            0 Jan 22 23:15 run/initramfs/lib/i686

I can boot Fedora with kernel 3.1.9-1 :)
[root@fc16 ~]# uname -ri
3.1.9-1.fc16.i686.PAE i386

If you face “kernel panic not syncing vfs unable to mount root fs on unknown-block” when booting a new kernel , please check whether there exist modules.dep and initramfs for that kernel.
You might solve this by issuing “yum-complete-transaction” and “yum reinstall kernel”.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.