avafinger / bananapi-zero-ubuntu-base-minimal

BananaPi M2 Zero - Ubuntu Focal Base Minimal Image (Experimental) - U-Boot 2017.09 / Kernel 4.18.y / Kernel 4.19.y / Kernel 4.20.y / Kernel 5.3.y / Kernel 5.6.y / Kernel 5.7.y / Kernel 5.11.y
88 stars 17 forks source link

Login prompt needs more than 1:30 min to display #33

Open meisterbasti opened 4 years ago

meisterbasti commented 4 years ago

As there are no private messages I want to ask a few questions.

1 .) Is there a way to auto-login the ubuntu user ?

2.) Is there a possibility to permanent deactivate eth0 ? I only need the wlan0 interface...

3.) Last question is while startup: Here I'm getting the message: "A start job is running for DHCP Client..."

Bildschirmfoto 2020-02-15 um 15 45 32

This makes the booting time very long as you can see it is counting up to 1m 38 sec. resulting in a "Failed to start" message

Bildschirmfoto 2020-02-15 um 15 43 49

Looking into systemctl gives me the info that it is Failed. Therefore I think it is not used. So is it possible to deactivate it so that the booting will go faster ?

Bildschirmfoto 2020-02-15 um 16 19 09

Thanks for your help.

avafinger commented 4 years ago

1 .) Is there a way to auto-login the ubuntu user ?

Yes, there is. Please look at these instructions here, you may need some twist: https://github.com/avafinger/nanopi-m4-ubuntu-base-minimal#libreelec-or-not-libreelec

2.) Is there a possibility to permanent deactivate eth0 ? I only need the wlan0 interface...

You can disable eth0 (which i have it working here) by doing this:

You can edit it while running the kernel or do a shutdown and edit the file in a linux box.

3.) Last question is while startup:

Here I'm getting the message: "A start job is running for DHCP Client..."

DHCP Client is trying to get a Dynamic IP from the AP or Router, if you proceed with item 2) it will not try to grab an IP for the eth0 interface, but will still try to get IP for the wlan0 interface.

You have to properly set up your wlan0 interface with a password for your AP.

meisterbasti commented 4 years ago

1.) Worked for me. Thx !!

2.) Does not work for me. I commented it out but noting happened. Also I removed everything that I don't ned but still not working for me.

Bildschirmfoto 2020-02-15 um 19 21 34

sudo ifconfig eth0 down switched the interface offline but after reboot it is up again....

avafinger commented 4 years ago

So, you removed eth0 interface from the files and you still get the eth0 up?

avafinger commented 4 years ago

try:

#auto eth0
iface eth0 inet dhcp
allow-hotplug eth0
meisterbasti commented 4 years ago

yes I removed eth0 from the interface file and it is still up after reboot.

Adding your lines results in the same. eth0 is still up.

auto eth0

iface eth0 inet dhcp allow-hotplug eth0

I searched for "permanent deactivate eth0" but every solution I tried had no success.

avafinger commented 4 years ago

Please try:

and

allow-hotplug eth0
iface eth0 inet dhcp

not sure if the order of lines are important.

avafinger commented 4 years ago

and you might need:

sudo apt-get update
sudo apt-get install ifupdown-extra

Please, change the subject to something like: "Board takes 01:30 min to display login prompt" , or something like that.

meisterbasti commented 4 years ago

Good news. I think that your suggestion worked. I changed the dhclient as you described.

Please try:

  • edit /etc/dhcp/dhclient.conf
  • change timeout 300; to timeout 5;

The system is logging-in so much faster. Boot-up time is now as I would expect it.

The second suggestion has no positive effect. Therefore I uncommented it in the interface file again. The ifupdown-extra also has no effect to this behavior.

Still I do not understand why eth0 always goes "up" after rebooting. Isn't there a command or setting that disable it permanent ?

avafinger commented 4 years ago

I can only think of some other service is doing the work for the eth0, this should be a feature on 19.10, someone needs to investigate.

dazKind commented 4 years ago

Hi, the wait during boot got on my nerves as well. I'm configuring the devices later in the boot and i figured I could get away with modifying the dhclient.unitfile and supply the -nw flag to dhclient and it worked.

See https://linux.die.net/man/8/dhclient

-nw Become a daemon process immediately (nowait) rather than waiting until an IP address has been acquired.

Steps to make this work:

  1. Open the unit-file: sudo vim /etc/systemd/system/dhclient.service
  2. Add the -nw flag: ExecStart=/sbin/dhclient -4 -q -nw
  3. Save and reboot

P.S.: @avafinger awesome work on this image btw!

Cheers

nordurljosahvida commented 4 years ago

all of this worked great thanks, -nw on dhclient, lower timeout in dhclient.conf, and eth0 settings. now system reboots in 30 seconds from last ping to first ping. how do you get output on display during boot? i only have a blinking cursor.

avafinger commented 4 years ago

how do you get output on display during boot? i only have a blinking cursor.

You need a more recent u-boot with hdmi enabled. Try the latest mainline u-boot.