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

Failure to install to /dev/disk/by-id/<id> #1879

Closed
clanktron opened this issue Oct 4, 2023 · 3 comments · Fixed by kairos-io/kairos-agent#552 or #2877
Closed

Failure to install to /dev/disk/by-id/<id> #1879

clanktron opened this issue Oct 4, 2023 · 3 comments · Fixed by kairos-io/kairos-agent#552 or #2877
Labels
enhancement New feature or request

Comments

@clanktron
Copy link

clanktron commented Oct 4, 2023

Kairos fails to install to disk id (aka /dev/disk/by-id/). I'm not sure if this is in the category of "not yet supported" or if this is a true bug.

Either way, when specifying to a disk id with the following or by setting such with the --device flag...

cat config.yaml
# #cloud-config
# hostname: nas-{{ trunc 4 .MachineID }}
# users:
# - name: clayton
#   groups: [ docker ]
#   shell: /usr/bin/fish
#   ssh_authorized_keys:
#     - github:clanktron
# 
# ssh_pwauth: false
# timezone: America/Los_Angeles
# 
# # kairos debug logging
# debug: true
# 
# install:
#   device: /dev/disk/by-id/ata-walram_60G_SCRW210906G0093
#   reboot: false
#   poweroff: true
#   auto: true
kairos-agent m config.yaml

The following errors occur:
(apologies that these are screenshots and not raw text but it was going to be a hassle to grab the stdout/stderr of the install to the physical machine)
partition-error-1
partition-error-2

Looking at /dev/disk/by-id after the failure, it seems that the first partition is successfully created but that it has a different auto generated name than what kairos is attempting to find (see below).

successful-first-partition

I don't fiddle with udev rules a ton so I'm not sure how this partition auto naming scheme might vary from distro to distro if at all. For context this installer is running a lightly customized quay.io/kairos/core-ubuntu-22-lts:v2.4.0 image (just a few extra packages installed).

@clanktron clanktron added the bug Something isn't working label Oct 4, 2023
@jimmykarily jimmykarily added enhancement New feature or request and removed bug Something isn't working labels Oct 9, 2023
@jimmykarily
Copy link
Contributor

This is not supported. I changed the label from "bug" to "enhancement" . @clanktron can you tell us a little more about the use case? Is there a workaround? We are trying to prioritize this properly.

@clanktron
Copy link
Author

I have servers that have multiple disks attached to them and would like to auto-install kairos on a given disk reliably. /dev/sdx addressing can change from boot to boot so something like /dev/disk/by-id or /dev/disk/by-label is certainly preferred.

As far as workarounds go I've just had to do manual installs to ensure it targets the right disk. If there's other approaches to this that I'm not aware of I'm open to such as well.

@jimmykarily
Copy link
Contributor

This is another use case of custom partitioning which is already discussed here: #391 . I will add this use case on that issue. I think a "hook" or a custom script that does the partitioning would solve this too, no? (see the other issue for details)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
3 participants