diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 2fc01b9e0..8205ae693 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -733,6 +733,22 @@ sub mknetboot $initrdstr = "xcat/netboot/$osver/$arch/$profile/initrd-stateless.gz"; } } + + if($statelite) + { + my $statelitetb = xCAT::Table->new('statelite'); + my $mntopts = $statelitetb->getAttribs({node => $node}, 'mntopts'); + + my $mntoptions = $mntopts->{'mntopts'}; + unless (defined($mntoptions)) + { + $kcmdline .= " MNTOPTS="; + } + else + { + $kcmdline .= " MNTOPTS=$mntoptions"; + } + } $bptab->setNodeAttribs( $node, { diff --git a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-prepivot.sh index c8eeb0aee..22b0bc9b6 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut/xcat-prepivot.sh @@ -46,7 +46,12 @@ if [ ! -z $SNAPSHOTSERVER ]; then mkdir -p $NEWROOT/$RWDIR/persistent MAXTRIES=5 ITER=0 - while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o nolock,rsize=32768,tcp,nfsvers=3,timeo=14; do + if [ -z $MNTOPTS ]; then + MNT_OPTIONS="nolock,rsize=32768,tcp,timeo=14" + else + MNT_OPTIONS=$MNTOPTS + fi + while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then echo "Your are dead, rpower $ME boot to play again." diff --git a/xCAT-server/share/xcat/netboot/rh/dracut/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut/xcatroot index 759f85cea..f11ae4fa5 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut/xcatroot @@ -98,7 +98,12 @@ elif [ -r /rootimg-statelite.gz ]; then mkdir -p $NEWROOT/$RWDIR/persistent MAXTRIES=5 ITER=0 - while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o nolock,rsize=32768,tcp,timeo=14; do + if [ -z $MNTOPTS ]; then + MNT_OPTIONS="nolock,rsize=32768,tcp,timeo=14" + else + MNT_OPTIONS=$MNTOPTS + fi + while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do ITER=$(( ITER + 1 )) if [ "$ITER" == "$MAXTRIES" ]; then echo "You are dead, rpower $ME boot to play again."