[X86]PXE网络安装Solaris 10故障求解!
两台X86机器配置完全一样,在服务器端安装了Solaris 10 u4,按网上高手写的教程完成了安装和引导服务器的设置,也正确设置了DHCP。我的集成网卡是两块Intel 82546,在服务器端安装Solaris时自动识别出了该两块网卡。
在客户端PXE网络安装Solaris 10时 通过DHCP正确获取了IP地址,运行到GRUB时,没有出现引导菜单,报错如下:
Network interface not initialized yet
请高手们指点,本人纯新人一个!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
你可以用client的mac去抓包,可以看一下dhcp分配ip时候的详细信息,tftp已经是发送了pxegrub过去了,不太清楚是不是那个mene.lst文件没有发送过去.
6楼的,请介绍如何来看client从网络引导时候server发送了一些什么样的包给client.
我用 snoop -d e1000g3 tftp 看不到具体报文内容,e1000g3为我的机器当前主网卡的名称
应该是grub加载不上undi driver吧,不过我还是怀疑你的dhcp server没有正常传递需要的宏定义给这个client,你可以用snoop看一下client从网络引导时候server发送了一些什么样的包给client.
谢谢楼上的,我也怀疑是X86.miniroot中没有另外两块网卡驱动,但我单机安装系统时,网卡识别出四块网卡了,是不是说我这一版的系统中四块网卡的驱动都有呢?
楼主为什么不试试别的版本的Solaris?
还有楼主确认你的网卡支持Solaris10的PXE安装吗?
附一个网上找来的自己加网卡驱动的PXE安装方法:
利用DHCP(ISC)和JumpStart实现solaris(X86)自动化安装
一、需求:
因公司新上一个项目,需要用到很多台机器(X86的),而操作系统统一是Solaris10 U5(X86),如果一台一台的手工安装,工作量可想而知。虽然我没那金刚钻,但还得揽这个瓷器活(其它对solaris比较熟悉的同事都有其它项目)。而solaris提供了一套自定义安装程序JumpStart(类似于redhat的KickStart),所以小弟就针对目前公司状况稍微研究了一下。
此项目上的一个主程序在solaris10U5版本上经过认证.但U6版本(新加上perc6i的驱动了)上有问题,而U5版本本身不带PERC6i的驱动,所以工作之一就需要手工塞驱动(后面会提到).
Clientell PE2950,RAID卡为PERC 6i,bdcrom 5706/5708的集成网卡(认出的模块为bnx,支持PXE)
Client要求被安装的OS版本:solaris10 U5(05/0:fd: X86
其它要求:双网卡做冗余(active-standby)
二、概要:
因为管理成本原因,我们把JumpStart文件服务器、引导服务器、配置文件服务器和NFS服务器都放在一台Dell PE2950的solaris 10 U5(X86)服务器上,而公司已经有了DHCP服务器,为了避免冲突,所以就把dhcp功能给布署到原有的一台dhcp服务器上了(后面会提到向dhcpd.conf里面添加的内容)。
JumpStart服务器OS:Solaris10 U5(X86)
IP:172.16.134.83
Hostname:jserver
整个过程大概如下:
通过让client从网络引导,系统会启动pxe功能,Bootprom发出BOOTP/DHCP请求得到IP,GateWay,及开机引导初始化文件。因为在三层交换机上让这个vlan的dhcp请求relay到指定的dhcp server.于是dhcp server响应请求给出了相关的网络参数也指明引导服务器为jserver和引导初始文件为pxegrub.I86PC.Solaris_10-1,然后client从jserver上通过tftp找到pxegrub并执行,然后根据menu.lst里的相关参数,执行x86.miniroot(同linux下的initrd)及multiboot(同linux下的image文件),根据sysidcfg里设置的参数来执行非交互式安装,在postinstall的时候,会根据post的脚本(end),把perc6i的驱动灌到安装好的系统里。
三、配置JumpStart文件服务器
PERC 6i的驱动是dell网站有下载,solaris10 u5在sun上有下载.我们把他download到一台已装好的solaris10上的/opt目录
mega_sas-v00.00.01.25-2_001.tgz sol-10-u5-ga-x86-dvd.iso to /opt
jserver# cd /opt;mkdir temp
jserver# mv mega_sas-v00.00.01.25-2_001.tgz temp/
jserver# lofiadm -a /opt/sol-10-u5-ga-x86-dvd.iso
/dev/lofi/1
jserver# mount -F hsfs /dev/lofi/1 /mnt
jserver# mkdir -p /jumpstart/{x86,config}
jserver# /mnt/Solaris_10/Tools/setup_install_server /jumpstart/x86
解开miniroot(Solaris 安装介质中所包含的最小可引导根 (/) 文件系统。miniroot 包含安装和升级系统所需的 Solaris 软件。在基于 x86 的系统上,miniroot 被复制到系统中,用作故障安全引导归档文件,类似于kickstart里的pxelinux.0)
jserver# /boot/solaris/bin/root_archive unpack /jumpstart/x86/boot/x86.miniroot /opt/u5_minirootunpack
以下是把dell提供solaris10(X86)的驱动塞到miniroot引导系统里,否则在系统安装时找不到硬盘(不认perc 6i的raid卡),而系统装完后,还需要再安装一下驱动(安装方法请看一下end脚本),否则系统在引导自己安装好的时候还是不认识硬盘。
jserver# cd /opt/temp
jserver# gunzip mega_sas-v00.00.01.25-2_001.tgz
jserver# tar -xf mega_sas-v00.00.01.25-2_001.tar
jserver# uncompress mega_sas.Z
jserver# unzip mega_sas
jserver# cp /opt/temp/megasas/reloc/kernel/drv/{mega_sas,mega_sas.conf} /opt/u5_minirootunpack/kernel/drv/
jserver# mkdir /opt/u5_minirootunpack/kernel/drv/amd64
jserver# cp /opt/temp/megasas/reloc/kernel/drv/amd64/mega_sas /opt/u5_minirootunpack/kernel/drv/amd64/
把驱动以下add_drv参数可从/opt/temp/megasas/install/postinstall和add_drv的man手册中得到.下列中的-i参数后面接的是perc 6i的pci id号
jserver# add_drv -b /opt/u5_minirootunpack -n -v -m '* 0600 root sys' -i '"pci1028,15.1028.1f01" "pci1028,15.1028.1f02" "pci1028,15.1028.1f03" "pci1000,60.1028.1f0a" "pci1000,60.1028.1f0b" "pci1000,60.1028.1f0c" "pci1000,60.1028.1f0d" "pci1000,60.1028.1f11" "pci1000,411.1000.1001" "pci1000,411.1000.1002" "pci1000,411.1000.1003" "pci1000,411.1000.1004" "pci1000,411.1000.2004" "pci1000,411.1000.2005" "pci1000,411.1000.100c" "pci1000,411.1000.100d" "pci1000,411.1000.1008" "pci1000,413.1000.1005" "pci1000,409.1000.1009" "pci1000,60.1000.1006" "pci1000,60.1000.100a" "pci1000,60.1000.100e" "pci1000,60.1000.100f" "pci1000,60.1000.1010" "pci1000,60.1000.1011" "pci1000,60.1000.1012" "pci1000,60.1000.1013" "pci1000,60.1000.1014" "pci1000,60.1000.1015" "pci1000,60.1000.1016" "pci1000,60.1000.1017" "pci1000,60.1000.1018" "pci1000,60.1000.1019" "pci1000,60.1000.101a" "pci1000,60.1000.101b" "pci1000,60.1014.363" "pci1000,60.1014.364" "pci1000,60.1014.365" "pci1000,60.1014.379" "pci1000,60.1170.2f" "pci1000,60.1170.36" "pci1000,60.1043.824d" "pci1000,411.1734.1081" "pci1000,411.1734.10a3" "pci1000,411.1033.8287" "pci1000,60.1033.835a" "pci1000,60.1734.10f9" "pci1000,60.1734.1102" "pci1000,411.8086.1001" "pci1000,411.8086.1003" "pci1000,411.8086.3500" "pci1000,411.8086.3501" "pci1000,411.8086.3504" "pci1000,411.8086.3490" "pci1000,60.8086.34cc" "pci1000,60.8086.34cd" "pci1000,411.8086.3507" "pci1000,411.1054.3016" "pci1000,60.1054.3019" "pci1000,60.8086.1006" "pci1000,60.8086.100a" "pci1000,60.8086.1010" "pci1000,60.17aa.6b7c" "pci1000,60.15d9.c080" "pci1000,60.1000.1458" "pci1000,7c.1000.101c" "pci1000,7c.1014.395"' -c scsi mega_sas
jserver# cd /jumpstart/x86/boot
jserver# mv x86.miniroot x86.miniroot_orig
加载驱动后,再打开miniroot,以便系统在引导安装时能认到硬盘.
jserver# /boot/solaris/bin/root_archive pack /jumpstart/x86/boot/x86.miniroot /opt/u5_minirootunpack
四、配置引导服务器:
将下列grep出来的注释去掉(去掉#号)。
jserver# grep in.tftpd /etc/inetd.conf
# tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
转换inetd服务器为SMF
jserver# inetconv
jserver# svcs tftp/udp6
STATE STIME FMRI
online Dec_18 svc:/network/tftp/udp6:default
生成pxegrub、menu.lst及指明引导服务器
jserver# cd /jumpstart/x86/Solaris_10/Tools/
jserver# ./add_install_client -d SUNW.i86pc i86pc
五、配置NFS服务器:
以只读权限share本服务器的/jumpstart目录给client
jserver# echo "share -F nfs -o ro,anon=0 /jumpstart" >> /etc/dfs/dfstab
jserver# svcadm enable nfs/server
jserver# svcs nfs/server
STATE STIME FMRI online 14:52:25 svc:/network/nfs/server:default
jserver# share
- /jumpstart ro,anon=0 ""
六、配置文件服务器:
jserver# cd /jumpstart/conf
jserver# ls
begin check end rules rules.ok sysidcfg x86-class
现先大概介绍一下以上几个文件的作用
rules.ok:在自定义JumpStart 安装过程中,JumpStart 程序尝试将要安装的系统与rules.ok 文件中的规则进行匹配。JumpStart 程序从第一条规则到最后一条规则通读这些规则。当安装的系统与规则中定义的所有系统属性一致时发生匹配。一旦系统匹配规则,JumpStart 程序即停止读取rules.ok 文件,然后根据匹配规则的配置文件开始安装系
统。必须使用 check(solaris提供:一般在ISO里的Solaris_10/Misc/jumpstart_sample目录下)脚本。
rules:它可以根据机器的机器的网段,系统架构类型(sparc,i86pc)来定义preinstall,postinstall和class等脚本。文件内容里的begin,x86-class以及end等文件名都无固定语法,但这些文件内容里有很多语法。
x86-class:是rules里定义系统的安装参数(分区,安装语言等等)
begin:是我在rules里指定的安装前做的一些工作,相当于kickstart里的preinstall.
end:是我在rules里指定的安装后(软件安装完及还没reboot这段时间)做的一些工作,相当于kickstart里的preinstall.
下面将把我的配置文件发出来
jserver# cat rules
any - begin x86-class end
jserver# cat begin
#!/bin/sh
sleep 1
echo "n33[0;32;40mWelcome To JumpStart33[0mn"
echo
sleep 1
echo "lease enter your server IP ADDRESS:"
read IP
echo "lease enter your server HOSTNAME:"
read HOSTNAME
echo "$IP" >/tmp/IP
echo "$HOSTNAME">/tmp/HOSTNAME
jserver# cat x86-class
install_type initial_install
system_type standalone
partitioning explicit
filesys c0t0d0s0 20000 /
filesys c0t0d0s1 16000 swap
filesys c0t0d0s7 free /export/home
cluster SUNWCXall
geo Asia
locale en_US
locale zh_CN
end脚本需说明一下,因Solaris在系统安装过程中,把/目录指定到/a目录下。所以脚本里涉及到的系统文件操作,都需要在文件或文件夹的path前加上/a
jserver# cat end
#!/bin/sh
# Author: Jackylau <squidipt@yahoo.com.cn>
# WebSite: www.opensolution.org.cn
# Desc: Postinstall
# Date: 2008.12.13
# permit root ssh
echo "wq"|ex -c "%s/PermitRootLogin no/PermitRootLogin yes/" /a/etc/ssh/sshd_config
touch /a/.NFS4inst_state.domain
# Add driver for PERC 6i
touch /a/kernel/drv/mega_sas.conf
cp /kernel/drv/mega_sas /a/kernel/drv/mega_sas
cp /kernel/drv/amd64/mega_sas /a/kernel/drv/amd64/mega_sas
add_drv -b /a -n -v -m '* 0600 root sys' -i '"pci1028,15.1028.1f01" "pci1028,15.1028.1f02" "pci1028,15.1028.1f03" "pci1000,60.1028.1f0a" "pci1000,60.1028.1f0b" "pci1000,60.1028.1f0c" "pci1000,60.1028.1f0d" "pci1000,60.1028.1f11" "pci1000,411.1000.1001" "pci1000,411.1000.1002" "pci1000,411.1000.1003" "pci1000,411.1000.1004" "pci1000,411.1000.2004" "pci1000,411.1000.2005" "pci1000,411.1000.100c" "pci1000,411.1000.100d" "pci1000,411.1000.1008" "pci1000,413.1000.1005" "pci1000,409.1000.1009" "pci1000,60.1000.1006" "pci1000,60.1000.100a" "pci1000,60.1000.100e" "pci1000,60.1000.100f" "pci1000,60.1000.1010" "pci1000,60.1000.1011" "pci1000,60.1000.1012" "pci1000,60.1000.1013" "pci1000,60.1000.1014" "pci1000,60.1000.1015" "pci1000,60.1000.1016" "pci1000,60.1000.1017" "pci1000,60.1000.1018" "pci1000,60.1000.1019" "pci1000,60.1000.101a" "pci1000,60.1000.101b" "pci1000,60.1014.363" "pci1000,60.1014.364" "pci1000,60.1014.365" "pci1000,60.1014.379" "pci1000,60.1170.2f" "pci1000,60.1170.36" "pci1000,60.1043.824d" "pci1000,411.1734.1081" "pci1000,411.1734.10a3" "pci1000,411.1033.8287" "pci1000,60.1033.835a" "pci1000,60.1734.10f9" "pci1000,60.1734.1102" "pci1000,411.8086.1001" "pci1000,411.8086.1003" "pci1000,411.8086.3500" "pci1000,411.8086.3501" "pci1000,411.8086.3504" "pci1000,411.8086.3490" "pci1000,60.8086.34cc" "pci1000,60.8086.34cd" "pci1000,411.8086.3507" "pci1000,411.1054.3016" "pci1000,60.1054.3019" "pci1000,60.8086.1006" "pci1000,60.8086.100a" "pci1000,60.8086.1010" "pci1000,60.17aa.6b7c" "pci1000,60.15d9.c080" "pci1000,60.1000.1458" "pci1000,7c.1000.101c" "pci1000,7c.1014.395"' -c scsi mega_sas
# Modify network spec
IP=`cat /tmp/IP`
HOSTNAME=`cat /tmp/HOSTNAME `
GATEWAY=`cat /tmp/IP|awk -F. '{print $1"."$2"."$3".254"}'`
echo "::1 localhost" >/a/etc/inet/hosts
echo "$IP $HOSTNAME loghost" >>/a/etc/inet/hosts
echo "$HOSTNAME" >/a/etc/nodename
echo "$HOSTNAME netmask + broadcast + group bond0 up">/a/etc/hostname.bnx0
echo "group bond0 up" >/a/etc/hostname.bnx1
echo "$GATEWAY">/etc/defaultrouter
# modify bonding
cat << EOF > /a/etc/default/mpathd
FAILURE_DETECTION_TIME=100
FAILBACK=no
TRACK_INTERFACES_ONLY_WITH_GROUPS=yes
EOF
cat << EOF > /a/etc/resolv.conf
nameserver 10.0.1.218
EOF
cat /a/etc/nsswitch.conf |sed 's/hosts: files/hosts: files dns/g'>/tmp/nsswitch.conf_$$
cat /tmp/nsswitch.conf_$$ >/a/etc/nsswitch.conf
rm -f /tmp/nsswitch.conf_$$
# modify system spec
cat << EOF >> /a/etc/system
set rlim_fd_max=262144
set rlim_fd_cur=65536
set shmsys:shminfo_shmmax=0x2000000
set semsys:seminfo_semmni=1024
EOF
cat << EOF >/a/etc/rc2.d/S12gpdb_ndd
/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 4096
/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q0 4096
/usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65535
/usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 4096
/usr/sbin/ndd -set /dev/tcp tcp_time_wait_interval 1000
sh /opt/dw_post_install.sh
EOF
chmod 755 /a/etc/rc2.d/S12gpdb_ndd
# modify root shell to bash
echo "wq"|ex -c "%s#/sbin/sh#/usr/bin/bash#" /a/etc/passwd
# setting ENV
cat << EOF >>/a/etc/profile
EOFTH=$PATH:/usr/sfw/bin:/opt/SUNWspro/bin:/opt/csw/bin:/usr/local/bin
export PATH
alias ll="ls -al"
export PS1='[u@h $PWD]#'
EOF
# disable service
cat << EOF >>/a/opt/dw_post_install.sh
#!/bin/sh
svcadm disable telnet
svcadm disable cde-login
svcadm disable cde-printinfo
svcadm disable webconsole
svcadm disable finger
svcadm disable ftp
svcadm disable rlogin
echo "wq"|ex -c "/dw_post_install.sh/d" /etc/rc2.d/S12gpdb_ndd
EOF
jserver# cat sysidcfg
network_interface=PRIMARY
{protocol_ipv6=no
hostname=localhost
netmask=255.255.255.0
default_route=172.22.18.254}
security_policy=NONE
name_service=NONE
timezone=Asia/Shanghai
system_locale=en_US
terminal=vt100
pointer=MS-S
timeserver=localhost
nfs4_domain=dynamic
root_password=67jCNlUfrldoI2
jserver# cat /tftpboot/boot/grub/menu.lst
default=0
timeout=3
title Solaris_10 JumpStart
#下面一行是声明系统在引导时的参数。请注意- install dhcp要加上的,
kernel /I86PC.Solaris_10-1/multiboot kernel/unix - nowin - install dhcp -B install_config=172.16.134.83:/jumpstart/config,sysid_config=172.16.134.83:/jumpstart/config,install_media=172.16.134.83:/jumpstart/x86,install_boot=172.16.134.83:/jumpstart/x86/boot
module /I86PC.Solaris_10-1/x86.miniroot
七、配置DHCP服务器:
在dhcpd.conf最后面添加了一条
allow booting;
allow bootp;
include "/opt/chroot/etc/jumpstart_dhcpd.conf";
jserver# cat /opt/chroot/etc/jumpstart_dhcpd.conf
group {
next-server 172.16.134.83; #声明客户端引导初始化文件的服务器IP(因为我的引导服务器为jserver)
filename "/pxegrub.I86PC.Solaris_10-1"; #声明客户端加载的引导初始化文件(其值类似于kickstart里的pxelinux.0)
use-host-decl-names on;
option vendor-encapsulated-options 09:0f:80:00:0c:4e:65:74:77:6f:72:6b:20:62:6f:6f:74:0a:07:00:50:72:6f:6d:70:74:06:01:02:08:03:80:00:00:47:04:80:00:00:00:ff; #如果不加这个,可能会出现tftp miniroot出错。
subnet 172.22.18.0 netmask 255.255.255.0{
range 172.22.18.220 172.22.18.239;
option routers 172.22.18.254;
option broadcast-address 172.22.18.255;
option domain-name-servers 172.16.20.220;
}
}
八、Tips:
为了实现操作系统安装完毕后不自动重启,可以在postinstall脚本里加上
touch /a/noautoshutdown(仅适合sparc平台)
本帖最后由 tt709 于 2010-10-11 23:42 编辑
几天没有人回复,急啊!~
现象描述详细一下:
1,板载4块intel 网卡,2个intel 87571 +2个intel 82546 ,现BIOS中两个intel 82546 支持PXE,或者另两个intel 87571 支持PXE,但是它们4个网口不能同时支持PXE。
2,分别使用两种不同的网卡PXE网络安装Solaris 10时,现象都是:
GNU GRUB version 0.95 (628K lower / 3668928K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ESC at any time exits. ]
grub> ifconfig
Probing pci nic...
[UNDI]
[UNDI]
[UNDI]ROM IBA GE Slot 8609 v1250 by Intel Corporation
Revision 2.1.0 NDIS type DIX+802.3 interface at 1000 Mbps
[UNDI]ROM IBA GE Slot 8609 v1250 by Intel Corporation
Revision 2.1.0 NDIS type DIX+802.3 interface at 1000 Mbps
Network interface not initialized yet.
系统停止在此就不往下了~
我找到网上一相似Bug的信息:http://bugs.opensolaris.org/bugd ... g.do?bug_id=6654503,
请各位高手再帮分析分析!
版主yuhuohu在吗?我有你写的那本手,SPARC下的Jumpstart安装很顺利,X86下再给指点啊