Fixup on uefi linux boot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10553 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
21ff396236
commit
1201990fc6
27
xCAT-nbroot2/xcat-cmdline.sh
Normal file
27
xCAT-nbroot2/xcat-cmdline.sh
Normal file
@ -0,0 +1,27 @@
|
||||
root=1
|
||||
rootok=1
|
||||
netroot=xcat
|
||||
clear
|
||||
echo PS1="'"'[xCAT Genesis running on \H \w]\$ '"'" > /.bashrc
|
||||
echo PS1="'"'[xCAT Genesis running on \H \w]\$ '"'" > /.bash_profile
|
||||
mkdir -p /etc/ssh
|
||||
mkdir -p /var/empty/sshd
|
||||
echo root:x:0:0::/:/bin/bash >> /etc/passwd
|
||||
echo sshd:x:30:30:SSH User:/var/empty/sshd:/sbin/nologin >> /etc/passwd
|
||||
echo rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin >> /etc/passwd
|
||||
echo rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin >> /etc/passwd
|
||||
echo qemu:x:107:107:qemu user:/:/sbin/nologin >> /etc/passwd
|
||||
echo '[ -e $NEWROOT/proc ]' > /initqueue-finished/xcatroot.sh
|
||||
mkdir /dev/cgroup
|
||||
mount -t cgroup -o cpu,memory,devices cgroup /dev/cgroup
|
||||
udevd --daemon
|
||||
udevadm trigger
|
||||
mkdir -p /var/lib/dhclient/
|
||||
mkdir -p /var/log
|
||||
ip link set lo up
|
||||
echo '127.0.0.1 localhost' >> /etc/hosts
|
||||
if grep console=ttyS /proc/cmdline > /dev/null; then
|
||||
while :; do sleep 1; screen -x console < /dev/tty1 > /dev/tty1 2>&1; clear; done &
|
||||
fi
|
||||
while :; do screen -ln < /dev/tty2 > /dev/tty2 2>&1; done &
|
||||
while :; do screen -ln doxcat; done
|
@ -393,7 +393,7 @@ sub addnode
|
||||
} else {
|
||||
#TODO: if windows uefi, do vendor-class-identifier of "PXEClient" to bump it over to proxydhcp.c
|
||||
if ($douefi) {
|
||||
$lstatements = 'if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { filename = \"http://'.$nxtsrv.'/tftpboot/xcat/xnba/nodes/'.$node.'\"; } else if option user-class-identifier = \"xNBA\" and option client-architecture = 00:09 { filename = \"http://'.$nxtsrv.'/tftpboot/xcat/xnba/nodes/'.$node.'.uefi\"; } else if option client-architecture = 00:07 { filename = \"xcat/xnba.efi\"; } else if option client-architecture = 00:00 { filename = \"xcat/xnba.kpxe\"; } else { filename = \"\"; }'.$lstatements; #Only PXE compliant clients should ever receive xNBA
|
||||
$lstatements = 'if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { always-broadcast on; filename = \"http://'.$nxtsrv.'/tftpboot/xcat/xnba/nodes/'.$node.'\"; } else if option user-class-identifier = \"xNBA\" and option client-architecture = 00:09 { filename = \"http://'.$nxtsrv.'/tftpboot/xcat/xnba/nodes/'.$node.'.uefi\"; } else if option client-architecture = 00:07 { filename = \"xcat/xnba.efi\"; } else if option client-architecture = 00:00 { filename = \"xcat/xnba.kpxe\"; } else { filename = \"\"; }'.$lstatements; #Only PXE compliant clients should ever receive xNBA
|
||||
} else {
|
||||
$lstatements = 'if option user-class-identifier = \"xNBA\" and option client-architecture = 00:00 { filename = \"http://'.$nxtsrv.'/tftpboot/xcat/xnba/nodes/'.$node.'\"; } else if option client-architecture = 00:00 { filename = \"xcat/xnba.kpxe\"; } else { filename = \"\"; }'.$lstatements; #Only PXE compliant clients should ever receive xNBA
|
||||
}
|
||||
|
@ -211,6 +211,21 @@ sub setstate {
|
||||
print $pcfg "imgfetch http://".'${next-server}'."/tftpboot/".$kern->{initrd}."\n";
|
||||
}
|
||||
print $pcfg "imgexec kernel\n";
|
||||
if ($kern->{kcmdline} and $kern->{initrd}) { #only a linux kernel/initrd pair should land here, write elilo config and uefi variant of xnba config file
|
||||
my $ucfg;
|
||||
open($ucfg,'>',$tftpdir."/xcat/xnba/nodes/".$node.".uefi");
|
||||
print $ucfg "#!gpxe\n";
|
||||
print $ucfg 'chain http://${next-server}/tftpboot/xcat/elilo-x64.efi -C /tftpboot/xcat/xnba/nodes/'.$node.".elilo\n";
|
||||
close($ucfg);
|
||||
open($ucfg,'>',$tftpdir."/xcat/xnba/nodes/".$node.".elilo");
|
||||
print $ucfg 'default="xCAT"'."\n";
|
||||
print $ucfg "delay=0\n\n";
|
||||
print $ucfg "image=/tftpboot/".$kern->{kernel}."\n";
|
||||
print $ucfg " label=\"xCAT\"\n";
|
||||
print $ucfg " initrd=/tftpboot/".$kern->{initrd}."\n";
|
||||
print $ucfg " append=\"".$kern->{kcmdline}.' BOOTIF=%B"'."\n";
|
||||
close($ucfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
close($pcfg);
|
||||
|
Loading…
Reference in New Issue
Block a user