WIN10子系統Ubuntu定製arm文件系統rootfs

在WIN10子系統的LINUX中執行chroot命令到arm的文件系統中會提示/bin/bash文件不存在或者exe格式錯誤, 此時需要以下辦法進行解決:

前提是已經安裝了qemu-arm-static, 並已複製到arm文件系統的/usr/bin/目錄中

sudo update-binfmts --install arm /usr/bin/qemu-arm-static --magic '\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'

執行完該條指令後, 然後執行以下命令進行掛載即可

sudo mount -t proc /proc rootfs/proc
sudo mount -t sysfs /sys rootfs/sys
sudo mount -o bind /dev rootfs/dev
sudo mount -o bind /dev/pts rootfs/dev/pts		
sudo chroot rootfs/

如下截圖所示:

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