close

最近在 yocto 新增 grub efi 

讓 image 開機可以用 grub 選單

但 grub.cfg 一個沒改好就會遇到 kernel panic

...
[ 4.229427] VFS: Mounted root (vfat filesystem) readonly on device 179:98.
[ 4.236523] devtmpfs: error mounting -2
[ 4.242302] Freeing unused kernel memory: 7552K
[ 4.246973] Run /sbin/init as init process
[ 4.251333] Run /etc/init as init process
[ 4.255473] Run /bin/init as init process
[ 4.259619] Run /bin/sh as init process
[ 4.263562] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
 

原因就是 grub.cfg 裡面 root file system 寫錯位置qq

所以 mount root file system 失敗 => 找不到 init 執行 => kernel panic

結論就是要把 root file system 位置寫對

...
menuentry 'boot'{
linux /Image LABEL=boot root=/dev/mmcblk1p2
}

 

 

arrow
arrow
    全站熱搜

    JohnDX 發表在 痞客邦 留言(0) 人氣()