Simple Byboxシステムを実行するとファイルが見つかりません。

Simple Byboxシステムを実行するとファイルが見つかりません。

私はLinux 4.1を実行していて、シンプルなビジボックス環境で起動しました。 BusyboxとShadowパッケージは静的に構築され、私のrootFSにインストールされます。 /sbin/initにはBusyboxが使用され、/bin/loginにはシャドウログインが使用されます。私はmakedevsを使用して/ devを生成し、/ etc / {group、shadow、passwd、inittab、rc}を生成します。

マザーボードにインストールして起動しましたが、Enterキーを押してログインするまで、すべてが問題なく見えました。 /bin/login ファイルが見つかりませんでした。 /etc/rcスクリプトに追加すると、/bin/loginが存在し実行可能であることがわかります。それでは、なぜシステムがこれを見つけることができないのでしょうか?

[    3.875852] devtmpfs: mounted
[    3.880023] Freeing unused kernel memory: 464K (c0994000 - c0a08000)
init started: BusyBox v1.26.2 (2018-08-16 15:09:07 EDT)
Got the init message
-rwxr-xr-x    1 0     0         43752 Nov  2  2018 /bin/login

Please press Enter to activate this console.

can't run '/bin/login': No such file or directory

Please press Enter to activate this console.

これは私の/ etc / inittabの外観です:

::sysinit:/etc/rc init
::askfirst:/bin/login

そして私の/ etc / rcスクリプトは次のようになります。

#!/bin/sh

export PATH=/usr/sbin:/usr/bin:/sbin:/bin

echo "Got the init message"
mount -n -t proc proc /proc 2>/dev/null
mount -n -t sysfs sysfs /sys 2>/dev/null
mount -o remount,rw,sync /
ls -l /bin/login

ベストアンサー1

おすすめ記事