li ABB Posted March 27 Posted March 27 ย I am a developer from China and am not very familiar with English, so the following content is translated through Google Translate. When I successfully flash the image file of the built system onto the development board, the system seems to delete the directory under /home upon the first boot (from my observation). The build command being used ๏ผ./compile.sh build BOARD=firefly-rk3399 BRANCH=current BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=focalย This is an excerpt from customize-image.sh. Main() { case $RELEASE in stretch) # your code here # InstallOpenMediaVault # uncomment to get an OMV 4 image ;; buster) # your code here ;; bullseye) # your code here ;; bionic) # your code here ;; focal) # your code here echo "12345678" cjia_xxx ;; esac } # Main cjia_xxx() { rm /root/.not_logged_in_yet username=cjia pass=cjia # Check if user already exists. grep -q "$username" /etc/passwd if [ $? -eq $SUCCESS ] then echo "User $username does already exist." echo "please chose another username." exit $E_USEREXISTS fi #Preerequisite for mkpasswd : whois useradd -d /home/"$username" -m -g users -s /bin/bash "$username" #Allow no one else to access the home directory of the user chmod 750 /home/"$username" echo "$username":"$pass"|chpasswd echo "the account is setup" PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQsdfsdfsfsdfa6r2jUg5Wmnk7m97BccU+itsqEUe0IOUKslOdHlGQcos9APLEZk1jec/a/7eGCcCVfTNznW8Wskg+o/nyZDBCeQL7TMs5L2TlBoJpOudo42bxEp0lqTe8nS/cKPv3EZT0mMdFh3JbSqmF0eou6rbui0EjInzh9+CqB/fsuErunJ700N+uZ0l9dJ7Fofj1Ws1rptk0Ezer8YmIaDfvm4mFY7pQTHIqphqZ0IhBRXrBbL5XFv53cevvdfpkLA6y4LplWnIysdfsdfsdfsdeqG+r1licfbQYYqpACr8jFuv7T6Q2BaMfDF5AKZ8UeuIe66lFX+5MpD25WM+LamlEnBmh67d1SYOadSGBXC5RSs5Vp9hX1Nff2tfVN+kyvsfPe/v0D/ScJdqKCCR+w3SResv/aFZPW524tI32ehU1q7G2XYqdayxbA5QLjIxwo+NJn6Bc=" CJIA_HOME="/home/cjia" mkdir -p $CJIA_HOME/.ssh echo "$PUBLIC_KEY" >> $CJIA_HOME/.ssh/known_hosts chown cjia:cjia $CJIA_HOME/.ssh/known_hosts chmod 600 $CJIA_HOME/.ssh/known_hosts cat $CJIA_HOME/.ssh/known_hosts cd /home/cjia ls -al pwd su cjia -c "pwd" } Corresponding log output [๐ณ|๐จ] the account is setup [๐ณ|๐จ] chown: invalid group: โcjia:cjiaโ [๐ณ|๐จ] ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQsdfsdfsdfsdphekfmCKihCw5UKzXPhdeMxAsa6r2jUg5Wmnk7m97BccU+itsqEUe0IOUKslOdHlGQcos9APLEZk1jec/a/7eGCcCVfTNznW8Wskg+o/nyZDBCeQL7TMs5L2TlBoJpOudo42bxEp0lqTe8nS/cKPv3EZT0mMsdfsdfsdfsdEjInzh9+CqB/fsuErunJ700N+uZ0l9dJ7Fofj1Ws1rptk0Ezer8YmIaDfvm4mFY7pQTHIqphqZ0IhBRXrBbL5XFv53cevvdfpkLA6y4LplWnIyE5lqESVyp9m5Vj+rYMHdGTiIr2il2aN+xKcAeqG+r1licfbQYYqpACr8jFuv7T6Q2BaMfDF5AKZ8UeuIe66lFX+5MpD25WM+LamlEnBmh67d1SYOadSGBXC5RSs5Vp9hX1Nff2tfVN+kyvsfPe/v0D/ScJdqKCCR+w3SResv/sdfsdfsdfsdyxbA5QLjIxwo+NJn6Bc= cjia@DESKTOP-T9MJO61 [๐ณ|๐จ] total 12 [๐ณ|๐จ] drwxr-x--- 3 cjia users 120 Mar 26 12:41 . [๐ณ|๐จ] drwxr-xr-x 3 root root 60 Mar 26 12:41 .. [๐ณ|๐จ] -rw-r--r-- 1 cjia users 220 Feb 25 2020 .bash_logout [๐ณ|๐จ] -rw-r--r-- 1 cjia users 3771 Mar 26 12:28 .bashrc [๐ณ|๐จ] -rw-r--r-- 1 cjia users 807 Feb 25 2020 .profile [๐ณ|๐จ] drwxrwxr-x 2 root root 60 Mar 26 12:41 .ssh [๐ณ|๐จ] /home/cjia [๐ณ|๐จ] /home/cjia ย When logging in for the first time 0 Quote
Igor Posted April 4 Posted April 4 On 3/27/2024 at 2:32 AM, li ABB said: The build command being used ย Try adding INCLUDE_HOME_DIR="yes" 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.