Compare commits
No commits in common. "c90a1a43267f50ac8fc219ccbde2c73f668b0c2c" and "3f1fb4ac05425bb92e483c8993b9ee6cf3f80373" have entirely different histories.
c90a1a4326
...
3f1fb4ac05
26
.drone.yml
@ -1,26 +0,0 @@
|
|||||||
# workspace:
|
|
||||||
# base: /build
|
|
||||||
# path: /
|
|
||||||
|
|
||||||
pipeline:
|
|
||||||
build:
|
|
||||||
image: registry.libreschool.org/libreschool-automation/libreschool-iso-builder:latest
|
|
||||||
source_iso_url: http://repo.libreschool.org/nethserver/iso/nethserver-7.6.1810-x86_64.iso
|
|
||||||
output_iso: libreschool-7.6-x86_64.iso
|
|
||||||
when:
|
|
||||||
event: [ push, tag ]
|
|
||||||
|
|
||||||
# THAT'S A BAD IDEA
|
|
||||||
gitea_release:
|
|
||||||
group: deploy
|
|
||||||
image: plugins/gitea-release
|
|
||||||
files: libreschool-7.6-x86_64.iso
|
|
||||||
checksum:
|
|
||||||
- md5
|
|
||||||
- sha1
|
|
||||||
- sha256
|
|
||||||
- sha512
|
|
||||||
secrets: [ gitea_token ]
|
|
||||||
base_url: https://git.libreschool.org
|
|
||||||
when:
|
|
||||||
event: tag
|
|
@ -1,5 +1,3 @@
|
|||||||
# libreschool-iso
|
# libreschool-iso
|
||||||
|
|
||||||
[](https://drone.libreschool.org/paspo/libreschool-iso)
|
|
||||||
|
|
||||||
This tool automates the generation of LibreSchool iso
|
This tool automates the generation of LibreSchool iso
|
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 36 KiB |
@ -1,5 +0,0 @@
|
|||||||
http://repo.libreschool.org/nethserver/6/base/x86_64/Packages/libreschool-release-1.0-1.noarch.rpm
|
|
||||||
http://mirror.centos.org/centos/7/os/x86_64/Packages/python-jinja2-2.7.2-2.el7.noarch.rpm
|
|
||||||
http://repo.libreschool.org/nethserver/6/base/x86_64/Packages/startpage-0.9-3.ns6.noarch.rpm
|
|
||||||
http://mirror.centos.org/centos/7/os/x86_64/Packages/python-babel-0.9.6-8.el7.noarch.rpm
|
|
||||||
http://mirror.centos.org/centos/7/os/x86_64/Packages/python-markupsafe-0.11-10.el7.x86_64.rpm
|
|
@ -1,54 +0,0 @@
|
|||||||
set default="0"
|
|
||||||
|
|
||||||
function load_video {
|
|
||||||
insmod efi_gop
|
|
||||||
insmod efi_uga
|
|
||||||
insmod video_bochs
|
|
||||||
insmod video_cirrus
|
|
||||||
insmod all_video
|
|
||||||
}
|
|
||||||
|
|
||||||
load_video
|
|
||||||
set gfxpayload=keep
|
|
||||||
insmod gzio
|
|
||||||
insmod part_gpt
|
|
||||||
insmod ext2
|
|
||||||
|
|
||||||
set timeout=60
|
|
||||||
### END /etc/grub.d/00_header ###
|
|
||||||
|
|
||||||
search --no-floppy --set=root -l 'nethserver'
|
|
||||||
|
|
||||||
### BEGIN /etc/grub.d/10_linux ###
|
|
||||||
menuentry 'LibreSchool interactive installation' --class fedora --class gnu-linux --class gnu --class os {
|
|
||||||
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=nethserver inst.ks=hd:LABEL=nethserver:/ks/interactive inst.nodmraid
|
|
||||||
initrdefi /images/pxeboot/initrd.img
|
|
||||||
}
|
|
||||||
submenu 'Other LibreSchool installation methods' {
|
|
||||||
menuentry 'Unattended installation - WARNING: existing disk data will be lost!' --class fedora --class gnu-linux --class gnu --class os {
|
|
||||||
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=nethserver inst.ks=hd:LABEL=nethserver:/ks/unattended inst.nodmraid
|
|
||||||
initrdefi /images/pxeboot/initrd.img
|
|
||||||
}
|
|
||||||
menuentry 'Manual installation - WARNING: existing disk data will be lost!' --class fedora --class gnu-linux --class gnu --class os {
|
|
||||||
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=nethserver inst.ks=hd:LABEL=nethserver:/ks/manual inst.nodmraid
|
|
||||||
initrdefi /images/pxeboot/initrd.img
|
|
||||||
}
|
|
||||||
}
|
|
||||||
menuentry 'Install CentOS 7' --class fedora --class gnu-linux --class gnu --class os {
|
|
||||||
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=nethserver quiet
|
|
||||||
initrdefi /images/pxeboot/initrd.img
|
|
||||||
}
|
|
||||||
menuentry 'Test this media & install CentOS 7' --class fedora --class gnu-linux --class gnu --class os {
|
|
||||||
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=nethserver rd.live.check quiet
|
|
||||||
initrdefi /images/pxeboot/initrd.img
|
|
||||||
}
|
|
||||||
submenu 'Troubleshooting -->' {
|
|
||||||
menuentry 'Install CentOS 7 in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
|
|
||||||
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=nethserver xdriver=vesa nomodeset quiet
|
|
||||||
initrdefi /images/pxeboot/initrd.img
|
|
||||||
}
|
|
||||||
menuentry 'Rescue a CentOS system' --class fedora --class gnu-linux --class gnu --class os {
|
|
||||||
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=nethserver rescue quiet
|
|
||||||
initrdefi /images/pxeboot/initrd.img
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,112 +0,0 @@
|
|||||||
default vesamenu.c32
|
|
||||||
#prompt 1
|
|
||||||
#default interactive
|
|
||||||
timeout 600
|
|
||||||
|
|
||||||
display boot.msg
|
|
||||||
|
|
||||||
menu background splash.jpg
|
|
||||||
menu title LibreSchool 7.6
|
|
||||||
menu vshift 0
|
|
||||||
menu rows 6
|
|
||||||
menu helpmsgrow 12
|
|
||||||
menu clear
|
|
||||||
|
|
||||||
menu color border 0 #ffffffff #00000000 none
|
|
||||||
menu color sel 7 #ff1d247c #ffffffff none
|
|
||||||
menu color title 0 #ffffffff #00000000 none
|
|
||||||
menu color tabmsg 0 #ffffffff #00000000 none
|
|
||||||
menu color unsel 0 #ffffffff #00000000 none
|
|
||||||
menu color help 0 #ffffffff #00000000 none
|
|
||||||
menu color timeout 0 #ffffffff #00000000 none
|
|
||||||
menu color timeout_msg 0 #ffffffff #00000000 none
|
|
||||||
menu color hotsel 0 #ff000000 #ffffffff
|
|
||||||
menu color hotkey 7 #ffffffff #ff000000
|
|
||||||
menu color scrollbar 0 #ffffffff #00000000
|
|
||||||
|
|
||||||
label interactive
|
|
||||||
menu label LibreSchool interactive installation
|
|
||||||
menu default
|
|
||||||
text help
|
|
||||||
WARNING! Existing disk data will be lost!
|
|
||||||
|
|
||||||
Choose common installation options like keyboard,
|
|
||||||
time zone, RAID and network.
|
|
||||||
endtext
|
|
||||||
kernel vmlinuz
|
|
||||||
append initrd=initrd.img inst.stage2=hd:LABEL=nethserver inst.ks=hd:LABEL=nethserver:/ks/interactive inst.nodmraid
|
|
||||||
|
|
||||||
menu begin
|
|
||||||
menu title Other LibreSchool installation methods
|
|
||||||
|
|
||||||
label unattended
|
|
||||||
menu label Unattended installation
|
|
||||||
text help
|
|
||||||
WARNING! Existing disk data will be lost!
|
|
||||||
|
|
||||||
Fully automated installation with default values:
|
|
||||||
* keyboard us
|
|
||||||
* timezone UTC
|
|
||||||
* root password LibreSchool,1234
|
|
||||||
* DHCP network configuration
|
|
||||||
endtext
|
|
||||||
kernel vmlinuz
|
|
||||||
append initrd=initrd.img inst.stage2=hd:LABEL=nethserver quiet inst.ks=hd:LABEL=nethserver:/ks/unattended inst.nodmraid
|
|
||||||
|
|
||||||
label manual
|
|
||||||
menu label Manual installation
|
|
||||||
text help
|
|
||||||
Customize storage and network parameters.
|
|
||||||
endtext
|
|
||||||
kernel vmlinuz
|
|
||||||
append initrd=initrd.img inst.stage2=hd:LABEL=nethserver quiet inst.ks=hd:LABEL=nethserver:/ks/manual inst.nodmraid
|
|
||||||
|
|
||||||
menu end
|
|
||||||
|
|
||||||
menu begin
|
|
||||||
menu title Standard CentOS installation
|
|
||||||
|
|
||||||
label linux
|
|
||||||
menu label Install or upgrade an existing system
|
|
||||||
text help
|
|
||||||
Standard CentOS installation, fully customizable.
|
|
||||||
endtext
|
|
||||||
kernel vmlinuz
|
|
||||||
append initrd=initrd.img inst.stage2=hd:LABEL=nethserver quiet
|
|
||||||
|
|
||||||
label vesa
|
|
||||||
menu label Install system with basic video driver
|
|
||||||
text help
|
|
||||||
Standard CentOS installation compatible with all graphic controllers.
|
|
||||||
endtext
|
|
||||||
kernel vmlinuz
|
|
||||||
append initrd=initrd.img inst.stage2=hd:LABEL=nethserver xdriver=vesa nomodeset quiet
|
|
||||||
|
|
||||||
menu end
|
|
||||||
|
|
||||||
menu begin Tools
|
|
||||||
menu title Tools
|
|
||||||
|
|
||||||
label rescue
|
|
||||||
menu label Rescue installed system
|
|
||||||
kernel vmlinuz
|
|
||||||
append initrd=initrd.img inst.stage2=hd:LABEL=nethserver rescue quiet
|
|
||||||
|
|
||||||
label memtest86
|
|
||||||
menu label Memory test
|
|
||||||
kernel memtest
|
|
||||||
append -
|
|
||||||
|
|
||||||
label hdt
|
|
||||||
menu label Hardware Detection Tool
|
|
||||||
text help
|
|
||||||
Check hardware with the Hardware Detection Tool
|
|
||||||
endtext
|
|
||||||
kernel hdt.c32
|
|
||||||
menu end
|
|
||||||
|
|
||||||
menu separtor
|
|
||||||
|
|
||||||
label local
|
|
||||||
menu label Boot from local drive
|
|
||||||
localboot 0xffff
|
|
Before Width: | Height: | Size: 90 KiB |
@ -1,148 +0,0 @@
|
|||||||
#platform=x86, AMD64, or Intel EM64T
|
|
||||||
#version=DEVEL
|
|
||||||
%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 --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 --ondisk=$d1 --size=1024 # boot
|
|
||||||
part raid.01 --asprimary --ondisk=$d1 --size=5000 --grow# root
|
|
||||||
|
|
||||||
part raid.10 --asprimary --ondisk=$d2 --size=1024 # boot
|
|
||||||
part raid.11 --asprimary --ondisk=$d2 --size=5000 --grow# root
|
|
||||||
|
|
||||||
raid /boot --device=md1 --fstype='xfs' --level=RAID1 raid.00 raid.10
|
|
||||||
raid pv.1 --device=md2 --level=RAID1 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 --percent=100" > /tmp/rootfs-include
|
|
||||||
else
|
|
||||||
echo "logvol / --fstype xfs --name=lv_root --vgname=VolGroup --percent=100 --encrypted --passphrase=$fspassword" > /tmp/rootfs-include
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
%end
|
|
||||||
|
|
||||||
#
|
|
||||||
# Selected packages
|
|
||||||
#
|
|
||||||
%packages
|
|
||||||
@nethserver-iso
|
|
||||||
@core
|
|
||||||
startpage
|
|
||||||
libreschool-release
|
|
||||||
%end
|
|
||||||
|
|
||||||
repo --name=nethserver --baseurl=file:///run/install/repo/extras
|
|
||||||
repo --name=libreschool --baseurl=file:///run/install/repo/libreschool
|
|
||||||
|
|
||||||
# Install OS instead of upgrade
|
|
||||||
install
|
|
||||||
# Network information
|
|
||||||
%include /tmp/network-include
|
|
||||||
firewall --disable
|
|
||||||
# System language
|
|
||||||
lang en_US
|
|
||||||
# SELinux configuration
|
|
||||||
selinux --permissive
|
|
||||||
# Do not configure the X Window System
|
|
||||||
skipx
|
|
||||||
# Installation logging level
|
|
||||||
logging --level=debug
|
|
||||||
# System bootloader configuration
|
|
||||||
%include /tmp/bootloader-include
|
|
||||||
# Clear the Master Boot Record
|
|
||||||
zerombr
|
|
||||||
# Partition clearing information
|
|
||||||
clearpart --all
|
|
||||||
reqpart --add-boot
|
|
||||||
# Disk partitioning information
|
|
||||||
%include /tmp/part-include
|
|
||||||
# LVM
|
|
||||||
volgroup VolGroup pv.1
|
|
||||||
logvol swap --fstype swap --name=lv_swap --vgname=VolGroup --recommended --maxsize=6000
|
|
||||||
%include /tmp/rootfs-include
|
|
||||||
# Reboot and eject CD
|
|
||||||
reboot --eject
|
|
||||||
|
|
||||||
|
|
||||||
%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
|
|
||||||
|
|
||||||
echo "Forcing system time to UTC ..."
|
|
||||||
sed -i 's/LOCAL/UTC/' /etc/adjtime
|
|
||||||
|
|
||||||
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
|
|
||||||
echo 'Access the web interface at the following URLs:' >> /etc/issue
|
|
||||||
ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:980 >> /etc/issue
|
|
||||||
echo >> /etc/issue
|
|
||||||
fi
|
|
||||||
|
|
||||||
%end
|
|
@ -1,58 +0,0 @@
|
|||||||
#platform=x86, AMD64, or Intel EM64T
|
|
||||||
#version=RHEL7
|
|
||||||
|
|
||||||
#
|
|
||||||
# Selected packages
|
|
||||||
#
|
|
||||||
%packages
|
|
||||||
@nethserver-iso
|
|
||||||
@core
|
|
||||||
startpage
|
|
||||||
libreschool-release
|
|
||||||
%end
|
|
||||||
|
|
||||||
repo --name=nethserver --baseurl=file:///run/install/repo/extras
|
|
||||||
repo --name=libreschool --baseurl=file:///run/install/repo/libreschool
|
|
||||||
|
|
||||||
# Install OS instead of upgrade
|
|
||||||
install
|
|
||||||
firewall --disable
|
|
||||||
# System language
|
|
||||||
lang en_US
|
|
||||||
# SELinux configuration
|
|
||||||
selinux --permissive
|
|
||||||
# Do not configure the X Window System
|
|
||||||
skipx
|
|
||||||
# Installation logging level
|
|
||||||
logging --level=debug
|
|
||||||
|
|
||||||
%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
|
|
||||||
|
|
||||||
echo "Forcing system time to UTC ..."
|
|
||||||
sed -i 's/LOCAL/UTC/' /etc/adjtime
|
|
||||||
|
|
||||||
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
|
|
||||||
echo 'Access the web interface at the following URLs:' >> /etc/issue
|
|
||||||
ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:980 >> /etc/issue
|
|
||||||
echo >> /etc/issue
|
|
||||||
fi
|
|
||||||
|
|
||||||
%end
|
|
@ -1,162 +0,0 @@
|
|||||||
#platform=x86, AMD64, or Intel EM64T
|
|
||||||
#version=DEVEL
|
|
||||||
%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 --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 --ondisk=$d1 --size=1024 # boot
|
|
||||||
part raid.01 --asprimary --ondisk=$d1 --size=5000 --grow # root
|
|
||||||
|
|
||||||
part raid.10 --asprimary --ondisk=$d2 --size=1024 # boot
|
|
||||||
part raid.11 --asprimary --ondisk=$d2 --size=5000 --grow # root
|
|
||||||
|
|
||||||
raid /boot --device=md1 --fstype='xfs' --level=RAID1 raid.00 raid.10
|
|
||||||
raid pv.1 --device=md2 --level=RAID1 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" >>/tmp/network-include
|
|
||||||
done
|
|
||||||
echo "network --nameserver=8.8.8.8 --hostname=localhost.localdomain" >> /tmp/network-include
|
|
||||||
|
|
||||||
# set keyboard
|
|
||||||
if [ -z $keyboard ]; then
|
|
||||||
keyboard="keyboard --vckeymap=us --xlayouts='us'"
|
|
||||||
fi
|
|
||||||
echo "keyboard --vckeymap=$keyboard --xlayouts='$keyboard'" > /tmp/keyboard-include
|
|
||||||
|
|
||||||
# set timezone
|
|
||||||
if [ -z $timezone ]; then
|
|
||||||
timezone="--utc UTC"
|
|
||||||
fi
|
|
||||||
echo "timezone $timezone" > /tmp/timezone-include
|
|
||||||
|
|
||||||
# set encrypted fs
|
|
||||||
if [ -z $fspassword ]; then
|
|
||||||
echo "logvol / --fstype xfs --name=lv_root --vgname=VolGroup --percent=100" > /tmp/rootfs-include
|
|
||||||
else
|
|
||||||
echo "logvol / --fstype xfs --name=lv_root --vgname=VolGroup --percent=100 --encrypted --passphrase=$fspassword" > /tmp/rootfs-include
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
%end
|
|
||||||
|
|
||||||
#
|
|
||||||
# Selected packages
|
|
||||||
#
|
|
||||||
%packages
|
|
||||||
@nethserver-iso
|
|
||||||
@core
|
|
||||||
%end
|
|
||||||
|
|
||||||
repo --name=nethserver --baseurl=file:///run/install/repo/extras
|
|
||||||
repo --name=libreschool --baseurl=file:///run/install/repo/libreschool
|
|
||||||
|
|
||||||
# Install OS instead of upgrade
|
|
||||||
install
|
|
||||||
# Network information
|
|
||||||
%include /tmp/network-include
|
|
||||||
firewall --disable
|
|
||||||
# Root password
|
|
||||||
rootpw --plaintext LibreSchool,1234
|
|
||||||
# System keyboard
|
|
||||||
%include /tmp/keyboard-include
|
|
||||||
# System language
|
|
||||||
lang en_US
|
|
||||||
# SELinux configuration
|
|
||||||
selinux --permissive
|
|
||||||
# Do not configure the X Window System
|
|
||||||
skipx
|
|
||||||
# Installation logging level
|
|
||||||
logging --level=debug
|
|
||||||
# System timezone
|
|
||||||
%include /tmp/timezone-include
|
|
||||||
# System bootloader configuration
|
|
||||||
%include /tmp/bootloader-include
|
|
||||||
# Clear the Master Boot Record
|
|
||||||
zerombr
|
|
||||||
# Partition clearing information
|
|
||||||
clearpart --all
|
|
||||||
reqpart --add-boot
|
|
||||||
# Disk partitioning information
|
|
||||||
%include /tmp/part-include
|
|
||||||
# LVM
|
|
||||||
volgroup VolGroup pv.1
|
|
||||||
logvol swap --fstype swap --name=lv_swap --vgname=VolGroup --recommended --maxsize=6000
|
|
||||||
%include /tmp/rootfs-include
|
|
||||||
# Reboot and eject CD
|
|
||||||
reboot --eject
|
|
||||||
|
|
||||||
|
|
||||||
%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
|
|
||||||
echo 'Access the web interface at the following URLs:' >> /etc/issue
|
|
||||||
ip -o -4 addr | tr -s ' /' $'\t' | cut -f 4 | grep -vF 127.0.0.1 | xargs -I IP -- echo https://IP:980 >> /etc/issue
|
|
||||||
echo >> /etc/issue
|
|
||||||
fi
|
|
||||||
|
|
||||||
%end
|
|