Skip to content

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

Merged
pothos merged 1 commit intoflatcar-masterfrom
kai/coreos-detection
May 22, 2020
Merged

Prefer /boot/coreos only if /boot/coreos/vmlinux-* exists#5
pothos merged 1 commit intoflatcar-masterfrom
kai/coreos-detection

Conversation

@pothos
Copy link
Copy Markdown
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/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-archive/coreos-overlay that referenced this pull request May 22, 2020
@pothos pothos requested a review from a team May 22, 2020 12:21
@pothos pothos marked this pull request as ready for review May 22, 2020 12:21
Copy link
Copy Markdown

@margamanterola margamanterola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pothos pothos merged commit 13d39ab into flatcar-master May 22, 2020
@pothos pothos deleted the kai/coreos-detection branch May 22, 2020 12:59
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request May 22, 2020
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request May 22, 2020
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request May 22, 2020
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request May 22, 2020
pothos added a commit to flatcar-archive/coreos-overlay that referenced this pull request 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

Development

Successfully merging this pull request may close these issues.

2 participants