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

File not copying from build machine to image #62

Open
ManavAChauhan opened this issue Jun 20, 2024 · 9 comments
Open

File not copying from build machine to image #62

ManavAChauhan opened this issue Jun 20, 2024 · 9 comments

Comments

@ManavAChauhan
Copy link

Hi,

I want to copy file to the /home directory of image. I executed cp command in image.yaml but not working.
Please share if you have any document for copying file or guide me how to achieve this.

@RadxaYuntian
Copy link
Member

You need to learn debos usage. If your file is in an archive you can use unpack action. If you have some loose file in the rbuild directory you can use overlay action. There are examples of both actions in our source code.

@ManavAChauhan
Copy link
Author

Hi,
I can copy the file from my local machine to /etc/ directory. but if i try to copy file to the /home/radxa then it fails during compilation

@RadxaYuntian
Copy link
Member

RadxaYuntian commented Jun 21, 2024

Yes this is because the radxa account is only created on boot by our first-boot script.

You can mkdir -p /home/radxa && chown 1000:1000 /home/radxa to create the directory first before copying files to it. Or you can save your file to /etc/skel, so those files will be copied to the home directory whenever new account is created.

Be mindful about file permissions though, since those commands are run by root.

@ManavAChauhan
Copy link
Author

Hi,
I am able to copy files to the /home/radxa directory but if i change the username and password in before.txt then i am not be able to access the SSH console.

@RadxaYuntian
Copy link
Member

If you changed user name then you also need to change the home directory path.

SSH is disabled by default, and only enabled for headless first boot. You can remove the disable_service in before.txt.

@ManavAChauhan
Copy link
Author

I removed the disable_service ssh & disable_service ssh.socket from before.txt but still not be able to take ssh.

@RadxaYuntian
Copy link
Member

Oh I think probably because the host key was changed while ssh was running. You probably will need to remove that line as well.

@ManavAChauhan
Copy link
Author

ManavAChauhan commented Jun 24, 2024 via email

@RadxaYuntian
Copy link
Member

You can't add root user because it is there already, and unlocking root user is discouraged since you can use sudo -i to switch to it.

You can just chpasswd in your image building yaml if you have to use root account.

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

No branches or pull requests

2 participants