Картман Posted August 17 Posted August 17 Hi everyone, I'm new to creating my own images and I'm learning this just because I'm interested in it. I am trying to build ubuntu 24.04 for my rpi3b using the build configuration for rpi4b. Now I'm trying to automate the process of the first launch (skip the selection of bash, zsh, creating a password for root, creating a regular user, etc.). In one of the topics, I found out that I can delete "rm -rf/root/.not_logged_in_yet" And the system will not ask for the initial setup, but to make all the necessary changes for me, I wrote a small function in customize-image.sh: SettingSystemFirtsRun() { #disable defaut script sudo rm -rf /root/.not_logged_in_yet #setting regul user echo "add user $_userName" sudo useradd -m -c -s /bin/bash "$_userName" "$_userName" -p "$_userPass" #change root pass echo 'change root passssss' echo "root:$_rootPass" | sudo chpasswd # Set hostname permanently echo "Setting hostname to $_Hostname" echo "$_Hostname" > /etc/hostname hostname -b "$_Hostname" # Update hosts file sed -i "s/127.0.1.1.*/127.0.1.1\t$_Hostname/g" /etc/hosts } But when the system starts, I still do not see the directory of the user I am creating in /home, while the user himself is being created. The most important thing is that I really want to implement user creation at the assembly stage, although I am less and less convinced that this is even possible... I do not rule out that there are more concise ways to solve this problem, so I will be glad of any advice, good luck to all. P.S. I read the documentation, but I couldn't find a solution there. 0 Quote
Solution laibsch Posted August 17 Solution Posted August 17 I don't know this topic very well, either. But here is a link to get you started. https://docs.armbian.com/User-Guide_Autoconfig/ 0 Quote
Картман Posted August 18 Author Posted August 18 Цитата I don't know this topic very well, either. But here is a link to get you started. https://docs.armbian.com/User-Guide_Autoconfig/ That's exactly what I did. I wrote a replacement for the .not_logged_in_yet file in my customize-image.sh with pre-set parameters, just like I create /root/provisioning.sh. I was just wondering if there were any other ways to do this. 0 Quote
Stefal Posted 1 hour ago Posted 1 hour ago (edited) Did you try to build the image with compile.sh and this following setting? INCLUDE_HOME_DIR=yes See https://docs.armbian.com/Developer-Guide_Build-Switches/#advanced Edited 1 hour ago by Stefal 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.