Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Automation of the first launch Armbian

Featured Replies

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.

Solved by laibsch

  • Author
Цитата

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.

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.