diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 6aeab7d54..510db7afa 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -768,7 +768,9 @@ sub mkinstall . "/install/autoinst/" . $node; #} - + + $kcmdline .= " xcatd=".$instserver; + $kcmdline .= " mirror/http/hostname=".$instserver; if ($maxmem) { $kcmdline.=" mem=$maxmem"; } @@ -793,15 +795,10 @@ sub mkinstall $ksdev = $ent->{primarynic}; } } - else{ - $ksdev = "eth0"; - } - if ($ksdev eq ""){ - $callback->({error => ["No MAC address defined for " . $node], - errorcode => [1]}); + if ($ksdev){ + $kcmdline .= " netcfg/choose_interface=" . $ksdev; } - $kcmdline .= " netcfg/choose_interface=" . $ksdev; #TODO: dd= for driver disks if (defined($sent->{serialport})){ @@ -816,7 +813,7 @@ sub mkinstall $kcmdline .= "n8r"; } } - $kcmdline .= " noipv6"; + #$kcmdline .= " noipv6"; # add the addkcmdline attribute to the end # of the command, if it exists #my $addkcmd = $addkcmdhash->{$node}->[0]; diff --git a/xCAT-server/share/xcat/install/debian/initoverlay/lib/debian-installer-startup.d/S90setserver b/xCAT-server/share/xcat/install/debian/initoverlay/lib/debian-installer-startup.d/S90setserver new file mode 100644 index 000000000..d93410ae7 --- /dev/null +++ b/xCAT-server/share/xcat/install/debian/initoverlay/lib/debian-installer-startup.d/S90setserver @@ -0,0 +1,6 @@ +XCATD=`sed -e s/.*xcatd=/xcatd=/ /proc/cmdline|cut -d ' ' -f 1` +if echo $XCATD|grep xcatd= > /dev/null; then + XCATD=`echo $XCATD|sed -e s/xcatd=//` + echo -n $XCATD > /tmp/xcatserver + debconf-set mirror/http/hostname $XCATD +fi diff --git a/xCAT-server/share/xcat/install/debian/initoverlay/lib/debian-installer-startup.d/S91detectnic b/xCAT-server/share/xcat/install/debian/initoverlay/lib/debian-installer-startup.d/S91detectnic index 547fec517..3b0c63317 100644 --- a/xCAT-server/share/xcat/install/debian/initoverlay/lib/debian-installer-startup.d/S91detectnic +++ b/xCAT-server/share/xcat/install/debian/initoverlay/lib/debian-installer-startup.d/S91detectnic @@ -1,4 +1,4 @@ -BOOTMAC=`sed -e s/.*BOOTIF=/BOOTIF=/ /proc/cmdline|cut -f 1` +BOOTMAC=`sed -e s/.*BOOTIF=/BOOTIF=/ /proc/cmdline|cut -d ' ' -f 1` if echo $BOOTMAC|grep BOOTIF= > /dev/null; then BOOTMAC=`echo $BOOTMAC|sed -e s/BOOTIF=01-// -e s/-/:/g` for dir in /sys/class/net/*; do diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.tmpl b/xCAT-server/share/xcat/install/ubuntu/compute.tmpl index c9aba52fd..aa0016cd9 100644 --- a/xCAT-server/share/xcat/install/ubuntu/compute.tmpl +++ b/xCAT-server/share/xcat/install/ubuntu/compute.tmpl @@ -18,7 +18,6 @@ d-i netcfg/wireless_wep string d-i mirror/country string manual d-i mirror/protocol string http -d-i mirror/http/hostname string #TABLE:noderes:$NODE:nfsserver# d-i mirror/http/directory string /install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch# d-i mirror/http/proxy string @@ -101,13 +100,13 @@ xserver-xorg xserver-xorg/config/monitor/mode-list \ select 1024x768 @ 60 Hz -d-i preseed/early_command string wget http://#TABLE:noderes:$NODE:nfsserver#/install/autoinst/#TABLE:nodelist:THISNODE:node#.pre; \ - chmod u+x #TABLE:nodelist:THISNODE:node#.pre; \ - ./#TABLE:nodelist:THISNODE:node#.pre +d-i preseed/early_command string wget http://`cat /tmp/xcatserver`/install/autoinst/#HOSTNAME#.pre; \ + chmod u+x #HOSTNAME#.pre; \ + ./#HOSTNAME#.pre -d-i preseed/late_command string wget http://#TABLE:noderes:$NODE:nfsserver#/install/autoinst/#TABLE:nodelist:THISNODE:node#.post; \ - chmod u+x #TABLE:nodelist:THISNODE:node#.post; \ - cp ./#TABLE:nodelist:THISNODE:node#.post /target/root/post.script; \ +d-i preseed/late_command string wget http://`cat /tmp/xcatserver`/install/autoinst/#HOSTNAME#.post; \ + chmod u+x #HOSTNAME#.post; \ + cp ./#HOSTNAME#.post /target/root/post.script; \ mount -o bind /proc /target/proc -t proc; \ mount -o bind /dev /target/dev; \ mount -o bind /dev/pts /target/dev/pts -t devpts; \