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

flatcar-install not working on some distros ? #588

Closed
SR-G opened this issue Dec 31, 2021 · 5 comments
Closed

flatcar-install not working on some distros ? #588

SR-G opened this issue Dec 31, 2021 · 5 comments
Labels
kind/bug Something isn't working

Comments

@SR-G
Copy link

SR-G commented Dec 31, 2021

Description

I would like to try flatcar-linux, but i'm unable to have the "flatcar-install" script working. Whatever i do, there are some freezes (or errors) on archlinux.

Impact

Unable to install ISO of flatcar-linux

Environment and steps to reproduce

  1. Set-up: Start from an up-to-date archlinux system, with all prerequesites in place + a USB key plugged as /dev/sdaroot) ""
  2. Task: Launch "flatcar-install"
  3. Action(s): either
  • launch as root "./flatcar-install -C stable -i ./ignition.yaml -d /dev/sda -v"
  • either launch as root "./flatcar-install -f ./flatcar_production_iso_image.iso -i ./ignition.yaml -d /dev/sda"
  1. Error: there are multiple freezes at multipe steps. First one is the "read -rt 7200" being stuck and then failing. Or (one removed) the blkid -t LABEL=OEM -devices /dev/sda /dev/sda... command also being frozen (whereas the partition are there and visible with gparted or whatever), either not returning anything on archlinux (when launched manually).
    Also when executing the script without any modifications, got a lot of "Failed to reread partitions on [...]".

Also the "wipefs" trapped seems really a bad idea (it takes a lot of time and is not interruptible + does not allow to see (once finished) in which state the filesystems are)

Expected behavior

Script should work flawlessly.

Additional information

The best would be to have a small set of commands to be executed in order to install everything (current script seems, at least on some distros, rather fragile and maybe too complex).
Is this available anywhere ?
Thanks in advance !

@SR-G SR-G added the kind/bug Something isn't working label Dec 31, 2021
@SR-G
Copy link
Author

SR-G commented Dec 31, 2021

For reference - in the end i gave up trying to use this script, and i just extracted what is really needed (which is pretty straightforward but not easy to read in the script)

  1. Download the image
  2. just issue a regular "dd" command without anything special on the target device
  3. In my case, mount the /dev/sda6 partition somewhere (it's a blank partition) and copy there the config.ign file (which is a JSON transformation of the config.yaml, by the way).
    When doing these steps manually (outside the script) on my system, i had 0 issues / 0 freezes.

@pothos
Copy link
Member

pothos commented Jan 3, 2022

The first command looks good if you ran it as root, the second looks strange because you use the ISO image instead of the regular .bin image, I don't expect this to work, especially when trying to embed an Ignition file.

Also note: Previous problems came from the device being in use by LVM or similar. Did you check the lsblk output before?
(There is a -s flag which finds the smallest free device and skips those that are in use.)

@pothos
Copy link
Member

pothos commented Jan 3, 2022

just issue a regular "dd" command without anything special on the target device

Was this the .bin image or the ISO image?

@SR-G
Copy link
Author

SR-G commented Jan 3, 2022

Additional informations :

  • I haven't used the "-s" command line parameter, anyway i just have only one sd* device (desktop with one NVME (/dev/nvme*) for the system and only one USB key under /dev/sda)
  • I tried second command as first was not working, maybe my bad for the .iso
  • When i issued the "dd" command, it was by doing the exact same things than inside the script : i copy'n'pasted everything in a notepad, over-simplified it (just to understand / retrieve the really needed steps - not a lot of things in the end, but that was not obvious in the first place) and have hence reused the same kind of variables (with the URL like release.flatcar-linux.net/.../...image.bin) > so definitely usage of the .bin file
  • I'm not using LVM on this server in any way are / were straightforward (system partitions + dev/sda, nothing special).

@pothos
Copy link
Member

pothos commented Sep 8, 2023

I think the issue could be related to a bash regression and we found a workaround in flatcar/init#97
If you still experience an issue, please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants