Commit 9245b18f authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

Centos

See merge request tomo/rapidspace-autoinstall-os!1
parents 0982beb4 82abfc40
#!/bin/bash #!/bin/bash
# To install CentOS apache must be installed and server CentOS base
# root@raspberrypi:/ apt install apache2 -y
# root@raspberrypi:/ systemctl start httpd
# root@raspberrypi:/var/www/html# cp -a /root/rapidspace-autoinstall-os/centos-installer/ .
# root@raspberrypi:/var/www/html# chown pi: -R centos-installer/
# root@raspberrypi:/var/www/html# wget http://192.168.46.2/centos-installer/media.repo # just check
set -e set -e
SCRIPT_DIR=$(realpath `dirname "$0"`) SCRIPT_DIR=$(realpath `dirname "$0"`)
...@@ -8,6 +15,7 @@ SCRIPT_DIR=$(realpath `dirname "$0"`) ...@@ -8,6 +15,7 @@ SCRIPT_DIR=$(realpath `dirname "$0"`)
download_debian_10_if_needed download_debian_10_if_needed
download_sysrescuecd_if_needed download_sysrescuecd_if_needed
download_centos_8_if_needed
#UPDATE THOSE VARIABLES DEPENDING ON YOUR SITE #UPDATE THOSE VARIABLES DEPENDING ON YOUR SITE
MY_IF_NAME=eth0 MY_IF_NAME=eth0
...@@ -40,10 +48,14 @@ cat <<EOF ...@@ -40,10 +48,14 @@ cat <<EOF
else unset timeout else unset timeout
fi fi
menuentry 'Install Debian' { menuentry 'Install Debian 10' {
linux /debian-installer/amd64/linux vga=788 url=tftp://\$pxe_default_server/preseed_kuklen.cfg language=C country=SE keymap=us hostname=\$hostname domain= --- mitigations=off $common linux /debian-installer/amd64/linux vga=788 url=tftp://\$pxe_default_server/preseed_kuklen.cfg language=C country=SE keymap=us hostname=\$hostname domain= --- mitigations=off $common
initrd /debian-installer/amd64/initrd.gz initrd /debian-installer/amd64/initrd.gz
} }
menuentry 'Install CentOS' {
linux /centos-installer/images/pxeboot/vmlinuz checksum ip=dhcp inst.text inst.repo=http://\$pxe_default_server/centos-installer/ $common
initrd /centos-installer/images/pxeboot/initrd.img
}
menuentry 'SystemRescueCd' { menuentry 'SystemRescueCd' {
linux /sysresccd/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archiso_http_srv=http://\$pxe_default_server:69/sysresccd/ checksum ip=dhcp $common linux /sysresccd/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archiso_http_srv=http://\$pxe_default_server:69/sysresccd/ checksum ip=dhcp $common
initrd /sysresccd/sysresccd/boot/intel_ucode.img /sysresccd/sysresccd/boot/amd_ucode.img /sysresccd/sysresccd/boot/x86_64/sysresccd.img initrd /sysresccd/sysresccd/boot/intel_ucode.img /sysresccd/sysresccd/boot/amd_ucode.img /sysresccd/sysresccd/boot/x86_64/sysresccd.img
......
...@@ -16,3 +16,11 @@ then ...@@ -16,3 +16,11 @@ then
mount -o loop systemrescuecd-amd64-6.1.1.iso sysresccd mount -o loop systemrescuecd-amd64-6.1.1.iso sysresccd
fi fi
} }
download_centos_8_if_needed() {
if [ ! -f version.info ]
then
wget http://mirrors.neterra.net/centos/8.2.2004/isos/x86_64/CentOS-8.2.2004-x86_64-minimal.iso
mkdir -p centos-installer
mount -o loop CentOS-8.2.2004-x86_64-minimal.iso centos-installer
fi
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment