rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.45k stars 657 forks source link

Failed to ros install when booting by kexec #2625

Open niusmallnan opened 5 years ago

niusmallnan commented 5 years ago

I installed with the following commands on a bare metal server:

apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes --show-progress kexec-tools aria2
aria2c https://releases.rancher.com/os/v1.5.0/rancheros.iso

mkdir -p /mnt/rancheros
mount -t iso9660 rancheros.iso /mnt/rancheros
cd /mnt/rancheros
kexec --initrd ./boot/initrd-v1.5.0 --command-line="rancher.password=<strong-password>" ./boot/vmlinuz-4.14.85-rancher

reboot

sudo ros install -c cloud-config.yml -d /dev/sda -t gptsyslinux

As I was mounted on v1.5.0 ros tries to install that.

[rancher@rancher ~]$ sudo ros install -c cloud-config.yml -d /dev/sda -t gptsyslinux
Installing from rancher/os:v1.5.0
Continue [y/N]: y
INFO[0004] start !isoinstallerloaded                    
ERRO[0004] Failed to get boot iso: stat /dev/sr0: no such file or directory 
There is no boot iso drive, terminate the task
FATA[0004] Failed to run install                         err="stat /dev/sr0: no such file or directory"

sudo mkdir /dev/sr0 workaround can work.

Originally posted by @Sebisnow in https://github.com/rancher/os/issues/2241#issuecomment-451356186

niusmallnan commented 5 years ago

You can try this command line:

--command-line="rancher.password=<strong-password> rancher.state.autoformat=[/dev/sda] rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait"

This way you don't have to run ros install again.

But what you mentioned is really a problem, we have not tested it by using kexec, we need to solve it.