Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer /boot/coreos only if /boot/coreos/vmlinux-* exists #5

Merged
merged 1 commit into from May 22, 2020

Conversation

pothos
Copy link
Member

@pothos pothos commented May 22, 2020

In case a user or old software created the first_boot flag file under
/boot/coreos instead of /boot/flatcar, the update breaks because /boot/coreos
exists and is prefered ofer /boot/flatcar when the kernel is written.
Make updating more robust by checking if the kernel binaries exist which as least
allows the user to create /boot/coreos/first_boot without breaking the system.

How to use

See flatcar-linux/scripts#68

Testing done

Download the qemu image for arm64 from the linked PR above (because the amd64 did reuse the binary package):

$ wget https://storage.googleapis.com/flatcar-jenkins/developer/boards/arm64-usr/2345.3.1+dev-flatcar-master-449/flatcar_production_qemu_uefi_image.img.bz2
$ lbunzip2 flatcar_production_qemu_uefi_image.img.bz2
$ wget https://storage.googleapis.com/flatcar-jenkins/developer/boards/arm64-usr/2345.3.1+dev-flatcar-master-449/flatcar_production_qemu_uefi_efi_code.fd
$ wget https://storage.googleapis.com/flatcar-jenkins/developer/boards/arm64-usr/2345.3.1+dev-flatcar-master-449/flatcar_production_qemu_uefi_efi_vars.fd
$ wget https://storage.googleapis.com/flatcar-jenkins/developer/boards/arm64-usr/2345.3.1+dev-flatcar-master-449/flatcar_production_qemu_uefi.sh
$ chmod +x flatcar_production_qemu_uefi.sh
  1. Boot up the VM and enter via SSH
  2. sudo sh -c 'echo GROUP=alpha > /etc/flatcar/update.conf'
  3. mkdir /boot/coreos; touch /boot/coreos/first_boot
  4. cp /usr/share/flatcar/release /tmp; sudo mount --bind /tmp/release /usr/share/flatcar/release
  5. set FLATCAR_RELEASE_VERSION=0.0.0 in /usr/share/flatcar/release
  6. sudo systemctl restart update-engine
  7. update_engine_client -update
  8. ls /boot/coreos should not have a kernel

In case a user or old software created the first_boot flag file under
/boot/coreos instead of /boot/flatcar, the update breaks because /boot/coreos
exists and is prefered ofer /boot/flatcar when the kernel is written.
Make updating more robust by checking if the kernel binaries exist which as least
allows the user to create /boot/coreos/first_boot without breaking the system.
pothos added a commit to flatcar-linux/coreos-overlay that referenced this issue May 22, 2020
@pothos pothos requested a review from May 22, 2020
@pothos pothos marked this pull request as ready for review May 22, 2020
Copy link

@margamanterola margamanterola left a comment

LGTM

@pothos pothos merged commit 13d39ab into flatcar-master May 22, 2020
@pothos pothos deleted the kai/coreos-detection branch May 22, 2020
pothos added a commit to flatcar-linux/coreos-overlay that referenced this issue May 22, 2020
pothos added a commit to flatcar-linux/coreos-overlay that referenced this issue May 22, 2020
pothos added a commit to flatcar-linux/coreos-overlay that referenced this issue May 22, 2020
pothos added a commit to flatcar-linux/coreos-overlay that referenced this issue May 22, 2020
pothos added a commit to flatcar-linux/coreos-overlay that referenced this issue May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants