Jump to content

Are These Commands Supported Inside `customize-image.sh`?


Recommended Posts

I'm trying to create a custom Armbian image based on the User Configurations documentation.

I can see that I can install additional packages by editing `userpatches/lib.config` and adding entries to the `PACKAGE_LIST_ADDITIONAL` variable, and I can work with custom files like scripts by placing them inside `userpatches/overlay` and accessing them in `/tmp/overlay` via `customize-image.sh`.

 

My question is, does `customize-image.sh` support the below commands given that it executes in a chroot environment:

NOTE: Some commands below require `sudo`, but because we're already in a chroot environment, I assume we can run them without `sudo`.

 

1. Creating directories inside `/`:

    mkdir -m 777 /myscripts

 

2. Copying files from `/tmp/overlay` to other directories:

    cp -rf /tmp/overlay/myscript.sh /mysrcipts/

 

3. Making script files executable by services:

    chmod a+x /myscripts/samplescript.sh

 

4. Starting and enabling system services:

    systemctl start systemd-networkd
    systemctl enable systemd-networkd

 

5. Updating repositories:

    apt-get -y update
    apt-get -y upgrade
    apt-get -y dist-upgrade

 

6. Copying custom service files to `/etc/systemd/system` and giving them proper permissions:

    cp -rf /tmp/overlay/myservice.service /etc/systemd/system/
    chmod 644 /etc/systemd/system/myservice.service

 

7. Installing and starting custom services:

    systemctl daemon-reload
    systemctl start myservice
    systemctl enable myservice

Link to comment
Share on other sites

2 minutes ago, FloatingSunfish said:

given that it executes in a chroot environment:


We build entire system and support packages in chroot environment. I don't see any reasons why this won't work. Did you at least tried it once? Make sure to check CLEAN_LEVEL to disable kernel rebuilding - everything else is cached. But when you are changing package structure, cache will be rebuild  since its tied to the package list.

 

 

Link to comment
Share on other sites

On 10/5/2020 at 3:06 PM, Igor said:

I don't see any reasons why this won't work.

 

That's good to hear. :)

 

On 10/5/2020 at 3:06 PM, Igor said:

Did you at least tried it once?

 

Not yet, as the build process reportedly takes a few hours and I don't want to make such costly moves without first knowing as much as I can about them.

 

On 10/5/2020 at 3:06 PM, Igor said:

Make sure to check CLEAN_LEVEL to disable kernel rebuilding - everything else is cached.

 

Do you mean something like this?

 

    sudo ./compile.sh CLEAN_LEVEL="debs"

 

Based on what I understand from the docs, the default value of `CLEAN_LEVEL` is "make,debs", and it's the "make" value that triggers kernel rebuilds.
Will the above disable kernel rebuilding?

 

Also, can I get some Likes or something to remove this "Validating" status so I can reply to this thread faster?
Waiting 24 hours before being able to reply is quite limiting and waiting 7 days for the Validating status to go away feels too long.

 

Lastly, I can't seem to edit my Avatar/Profile Pic.
Has it been disabled or something?

Edited by FloatingSunfish
Link to comment
Share on other sites

Just now, FloatingSunfish said:

Do you mean something like this?


Full caching is when CLEAN_LEVEL is blank.

 

1 minute ago, FloatingSunfish said:

Waiting 24 hours before being able to reply is quite limiting and waiting 7 days for the Validating status to go away feels too long.

 

This is not a professional support channel. Its a forum and this limit is that you think about before getting to excited asking for questions all over this place.  Pick a way at least to cover your part of support costs if you don't support R&D. https://forum.armbian.com/subscriptions/ If you choose perk for 500 EUR per month, then you can expect someone will be here all the time and will reply you within lets say one hour. If you choose less, you will become unrestricted user at once but you will still need to wait ... if you choose to give nothing back, where is the source of the rights to complain?

And this way we also get rid of those few % of the spam that penetrate automatic defence.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines