run script on boot

344 views
Skip to first unread message

jmicha...@gmail.com

unread,
Apr 3, 2021, 8:54:19 PM4/3/21
to Android-x86

I run android-x86_64-9.0-r2 as Live with persistence file.  Where can I put a script I want run at boot?

Chih-Wei Huang

unread,
Apr 4, 2021, 1:09:19 AM4/4/21
to Android-x86
jmicha...@gmail.com <jmicha...@gmail.com> 於 2021年4月4日 週日 上午8:54寫道:
> I run android-x86_64-9.0-r2 as Live with persistence file. Where can I put a script I want run at boot?

You may modify /etc/init.sh directly.
Alternatively, you may add a file /vendor/etc/init.sh.
It will be sourced by /etc/init.sh.

You have to install the system as read-write
to add/modify the files.

--
Chih-Wei
Android-x86 project
http://www.android-x86.org

jmicha...@gmail.com

unread,
Apr 4, 2021, 6:53:49 PM4/4/21
to Android-x86
     Is there no file in the /data tree that is run on boot?  (I've seen references to "/data/local/userinit.sh" and "/data/init.sh".)

     I haven't actually "installed" android-x86.  I am running the Live version, with a persistence file.
Is there no way other than modifying the /system tree?

     Maybe I asked the wrong question.  My real problem is that android-x86 does not detect / connect to my ethernet connection on my new machine.  (It worked fine on my old machine.)  I can get connected if I run:
  • rmmod r8169
  • modprobe realtek
  • modprobe r8169
I could not find a way to achieve this using kernel command line parameters.
 

Chih-Wei Huang

unread,
Apr 4, 2021, 7:52:22 PM4/4/21
to Android-x86
jmicha...@gmail.com <jmicha...@gmail.com> 於 2021年4月5日 週一 上午6:53寫道:
>
> Maybe I asked the wrong question. My real problem is that android-x86 does not detect / connect to my ethernet connection on my new machine. (It worked fine on my old machine.) I can get connected if I run:
>
> rmmod r8169
> modprobe realtek
> modprobe r8169
>
> I could not find a way to achieve this using kernel command line parameters.

https://groups.google.com/g/android-x86/c/HznhzwaMAXk/m/WGNwekFSBwAJ

It should have been fixed in the current kernel tree.
I'm just too busy to make a new release...

jmicha...@gmail.com

unread,
Apr 5, 2021, 1:00:49 AM4/5/21
to Android-x86
     Thank you.  Adding "EXTMOD=realtek VIRT_WIFI=0" to the kernel command line results in ethernet being connected immediately on boot.
Reply all
Reply to author
Forward
0 new messages