Automation &引用;前/后“U命令”;在Ubuntu 14.04中不起作用

Automation &引用;前/后“U命令”;在Ubuntu 14.04中不起作用,automation,debian,ubuntu-14.04,Automation,Debian,Ubuntu 14.04,我正在使用preseed设置Ubuntu 14.04的自动安装。我使用一个虚拟机(virtualBox机器)对此进行了测试。一切都安装得很好,没有任何问题,但我不太明白如何在呈现的文件末尾使用late_命令 第一次我想做的是运行start.sh脚本 我尝试了几次: 代码如下: d-i preseed/late_command string cp /cdrom/start.sh /target/home/user; in-target chmod 700 /home/user/start.sh;

我正在使用preseed设置Ubuntu 14.04的自动安装。我使用一个虚拟机(virtualBox机器)对此进行了测试。一切都安装得很好,没有任何问题,但我不太明白如何在呈现的文件末尾使用late_命令

第一次我想做的是运行start.sh脚本

我尝试了几次:

代码如下:

d-i preseed/late_command string cp /cdrom/start.sh /target/home/user; in-target chmod 700 /home/user/start.sh; /home/user/start.sh
此外:

第三次尝试:

 d-i preseed/late_command string cp -f /cdrom/start.sh /home/user; in-target chmod +x /home/user/start.sh; in-target sh start.sh
脚本start.sh定义一个命令:

#! /bin/sh 
echo "bonjour" > /home/user/bonjour_file
我还尝试在新机器中安装后创建一个文件:

d-i preseed/late_command string in-target touch /etc/postinst_user.done

preseed preseed/late_command string in-target touch /etc/postinst_user.done
但它只是挂在安装的最后。安装正常,但脚本根本没有运行,并且没有创建文件“postinst_user.done”

新安装的文件系统是否安装在/target下?在安装过程中,此时的环境是什么样的。正确的方法是什么


提前谢谢你,

几天前我也遇到了同样的问题,所以我想与你分享解决方案。在预装Ubuntu安装时

d-i preseed/late_command string yourcommand
命令不起作用。相反,你必须使用

ubiquity ubiquity/success_command string yourcommand
我希望这有帮助


Jan

几天前我也遇到了同样的问题,所以我想与您分享解决方案。在预装Ubuntu安装时

d-i preseed/late_command string yourcommand
命令不起作用。相反,你必须使用

ubiquity ubiquity/success_command string yourcommand
我希望这有帮助


Jan

您使用的是哪个Ubuntu版本?18.04.5或20.04?您使用的是哪个Ubuntu版本?18.04.5还是20.04?