在chroot中執行腳本或命令

分紅兩個腳本文件: a.sh, b.sh b.sh是要在chroot後要執行的部分, a.sh裏面web mount /dev/sda2 /mnt/ cp b.sh /mnt/ chroot /mnt/ /b.sh rm -r /mnt/b.sh 確保在b.sh裏面最後有exit語句。shell chroot /mnt/sysImage /bin/bash -c "ls -l" /mnt/sysI
相關文章
相關標籤/搜索