Kernel panic - not syncing: Requested init /linuxrc failed (error -13).

開發板平臺exynos-4413,使用busybox-1.31.1製作ext4根文件系統。

Kernel panic - not syncing: Requested init /linuxrc failed (error -13).

這是一個巨坑無比的錯誤,讓你傷痛了腦袋都難搞出原因,怎麼入手,先看看定義的錯誤是什麼意思。

錯誤在這裏定義:在Linux源碼目錄/include/uapi/asm-generic的errno-base.h中

#define EPERM 1 /* Operation not permitted */

#define ENOENT 2 /* No such file or directory */

#define ESRCH 3 /* No such process */

#define EINTR 4 /* Interrupted system call */

#define EIO 5 /* I/O error */

#define ENXIO 6 /* No such device or address */

#define E2BIG 7 /* Argument list too long */

#define ENOEXEC 8 /* Exec format error */

#define EBADF 9 /* Bad file number */

#define ECHILD 10 /* No child processes */

#define EAGAIN 11 /* Try again */

#define ENOMEM 12 /* Out of memory */

#define EACCES 13 /* Permission denied */

#define EFAULT 14 /* Bad address */

#define ENOTBLK 15 /* Block device required */

#define EBUSY 16 /* Device or resource busy */

#define EEXIST 17 /* File exists */

#define EXDEV 18 /* Cross-device link */

#define ENODEV 19 /* No such device */

#define ENOTDIR 20 /* Not a directory */

#define EISDIR 21 /* Is a directory */

#define EINVAL 22 /* Invalid argument */

#define ENFILE 23 /* File table overflow */

#define EMFILE 24 /* Too many open files */

#define ENOTTY 25 /* Not a typewriter */

#define ETXTBSY 26 /* Text file busy */

#define EFBIG 27 /* File too large */

#define ENOSPC 28 /* No space left on device */

#define ESPIPE 29 /* Illegal seek */

#define EROFS 30 /* Read-only file system */

#define EMLINK 31 /* Too many links */

#define EPIPE 32 /* Broken pipe */

#define EDOM 33 /* Math argument out of domain of func */

#define ERANGE 34 /* Math result not representable */

從這裏看出,13表示:Permission denied,即沒有權限。首先懷疑是文件系統文件沒有執行權限,全部改爲777還是一樣的問題。反反覆覆都還是問題依舊,最終纔想到問題可能出在make_ext4fs這個工具上?果然,這個工具有的版本生成的文件系統可以,有的就提示這個錯誤,這是讓人很不容易想到的,既然生成出來沒有權限,那你這個工具有啥用?

在下列鏈接中,作者提到了要修改make_ext4fs的源代碼重新編譯,或者去掉-a參數。

https://blog.csdn.net/adaptiver/article/details/8595591

至少作者說明了原因,make_ext4fs這個工具確實會導致製作的文件系統沒有權。

經過實測,去掉-a參數最簡單可行的辦法,即形如:

make_ext4fs -s -l 314572800 -a root -L linux system.img _install

改爲形如:

make_ext4fs -s -l 314572800 -L linux system.img _install

這樣即可。

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章