mirror of
https://github.com/rancher/os.git
synced 2025-08-02 23:42:31 +00:00
29 lines
1.3 KiB
Bash
29 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
ROS_VERSION="v0.9.2-symbiote"
|
|
URL_BASE="https://github.com/SvenDowideit/os/releases/download/${ROS_VERSION}"
|
|
VMLINUX="vmlinuz-4.9.21-rancher"
|
|
INITRD="initrd
|
|
|
|
cd /tmp
|
|
echo "downloading ${URL_BASE}/${VMLINUX}" > /dev/kmsg
|
|
curl -O -L "${URL_BASE}/${VMLINUX}"
|
|
echo "downloading ${URL_BASE}/${INITRD}" > /dev/kmsg
|
|
curl -O -L "${URL_BASE}/${INITRD}"
|
|
|
|
if [ "$(ros config get rancher.environment.installer)" == "true" ] && ros --version &>/dev/null; then
|
|
ros install -f -c cloud-config.yml -d /dev/vda -p /dev/vda1 \
|
|
--statedir ros -t noformat \
|
|
--append "rancher.state.directory=ros rancher.debug=true printk.devkmsg=on notsc clocksource=kvm-clock rancher.network.interfaces.eth0.ipv4ll rancher.cloud_init.datasources=[digitalocean] rancher.autologin=tty1 rancher.autologin=ttyS0"
|
|
exit 0
|
|
fi
|
|
|
|
echo "installing kexec" > /dev/kmsg
|
|
#apt-get update && apt-get install -y kexec-tools ipcalc
|
|
#dnf update
|
|
dnf install -y kexec-tools ipcalc
|
|
|
|
echo "running kexec" > /dev/kmsg
|
|
|
|
kexec --initrd=${INITRD} -l ${VMLINUX} -f --command-line="rancher.debug=true printk.devkmsg=on notsc clocksource=kvm-clock rancher.network.interfaces.eth0.ipv4ll rancher.cloud_init.datasources=[digitalocean] rancher.autologin=tty1 rancher.autologin=ttyS0 rancher.environment.installer=true"
|