Creating a current armbian-Image with network-fix
#11
Hi,

I have no problem modifying the sun50i-a64-sopine-baseboard.dtb file and the fix script by @Dippywood also works like a charm!

However, I wanted to execute the fix script from the rc.local script during boot, as @Dippywood suggests. This does not work for me.

I placed the script (called it clusterboard_dtb_fix.sh, with execution bit set) in /usr/local/bin and added the line "/usr/local/bin/clusterboard_dtb_fix.sh" to rc.local. (I also tried "sudo /usr/local/bin/clusterboard_dtb_fix.sh" in rc.local). Then I made sure that it worked, by executing the rc.local script when I was logged in on the module. No problem, the rc.local script, and thus fix script, is working when manually executed.

Then I tried to look in the log (using journalctl -b) after a reboot and here I see “Nov 10 21:23:30 pine64so rc.local[967]: Fix already in place” so the script is executed during boot! (But not after an apt-get upgrade :-()

My best guess is that calling the script from rc.local is too late in the boot process, thus it is not working.

Has anybody successfully added a call to rc.local that actually works on boot?

Well, I could just remember to execute the fix script after each apt-get upgrade, but it would be so much nicer if it was applied automatic during boot of the module.


Kind regards,

Anders.
  Reply
#12
(11-10-2020, 02:41 PM)sejersbol Wrote: Hi,

I have no problem modifying the sun50i-a64-sopine-baseboard.dtb file and the fix script by @Dippywood also works like a charm!

However, I wanted to execute the fix script from the rc.local script during boot, as @Dippywood suggests. This does not work for me.

I placed the script (called it clusterboard_dtb_fix.sh, with execution bit set) in /usr/local/bin and added the line "/usr/local/bin/clusterboard_dtb_fix.sh" to rc.local. (I also tried "sudo /usr/local/bin/clusterboard_dtb_fix.sh" in rc.local). Then I made sure that it worked, by executing the rc.local script when I was logged in on the module. No problem, the rc.local script, and thus fix script, is working when manually executed.

Then I tried to look in the log (using journalctl -b) after a reboot and here I see “Nov 10 21:23:30 pine64so rc.local[967]: Fix already in place” so the script is executed during boot! (But not after an apt-get upgrade :-()

My best guess is that calling the script from rc.local is too late in the boot process, thus it is not working.

Has anybody successfully added a call to rc.local that actually works on boot?

Well, I could just remember to execute the fix script after each apt-get upgrade, but it would be so much nicer if it was applied automatic during boot of the module.


Kind regards,

Anders.


Instead of calling it at boot, it's better to call it as a hook after apt runs. That way it runs the script post upgrade and before it'd be loaded on next boot. 

I added a file in /etc/apt/apt.conf.d/100update with the contents of:



Code:
DPkg::Post-Invoke {"/usr/local/bin/fix-network-dtb.sh";};
  Reply
#13
(01-06-2021, 09:49 PM)aww Wrote:
(11-10-2020, 02:41 PM)sejersbol Wrote: Hi,

I have no problem modifying the sun50i-a64-sopine-baseboard.dtb file and the fix script by @Dippywood also works like a charm!

However, I wanted to execute the fix script from the rc.local script during boot, as @Dippywood suggests. This does not work for me.

I placed the script (called it clusterboard_dtb_fix.sh, with execution bit set) in /usr/local/bin and added the line "/usr/local/bin/clusterboard_dtb_fix.sh" to rc.local. (I also tried "sudo /usr/local/bin/clusterboard_dtb_fix.sh" in rc.local). Then I made sure that it worked, by executing the rc.local script when I was logged in on the module. No problem, the rc.local script, and thus fix script, is working when manually executed.

Then I tried to look in the log (using journalctl -b) after a reboot and here I see “Nov 10 21:23:30 pine64so rc.local[967]: Fix already in place” so the script is executed during boot! (But not after an apt-get upgrade :-()

My best guess is that calling the script from rc.local is too late in the boot process, thus it is not working.

Has anybody successfully added a call to rc.local that actually works on boot?

Well, I could just remember to execute the fix script after each apt-get upgrade, but it would be so much nicer if it was applied automatic during boot of the module.


Kind regards,

Anders.


Instead of calling it at boot, it's better to call it as a hook after apt runs. That way it runs the script post upgrade and before it'd be loaded on next boot. 

I added a file in /etc/apt/apt.conf.d/100update with the contents of:

Code:
DPkg::Post-Invoke {"/usr/local/bin/fix-network-dtb.sh";};

Since it was late in the process, the rc.local approach required an extra reboot (as mentioned in the original post) - the change to apt.conf.d is a smarter approach. rc.local is old-school - but, there again, so am I :-)

In any case, the indications are that this should be moot now - so time for me to test the latest download...
  Reply
#14
Just confirmed this working with the latest Armbian Bullseye (Debian) release.
  Reply
#15
is that update dtb thingy still needed if install the boards with the latest kernel?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Sad Version/Date of last armbian build that came with network patches? Bazmundi 0 217 12-07-2023, 03:23 PM
Last Post: Bazmundi
  Clusterboard not getting IP address after network fix Norlark 14 12,264 08-30-2021, 05:00 PM
Last Post: poVoq
  ArchLinux Network Booting xblack86 2 3,818 02-25-2021, 08:42 AM
Last Post: xblack86
  Clusterboard Armbian aww 17 22,861 07-01-2020, 02:40 PM
Last Post: wayward83
  Network problems (actually bad power supply) Unkn0wn 14 17,244 12-01-2019, 10:02 AM
Last Post: venix1
  Armbian Bionic 4.19.y PigLover 1 2,593 02-02-2019, 02:30 PM
Last Post: mdmbc

Forum Jump:


Users browsing this thread: 1 Guest(s)