免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1433 | 回复: 0

[FreeBSD] 已解决:Freebsd10 PXE批量安装:如何改脚本自动进入shell模式 [复制链接]

论坛徽章:
0
发表于 2014-10-14 13:59 |显示全部楼层
本帖最后由 ruofeng1916 于 2014-10-14 15:25 编辑

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

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



最新进展:
问题突破点可能在这里:
2.jpg
研究中~~~


!问题解决:
修改系统启动脚本:/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
3.jpg

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP