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

homectl create user fails (Transport endpoint is not conected) #151

Open
Ginner opened this issue Dec 19, 2021 · 19 comments
Open

homectl create user fails (Transport endpoint is not conected) #151

Ginner opened this issue Dec 19, 2021 · 19 comments

Comments

@Ginner
Copy link

Ginner commented Dec 19, 2021

I'm installing with the following relevant (imo) options:

LVM="true"
SYSTEMD_HOMED="true"
SYSTEMD_HOMED_STORAGE="luks"
BOOTLOADER="systemd"

Unfortunately it fails upon homectl create user with Operation on home <user> failed: Transport endpoint is not connected and homectl activate <user> with Operation on home <user> failed: No home for user <user> known and lastly cp -a /home/ginner.home/. /mnt/home/ginner.home fails with No such file or directory.

I think maybe you alludes to this in the code with:

    ### something missing, inside alis this not works, after install the user is in state infixated
    ### after install and reboot this commands work

I tried rebooting and running the commands manually, without luck.

Any help is very appreciated! Thank you for your excellent work on this 'script' :)

@picodotdev
Copy link
Owner

Relevant info to review alis commands with the provided configuration.

https://wiki.archlinux.org/title/Systemd-homed#LUKS_home_directory
https://gist.github.com/dbehnke/ad19ca8f1ccf80aebca5

@Ginner
Copy link
Author

Ginner commented Dec 19, 2021

Good info. Now I'm in no way strong in this, but at what point in the code, is the IMAGE_PATH being mounted? Should it be included in the homectl create with the --image-path as briefly described in the first link?

Does it have to be initiated through luks cryptsetup? Maybe in if [ "$SYSTEMD_HOMED_STORAGE" == "luks" ]? Sorry, I'm just spitballing, I hope I'm not adding too much noise...

@picodotdev
Copy link
Owner

I think the problem is that systemd-homed for the luks storage expects the user home directory to be stored in "inside an encrypted LUKS volume inside a loopback file or any removable media".

For create the luks loopback file maybe the gist is usefull and maybe in --image-path/IMAGE_PATH must be specified that loopback file, but not sure also.

@Ginner
Copy link
Author

Ginner commented Dec 19, 2021

Yeah, I think you're exactly right.

picodotdev added a commit that referenced this issue Dec 20, 2021
@picodotdev
Copy link
Owner

I think now should work as expected.

@Ginner
Copy link
Author

Ginner commented Dec 20, 2021

Wow, You're fast :)
I've tested it, but after the password prompt following homectl create <USER> --enforce-password-policy=no --timezone=<TZ> --language=<LANG> --storage=luks --image-path=/mnt/home/<USER>.home --fs-type=ext4 - G wheel,storage,optical it fails with Operation on home <USER> failed: Transport endpoint is not conected.

It seems to me, that /mnt/home/<USER>.home is not mounted.

picodotdev added a commit that referenced this issue Dec 20, 2021
@picodotdev
Copy link
Owner

picodotdev commented Dec 20, 2021

Another try to solve Transport endpoint is not conected. Some magic "sleep 5" inserted.

@Ginner
Copy link
Author

Ginner commented Dec 20, 2021

Just tested it, same output.

I see the sleep 5 being run and it waits, however, I don't see a partition/image/filesystem for /home/<USER> being mounted anywhere in the code, is that right?

@picodotdev
Copy link
Owner

picodotdev commented Dec 20, 2021

homectl create only creates user homed image not mounts it.

I will try again, I do my testing in VirtualBox. Are you trying in a virtual machine?

When fails, What is the output of this command for you? Is that service in good state?

systemctl status systemd-homed.service

@Ginner
Copy link
Author

Ginner commented Dec 20, 2021

No, I'm testing on physical hardware.

Yeah, systemctl status systemd-homed.service returns 'Active (running)'.

picodotdev added a commit that referenced this issue Dec 20, 2021
@picodotdev
Copy link
Owner

picodotdev commented Dec 20, 2021

Tested again, no problem in VirtualBox, using this config https://github.com/picodotdev/alis/blob/master/packer/alis-packer-efi-ext4-luks-lvm-systemd-systemdhomed.sh (only has defaults changes). But anyway I incremented the sleep time from 5 to 10.

Can you attach your full configuration file and describe your computer specs?

@picodotdev picodotdev reopened this Dec 21, 2021
@Ginner
Copy link
Author

Ginner commented Dec 21, 2021

Same result - Operation on home <USER> failed: Transport endpoint is not conected

Conf file:

alis.conf.txt

Computer specs:
ThinkPad X220i, Intel i5, 4 gb ram, ssd... Let me know if you need more than that :)

@picodotdev
Copy link
Owner

picodotdev commented Dec 21, 2021

Tested in VirtualBox with exact same configuration you provided. There was a error in alis in the shell change to zsh for root user when using systemd-homed that I fixed, but that is a step latter to your case. In any case the system after reboot worked fine.

virtualbox test

I have no clues, need anyone, that what is happening in your ThinkPad. Maybe you can attach a screenshot/photo or if you can do a test in VirtualBox or virtual machine.

@Ginner
Copy link
Author

Ginner commented Dec 21, 2021

Thank you for all the time you're putting into this! Hmm.. It sounds weird - Unfortunately I'm not able to test in a VM rn.

Heres a (rather shitty) picture of the error:
alis-fail

@picodotdev
Copy link
Owner

picodotdev commented Dec 21, 2021

Same error reproduced in VirtualBox with your photo hint!

I think the problem is the password length. Use one longer than test3 like archlinux. I think the password must have a length > 6, dont ask me why is this but maybe there is a policy for this in luks or homectl.

transport endpont

@Ginner
Copy link
Author

Ginner commented Dec 21, 2021

Hmm.. okay. Though, I don't think password length is the issue, the one I took a picture of was the first install with a short password. Previously I've been using long (+12 character) passwords - The testX ones were just for the sake of the photo.

What did you change to reproduce?

@picodotdev
Copy link
Owner

picodotdev commented Dec 21, 2021

I think use test3 instead archlinux as password for homectl and LUKS_PASSWORD, ROOT_PASSWORD, USER_PASSWORD was the only change that I did, the other case can be that I missed to type test3 or on repeat.

@picodotdev
Copy link
Owner

picodotdev commented Dec 22, 2021

I did one more test using test3 as password, you were right that was not the issue as my test finalized correctly. So, I really dont have clues what happened in the test that failed for me with the same error as you. Also, is strange that for me works and for you fails always in the same point with the same error.

The only thing that I change in this last working test to you configuration was the SWAP_SIZE from 4096 to 1024. But also may be is a false clue.

The only suggestion for you is that you use other configuration if you dont have any new clue.

@picodotdev picodotdev changed the title homectl create user - fails homectl create user falis (Operation on home <USER> failed: Transport endpoint is not conected) Dec 22, 2021
@picodotdev picodotdev changed the title homectl create user falis (Operation on home <USER> failed: Transport endpoint is not conected) homectl create user falis (Transport endpoint is not conected) Dec 22, 2021
@picodotdev picodotdev changed the title homectl create user falis (Transport endpoint is not conected) homectl create user fails (Transport endpoint is not conected) Dec 22, 2021
@Ginner
Copy link
Author

Ginner commented Dec 22, 2021

Yeah, I'm not sure I'll go with homed anyways. Thank you for all your work on this, and thank you for helping me! I'll let you know if I figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants