Compare commits
8 Commits
3f1fb4ac05
...
c90a1a4326
Author | SHA1 | Date | |
---|---|---|---|
c90a1a4326 | |||
d7e5ace890 | |||
aaf3f7d749 | |||
945bc916db | |||
3853b5c9f5 | |||
401d626904 | |||
ac18fd839b | |||
fd5c509170 |
26
.drone.yml
Normal file
@ -0,0 +1,26 @@
|
||||
# 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,3 +1,5 @@
|
||||
# libreschool-iso
|
||||
|
||||
[](https://drone.libreschool.org/paspo/libreschool-iso)
|
||||
|
||||
This tool automates the generation of LibreSchool iso
|
BIN
anaconda/usr/share/anaconda/pixmaps/rnotes/en/centos-artwork.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
anaconda/usr/share/anaconda/pixmaps/rnotes/en/centos-cloud.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
anaconda/usr/share/anaconda/pixmaps/rnotes/en/centos-core.png
Normal file
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 26 KiB |
BIN
anaconda/usr/share/anaconda/pixmaps/sidebar-bg.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
anaconda/usr/share/anaconda/pixmaps/sidebar-logo.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
anaconda/usr/share/anaconda/pixmaps/topbar-bg.png
Normal file
After Width: | Height: | Size: 36 KiB |
5
packages.list
Normal file
@ -0,0 +1,5 @@
|
||||
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
|
54
root/EFI/BOOT/grub.cfg
Normal file
@ -0,0 +1,54 @@
|
||||
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
|
||||
}
|
||||
}
|
112
root/isolinux/isolinux.cfg
Normal file
@ -0,0 +1,112 @@
|
||||
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
|
BIN
root/isolinux/splash.jpg
Normal file
After Width: | Height: | Size: 90 KiB |
148
root/ks/interactive
Executable file
@ -0,0 +1,148 @@
|
||||
#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
|
58
root/ks/manual
Executable file
@ -0,0 +1,58 @@
|
||||
#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
|
162
root/ks/unattended
Executable file
@ -0,0 +1,162 @@
|
||||
#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
|