在构建自定义ISO的时候,有时候需要从母体机器拷贝文件到Live CD系统。比如拷贝/home/xiaoxiaoleo/hello 程序,在Kickstart配置文件里, post脚本添加--nochroot参数:
%post --nochroot --log=/tmp/postinstall.log cp /home/xiaoxiaoleo/hello $INSTALL_ROOT/app/ %end
启动机器,加载Live IOS进入系统后,可以在系统目录/app/里看到hello程序。