During the installation of the NS 7.3 Final from ISO, I have set the Green NIC with the following parameters:
IP: 192.168.1.2
NM: 255.255.255.0
GW: 192.168.1.1
DNS: 192.168.1.1
After the installation was finished, the NS has automatically rebooted.
In browser, I have typed https://192.168.1.2:980 for first login and first setup, but the server does not responded.
When I have checked on the NS server with “ifconfig” to see the settings of the NIC, I saw that the IP is 192.168.1.1.
I have repeated the installation twice because I thought that I made a mistake, with the same result: no mistake from me.
What kind of installation did you do? Interactive?
Could you paste
/root/anaconda-ks.cfg
There’s an important notice about static IP assignment from Anaconda
Under the Network > General section, only the interfaces marked as Automatically connect to this network when it is available are enabled at boot in the installed system. For more info, refer to RHEL 7 installation guide.
I always used NS Interactive installation and never had this problem. This is the first time.
I never checked that the NIC to be marked as “Automatically connect to this network when it is available are enabled at boot in the installed system”. It was not necessary! If I remember well, is enabled by default.
But the problem is that I set an IP and after reboot is other IP. I don’t have other DHCP server in LAN.
Here is anaconda-ks.cfg
++++++++++++++++++++++++++++++++++
#platform=86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
repo --name="nethserver" --baseurl=file:///run/install/repo/extras
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Firewall configuration
firewall --disabled
firstboot --disable
ignoredisk --only-use=sda,sdb
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Installation logging level
logging --level=debug
# Network information
network --bootproto=static --device=enp3s0f0 --gateway=192.168.1.1 --ip=192.168.1.2 --nameserver=192.168.1.1 --netmask=255.255.255.0 --onboot=off --ipv6=auto --activate
network --bootproto=dhcp --device=enp4s5 --nameserver=8.8.8.8 --ipv6=auto
network --hostname=pdc-ad.abt.ro
# Reboot after installation
reboot --eject
# Root password
rootpw --iscrypted $6$jg3wMDUeweFQSsUM$GYcGauruKSKHi9qEJNNFl4ZO0404G9W5naKB76N9GhP0.N1y9K2xPjgDpSrtsN3U1sxiY5ik4/8sCxMcju.Al.
# SELinux configuration
selinux --permissive
# System services
services --enabled="chronyd"
# Do not configure the X Window System
skipx
# System timezone
timezone Europe/Bucharest
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
reqpart --add-boot
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
# Disk partitioning information
part raid.182 --asprimary --fstype="mdmember" --ondisk=sda --size=236426
part raid.176 --asprimary --fstype="mdmember" --ondisk=sda --size=1024
part raid.194 --asprimary --fstype="mdmember" --ondisk=sdb --size=237450
part raid.188 --asprimary --fstype="mdmember" --ondisk=sdb --size=1024
raid /boot --device=1 --fstype="xfs" --level=RAID1 raid.176 raid.188
raid pv.207 --device=2 --fstype="lvmpv" --level=RAID1 raid.182 raid.194
volgroup VolGroup --pesize=4096 pv.207
logvol swap --fstype="swap" --size=8064 --name=lv_swap --vgname=VolGroup
logvol / --fstype="xfs" --grow --size=5000 --name=lv_root --vgname=VolGroup
%pre
# eval options
set -- `cat /proc/cmdline`
for I in $*; do case "$I" in *=*) eval $I;; esac; done
# Determine how many drives we have
if [ -z "$disks" ]; then
disks=()
tmp=( $(list-harddrives | cut -d' ' -f 1) )
for d in "${tmp[@]}"
do
if [[ $d == md* ]]; then
# skip md raid devices
continue
fi
mount | grep -q /dev/$d
if [ $? -gt 0 ]; then
disks+=($d)
fi
done
numd=${#disks[@]}
d1=${disks[0]}
d2=${disks[1]}
else
d1=`echo $disks | awk 'BEGIN { FS = "," } ; { print $1 }'`
d2=`echo $disks | awk 'BEGIN { FS = "," } ; { print $2 }'`
if [ -z "$d2" ]; then
numd=1
else
numd=2
fi
fi
if [ $numd -lt 2 ] || [ $raid = "none" ] ; then
cat <<EOF >> /tmp/part-include
# 1 disk, no raid
part /boot --fstype xfs --size 1024
part pv.1 --asprimary --fstype='physical volume (LVM)' --ondisk=$d1 --size=5000 --grow
EOF
echo "bootloader --location=mbr " > /tmp/bootloader-include
elif [ $numd -ge 2 ]; then
cat <<EOF >> /tmp/part-include
# 2 disks, raid 1
part raid.00 --asprimary --fstype='raid' --ondisk=$d1 --size=1024 # boot
part raid.01 --asprimary --fstype='raid' --ondisk=$d1 --size=5000 --grow# root
part raid.10 --asprimary --fstype='raid' --ondisk=$d2 --size=1024 # boot
part raid.11 --asprimary --fstype='raid' --ondisk=$d2 --size=5000 --grow# root
raid /boot --device=md1 --fstype='xfs' --level=1 raid.00 raid.10
raid pv.1 --device=md2 --fstype='physical volume (LVM)' --level=1 raid.01 raid.11
EOF
echo "bootloader --location=mbr " > /tmp/bootloader-include
fi
# enable dhcp on all network interfaces
for net in `find /sys/class/net/ -mindepth 1 ! -name lo | cut -d '/' -f5`; do
echo "network --activate --onboot=yes --bootproto=dhcp --device=$net" --nameserver=8.8.8.8 >>/tmp/network-include
done
# set encrypted fs
if [ -z $fspassword ]; then
echo "logvol / --fstype xfs --name=lv_root --vgname=VolGroup --size=5000 --grow" > /tmp/rootfs-include
else
echo "logvol / --fstype xfs --name=lv_root --vgname=VolGroup --size=5000 --grow --encrypted --passphrase=$fspassword" > /tmp/rootfs-include
fi
%end
%post --interpreter=/bin/bash
exec 1>/root/kickstart-post.log 2>&1
echo "Enabling first-boot..."
touch /var/spool/first-boot
echo "Importing RPM GPG keys..."
rpm --import /etc/pki/rpm-gpg/*
echo "Enable nethserver units..."
systemctl enable nethserver-system-init
systemctl enable nethserver-config-network
systemctl disable NetworkManager firewalld
echo "Disable kdump..."
systemctl disable kdump
if [ -f /etc/nethserver-release ]; then
echo "Fix /etc/issue..."
cp -f /etc/nethserver-release /etc/issue
echo -e 'Kernel \\r on an \\m\n' >> /etc/issue
fi
%end
%packages
@core
@nethserver-iso
chrony
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
I know that. Is not the first time when I install NS.
The problem is not that the NIC is not enabled after reboot.
The problem is that I set an IP during the installation and after reboot the NIC has another IP and of course, is enabled.
I always read the release notes but, as you guessed, my question concerned the installation mode, especially the network module.
I think I always used “manual mode” with “Interactive installation”, without issues, because always I set the following parameters, at least since NS 7rc1, even if the “manual mode” was not mentioned as NS installation method (I think the “manual mode” was even in NS 6 during “interactive installation”):
keyboard and time zone settings - Interactive installation
network, hostname, password - manual mode
storage (sometimes, to test how to partition the HDD) - manual mode