ruofeng1916 发表于 2014-10-14 13:59

已解决:Freebsd10 PXE批量安装:如何改脚本自动进入shell模式

本帖最后由 ruofeng1916 于 2014-10-14 15:25 编辑

各位大神,小弟最近在研究FreeBSD 10.RC.1:PXE+TFTP+DHCP+NFS批量部署。
我的思路是:PXE客户机通过server自动进入bsdinstall的shell模式,先从本地ftp服务器下载群内网友的ZFS分区脚本,执行ZFS分区脚本。但目前在安装界面,无法自动进入shell模式。如图所示:

目前,只能在安装界面手动选择“shell”,按Enter键进入

问题:如何通过修改启动脚本,让bsdinstall到图上界面后,自动进入shell模式?

:dizzy:

最新进展:
问题突破点可能在这里:

研究中~~~


!问题解决:
修改系统启动脚本:/var/pxeboot/et/rc.local       /var/pxeboot为tftp指定目录            
注释掉:
#dialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live CD" --yesno "Welcome to FreeBS
D! Would you like to begin an installation or use the live CD?" 0 0

/bin/sh                   //插入这个指令,FreeBSD直接进入shell模式

#case $? in
#$DIALOG_OK)    # Install
#       # If not netbooting, have the installer configure the network
#       dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
#       if [ ${dlv:=0} -eq 0 -a ! -f /etc/diskless ]; then
#               BSDINSTALL_CONFIGCURRENT=yes; export BSDINSTALL_CONFIGCURRENT
#       fi
#
#       trap true SIGINT      # Ignore cntrl-C here
#       bsdinstall
#       if [ $? -eq 0 ]; then
#               dialog --backtitle "FreeBSD Installer" --title "Complete" --yes-label "Reboot" --no-label "Live CD" --yesno "Installation of FreeBSD complete! Would yo
#u like to reboot into the installed system now?" 0 0 && reboot
#       else
#               . /etc/rc.local
#       fi
#       ;;
#$DIALOG_CANCEL)      # Live CD
#       exit 0
#       ;;
#$DIALOG_EXTRA) # Shell
#       clear
#       echo "When finished, type 'exit' to return to the installer."
#       /bin/sh
#       . /etc/rc.local
#       ;;
#esac


页: [1]
查看完整版本: 已解决:Freebsd10 PXE批量安装:如何改脚本自动进入shell模式