Pitmaster
(Nico Berg)
November 30, 2017, 9:13am
1
Version 7
Install
I have tried to install Nethserver on a Intel NUC. When setting up the destination drive the process failed. Nethserver is seeing a Volumegroup with a xfs partition. I thought the problem was that I have had Freenas running on this machine before trying Nethserver.
I was supprised to see the same problem later on school when I was showing a student Nethserver on a Hyper-V VM, setting up the destination drive failed with the same reason.
Is this a bug? Is there a fix? Work around?
Thanks in advance Pitmaster.
giacomo
(Giacomo Sanchietti)
November 30, 2017, 10:26am
2
Anaconda should be able to clear all partitions, but I know that sometimes it can fail.
Try to select the manual install and then edit the storage configuration, or install a vanilla CentOS.
jgjimenezs
(Jose G Jimenez S )
November 30, 2017, 10:53am
3
Pitmaster:
I have tried to install Nethserver on a Intel NUC. When setting up the destination drive the process failed. Nethserver is seeing a Volumegroup with a xfs partition. I thought the problem was that I have had Freenas running on this machine before trying Nethserver.
I was supprised to see the same problem later on school when I was showing a student Nethserver on a Hyper-V VM, setting up the destination drive failed with the same reason.
Is this a bug? Is there a fix? Work around?
Thanks in advance Pitmaster.
How are you doing @Pitmaster ? at the time of installation you are using which steps: unattended, manual, etc?
Pitmaster
(Nico Berg)
November 30, 2017, 1:45pm
4
Hi Jose, thanks for reacting m8. The problem is also there where try to make a manual setup of the drive.
I usely know how things work, I am teaching linux servermanagment to Dutch IT students.
Your hint for installing a native CentOS is a good one but I amnow on work, I can try this tonight.
I have tried it with Ubuntu but that didn’t work, same result.
Pit
Pitmaster
(Nico Berg)
November 30, 2017, 5:42pm
5
Using native CentOS did the trick. It acted normal on setting up the destination drive and installed normally. After that I installed native Nethserver 7 and working. Thx you both.
Pit
ps. webinlog gif a 403 - Forbidden but I will figure that out.
Could you please send here the /root/anaconda.ks.cfg
from the successful installation?
jgjimenezs
(Jose G Jimenez S )
November 30, 2017, 7:05pm
7
Pitmaster:
Using native CentOS did the trick. It acted normal on setting up the destination drive and installed normally. After that I installed native Nethserver 7 and working. Thx you both.
Pit
ps. webinlog gif a 403 - Forbidden but I will figure that out.
I have installed the manual form, attached screens of the steps I do.
Have you had any problems with this step?
I have done this both in virtualbox and workstations/servers
2 Likes
Pitmaster
(Nico Berg)
November 30, 2017, 7:49pm
8
[root@mail ~]# cat anaconda-ks.cfg
#platform=86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Firewall configuration
firewall --disabled
firstboot --disable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us-euro --xlayouts='us (euro)'
# System language
lang en_US.UTF-8
# Installation logging level
logging --level=debug
# Network information
network --bootproto=static --device=enp3s0 --gateway=192.168.0.1 --ip=192.168.0.5 --nameserver=8.8.8.8,8.8.4.4 --netmask=255.255.255.0 --ipv6=auto --activate
network --hostname=localhost.localdomain
# Reboot after installation
reboot --eject
# Root password
rootpw --iscrypted $6$/KCkCHSSQ3zOp/aG$QSw2Qt72DcHwLi3yMCPOGe6nIcOQ/TtWx4pmpvEsF1vJuE26wzmibfZHDk10r5e4DIUa3Ac03LRhDHrS5cif9.
# SELinux configuration
selinux --permissive
# System services
services --enabled="chronyd"
# Do not configure the X Window System
skipx
# System timezone
timezone Europe/Amsterdam
user --groups=wheel --name=nico --password=$6$KJWIAvUBvLcG5WX2$gnrPR9AoQch4OuLCF62Wgih1RdjQ2OJ/Qbv7pYf9B0InmoYuKsr/Ph3GUV67zrN0xFyHZfBSpRhxou50cMnGZ/ --iscrypted --gecos="Nico Berg"
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
reqpart --add-boot
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --drives=sda
# Disk partitioning information
part pv.148 --asprimary --fstype="lvmpv" --ondisk=sda --size=952844
part /boot --fstype="xfs" --size=1024
volgroup VolGroup --pesize=4096 pv.148
logvol / --fstype="xfs" --grow --size=5000 --name=lv_root --vgname=VolGroup
logvol swap --fstype="swap" --size=7936 --name=lv_swap --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
%end
%addon com_redhat_kdump --disable --reserve-mb='auto'
%end
I need to finish more tests, but I’m sharing what I found:
your centos kickstart has clearpart --all --drives=sda
while my nethserver kickstart has clearpart --all
.
Unfortunately, the manual is not clear about clearpart:
–all - Erases all partitions from the system.
from:
This manual explains how to boot the Red Hat Enterprise Linux 7 installation program (Anaconda) and how to install Red Hat Enterprise Linux 7 on AMD64 and Intel 64 systems, 64-bit ARM systems, 64-bit IBM...
Then the example in the manual says to use clearpart --drives=hda,hdb --all
which is similar to what we can find in your kickstart.
Testing installation is slow and painful, we may open an issue and work on it later.
If someone has some experience with kickstarts and want to have a look, here they are: