All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Systemd service recipe fails while booting from initramfs
@ 2019-01-21  8:07 Lukasz Zemla
  2019-01-22 15:41 ` Zoran Stojsavljevic
  0 siblings, 1 reply; 9+ messages in thread
From: Lukasz Zemla @ 2019-01-21  8:07 UTC (permalink / raw)
  To: Zoran Stojsavljevic, Yocto Project

From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Zoran Stojsavljevic
Sent: Monday, January 21, 2019 7:56 AM

[...]

> While downloading initramfs on the target system, while bringing kernel up, the following
> happened (actual log):
> [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 ip=dhcp
> ... [snap]...
> [  114.064032] Sending DHCP requests ...... timed out!
> [  190.652571] IP-Config: Auto-configuration of network failed
> [  190.663158] Freeing unused kernel memory: 1024K
> [  190.668661] Run /init as init process
> System time before build time, advancing clock.
> Failed to mount tmpfs at /sys/fs/cgroup: No such file or directory
> Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or directory
> [!!!!!!] Failed to mount API filesystems, freezing.
> Freezing execution.
> [  192.984442] random: crng init done
> I have two questions (please, could you provide to me some help here):
> [1] How to fix this run-time bug (what I should do in the configuration)?
>     I found some interesting explanation about possible solution (PACKAGECONFIG):
>     https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html

Probably you are missing CONFIG_CGROUPS in your kernel configuration.
Please read README file in the systemd sources folder - it describes all options
required to be enabled in kernel configuration.

> [2] I would like also to include networkctl service (should I do something specific to
>     enable it, or this is done by default enabling systemd)?

Please add following to your conf/local.conf file:
PACKAGECONFIG_append_pn-systemd = " networkd"

Best regards,
Lukasz Zemla

***
The information in this email is confidential and intended solely for the individual or entity to whom it is addressed.  If you have received this email in error please notify the sender by return e-mail, delete this email, and refrain from any disclosure or action based on the information.
***

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Systemd service recipe fails while booting from initramfs
  2019-01-21  8:07 Systemd service recipe fails while booting from initramfs Lukasz Zemla
@ 2019-01-22 15:41 ` Zoran Stojsavljevic
  2019-01-22 15:48   ` Nicolas Dechesne
  0 siblings, 1 reply; 9+ messages in thread
From: Zoran Stojsavljevic @ 2019-01-22 15:41 UTC (permalink / raw)
  To: Lukasz Zemla; +Cc: Yocto Project

[-- Attachment #1: Type: text/plain, Size: 4589 bytes --]

Hello Lukasz,

Thank you very much for the advises. I did what you have suggested, and
this does work.

And it solves my basic problem (NO GO for some reason when I had network
manager).

I use DUT (BBB) with YOCTO initramfs linux as testing vehicle for my
various pass-through VBox VMs (several designs) via my notebook host to
test them, how different designs VMs connect and interact with DUT.

Lukasz and Peter,

I also will investigate more about systemd service in order to get more
inside info about how to properly configure the service.

Thank you,
Zoran
_______

Here is the transcript after I built new YOCTO BBB DUT initramfs build:

root@beaglebone:~# uname -a
Linux beaglebone 4.19.7-jumpnow #1 Tue Jan 22 10:36:57 UTC 2019 armv7l
GNU/Linux
root@beaglebone:~# systemctl restart systemd-networkd
root@beaglebone:~# ps -elf | grep dhc
0 S root      1521  1328  0  80   0 -   745 pipe_w 19:14 ttyO0    00:00:00
grep dhc
root@beaglebone:~# ifconfig eth0 down
root@beaglebone:~# dhclient -4 eth0 -v
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

[11982.445947] net eth0: initializing cpsw version 1.12 (0)
[11982.550762] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver
[SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
Listening on LPF/eth0/64:cf:d9:ff:67:05
Sending on   LPF/eth0/64:cf:d9:ff:67:05
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[11984.640851] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full -
flow control off
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPOFFER of 192.168.15.95 from 192.168.15.2
DHCPREQUEST for 192.168.15.95 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.15.95 from 192.168.15.2
suspect value in domain_name option - discarded
chown: unrecognized option '--reference=/etc/resolv.conf'
BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.

Usage: chown [-Rh]... USER[:[GRP]] FILE...
chmod: unrecognized option '--reference=/etc/resolv.conf'
BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.

Usage: chmod [-R] MODE[,MODE]... FILE...
bound to 192.168.15.95 -- renewal in 40023 seconds.
root@beaglebone:~#

On Mon, Jan 21, 2019 at 9:07 AM Lukasz Zemla <Lukasz.Zemla@woodward.com>
wrote:

> From: yocto-bounces@yoctoproject.org [mailto:
> yocto-bounces@yoctoproject.org] On Behalf Of Zoran Stojsavljevic
> Sent: Monday, January 21, 2019 7:56 AM
>
> [...]
>
> > While downloading initramfs on the target system, while bringing kernel
> up, the following
> > happened (actual log):
> > [    0.000000] Kernel command line: console=ttyO0,115200n8
> root=/dev/ram0 ip=dhcp
> > ... [snap]...
> > [  114.064032] Sending DHCP requests ...... timed out!
> > [  190.652571] IP-Config: Auto-configuration of network failed
> > [  190.663158] Freeing unused kernel memory: 1024K
> > [  190.668661] Run /init as init process
> > System time before build time, advancing clock.
> > Failed to mount tmpfs at /sys/fs/cgroup: No such file or directory
> > Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or
> directory
> > [!!!!!!] Failed to mount API filesystems, freezing.
> > Freezing execution.
> > [  192.984442] random: crng init done
> > I have two questions (please, could you provide to me some help here):
> > [1] How to fix this run-time bug (what I should do in the configuration)?
> >     I found some interesting explanation about possible solution
> (PACKAGECONFIG):
> >
> https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html
>
> Probably you are missing CONFIG_CGROUPS in your kernel configuration.
> Please read README file in the systemd sources folder - it describes all
> options
> required to be enabled in kernel configuration.
>
> > [2] I would like also to include networkctl service (should I do
> something specific to
> >     enable it, or this is done by default enabling systemd)?
>
> Please add following to your conf/local.conf file:
> PACKAGECONFIG_append_pn-systemd = " networkd"
>
> Best regards,
> Lukasz Zemla
>
> ***
> The information in this email is confidential and intended solely for the
> individual or entity to whom it is addressed.  If you have received this
> email in error please notify the sender by return e-mail, delete this
> email, and refrain from any disclosure or action based on the information.
> ***
>

[-- Attachment #2: Type: text/html, Size: 5680 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Systemd service recipe fails while booting from initramfs
  2019-01-22 15:41 ` Zoran Stojsavljevic
@ 2019-01-22 15:48   ` Nicolas Dechesne
  2019-01-22 16:38     ` Zoran Stojsavljevic
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Dechesne @ 2019-01-22 15:48 UTC (permalink / raw)
  To: Zoran Stojsavljevic; +Cc: Yocto Project

hi,

On Tue, Jan 22, 2019 at 4:42 PM Zoran Stojsavljevic
<zoran.stojsavljevic@gmail.com> wrote:
>
> Hello Lukasz,
>
> Thank you very much for the advises. I did what you have suggested, and this does work.
>
> And it solves my basic problem (NO GO for some reason when I had network manager).
>
> I use DUT (BBB) with YOCTO initramfs linux as testing vehicle for my various pass-through VBox VMs (several designs) via my notebook host to test them, how different designs VMs connect and interact with DUT.

can you share how you built your initramfs?  Are you saying that you
are booting an initramfs which then mounts the rootfs where you have
core-image-minimal?

>
> Lukasz and Peter,
>
> I also will investigate more about systemd service in order to get more inside info about how to properly configure the service.
>
> Thank you,
> Zoran
> _______
>
> Here is the transcript after I built new YOCTO BBB DUT initramfs build:
>
> root@beaglebone:~# uname -a
> Linux beaglebone 4.19.7-jumpnow #1 Tue Jan 22 10:36:57 UTC 2019 armv7l GNU/Linux
> root@beaglebone:~# systemctl restart systemd-networkd
> root@beaglebone:~# ps -elf | grep dhc
> 0 S root      1521  1328  0  80   0 -   745 pipe_w 19:14 ttyO0    00:00:00 grep dhc
> root@beaglebone:~# ifconfig eth0 down
> root@beaglebone:~# dhclient -4 eth0 -v
> Internet Systems Consortium DHCP Client 4.4.1
> Copyright 2004-2018 Internet Systems Consortium.
> All rights reserved.
> For info, please visit https://www.isc.org/software/dhcp/
>
> [11982.445947] net eth0: initializing cpsw version 1.12 (0)
> [11982.550762] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
> Listening on LPF/eth0/64:cf:d9:ff:67:05
> Sending on   LPF/eth0/64:cf:d9:ff:67:05
> Sending on   Socket/fallback
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
> [11984.640851] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
> DHCPOFFER of 192.168.15.95 from 192.168.15.2
> DHCPREQUEST for 192.168.15.95 on eth0 to 255.255.255.255 port 67
> DHCPACK of 192.168.15.95 from 192.168.15.2
> suspect value in domain_name option - discarded
> chown: unrecognized option '--reference=/etc/resolv.conf'
> BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
>
> Usage: chown [-Rh]... USER[:[GRP]] FILE...
> chmod: unrecognized option '--reference=/etc/resolv.conf'
> BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
>
> Usage: chmod [-R] MODE[,MODE]... FILE...
> bound to 192.168.15.95 -- renewal in 40023 seconds.
> root@beaglebone:~#
>
> On Mon, Jan 21, 2019 at 9:07 AM Lukasz Zemla <Lukasz.Zemla@woodward.com> wrote:
>>
>> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Zoran Stojsavljevic
>> Sent: Monday, January 21, 2019 7:56 AM
>>
>> [...]
>>
>> > While downloading initramfs on the target system, while bringing kernel up, the following
>> > happened (actual log):
>> > [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 ip=dhcp
>> > ... [snap]...
>> > [  114.064032] Sending DHCP requests ...... timed out!
>> > [  190.652571] IP-Config: Auto-configuration of network failed
>> > [  190.663158] Freeing unused kernel memory: 1024K
>> > [  190.668661] Run /init as init process
>> > System time before build time, advancing clock.
>> > Failed to mount tmpfs at /sys/fs/cgroup: No such file or directory
>> > Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or directory
>> > [!!!!!!] Failed to mount API filesystems, freezing.
>> > Freezing execution.
>> > [  192.984442] random: crng init done
>> > I have two questions (please, could you provide to me some help here):
>> > [1] How to fix this run-time bug (what I should do in the configuration)?
>> >     I found some interesting explanation about possible solution (PACKAGECONFIG):
>> >     https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html
>>
>> Probably you are missing CONFIG_CGROUPS in your kernel configuration.
>> Please read README file in the systemd sources folder - it describes all options
>> required to be enabled in kernel configuration.
>>
>> > [2] I would like also to include networkctl service (should I do something specific to
>> >     enable it, or this is done by default enabling systemd)?
>>
>> Please add following to your conf/local.conf file:
>> PACKAGECONFIG_append_pn-systemd = " networkd"
>>
>> Best regards,
>> Lukasz Zemla
>>
>> ***
>> The information in this email is confidential and intended solely for the individual or entity to whom it is addressed.  If you have received this email in error please notify the sender by return e-mail, delete this email, and refrain from any disclosure or action based on the information.
>> ***
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Systemd service recipe fails while booting from initramfs
  2019-01-22 15:48   ` Nicolas Dechesne
@ 2019-01-22 16:38     ` Zoran Stojsavljevic
  2019-01-22 16:45       ` Nicolas Dechesne
  0 siblings, 1 reply; 9+ messages in thread
From: Zoran Stojsavljevic @ 2019-01-22 16:38 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: Yocto Project

Hello Nicolas,

I build ONLY initramfs to be used on BBB DUT in order to test VMs. I
do not use mtd neither flash rootfs (as mounted on flash), although in
the BBB DUT's flash I have embedded Debian stretch. I use different
ash scripts in U-Boot to bring only ramboot.

Here is the proof:
root@beaglebone:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
devtmpfs                213596         0    213596   0% /dev
tmpfs                   251260         0    251260   0% /dev/shm
tmpfs                   251260      8428    242832   3% /run
tmpfs                   251260         0    251260   0% /sys/fs/cgroup
tmpfs                   251260         0    251260   0% /tmp
tmpfs                   251260       116    251144   0% /var/volatile

But this email thread, my best guess, addresses your concerns:
https://lists.yoctoproject.org/pipermail/yocto/2018-July/041680.html

There is also how to build image with initramfs ONLY, in this thread,
written by me:
https://lists.yoctoproject.org/pipermail/yocto/2018-July/041696.html

I hope this helps.

Zoran
_______


On Tue, Jan 22, 2019 at 4:49 PM Nicolas Dechesne
<nicolas.dechesne@linaro.org> wrote:
>
> hi,
>
> On Tue, Jan 22, 2019 at 4:42 PM Zoran Stojsavljevic
> <zoran.stojsavljevic@gmail.com> wrote:
> >
> > Hello Lukasz,
> >
> > Thank you very much for the advises. I did what you have suggested, and this does work.
> >
> > And it solves my basic problem (NO GO for some reason when I had network manager).
> >
> > I use DUT (BBB) with YOCTO initramfs linux as testing vehicle for my various pass-through VBox VMs (several designs) via my notebook host to test them, how different designs VMs connect and interact with DUT.
>
> can you share how you built your initramfs?  Are you saying that you
> are booting an initramfs which then mounts the rootfs where you have
> core-image-minimal?
>
> >
> > Lukasz and Peter,
> >
> > I also will investigate more about systemd service in order to get more inside info about how to properly configure the service.
> >
> > Thank you,
> > Zoran
> > _______
> >
> > Here is the transcript after I built new YOCTO BBB DUT initramfs build:
> >
> > root@beaglebone:~# uname -a
> > Linux beaglebone 4.19.7-jumpnow #1 Tue Jan 22 10:36:57 UTC 2019 armv7l GNU/Linux
> > root@beaglebone:~# systemctl restart systemd-networkd
> > root@beaglebone:~# ps -elf | grep dhc
> > 0 S root      1521  1328  0  80   0 -   745 pipe_w 19:14 ttyO0    00:00:00 grep dhc
> > root@beaglebone:~# ifconfig eth0 down
> > root@beaglebone:~# dhclient -4 eth0 -v
> > Internet Systems Consortium DHCP Client 4.4.1
> > Copyright 2004-2018 Internet Systems Consortium.
> > All rights reserved.
> > For info, please visit https://www.isc.org/software/dhcp/
> >
> > [11982.445947] net eth0: initializing cpsw version 1.12 (0)
> > [11982.550762] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
> > Listening on LPF/eth0/64:cf:d9:ff:67:05
> > Sending on   LPF/eth0/64:cf:d9:ff:67:05
> > Sending on   Socket/fallback
> > DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
> > [11984.640851] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
> > DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
> > DHCPOFFER of 192.168.15.95 from 192.168.15.2
> > DHCPREQUEST for 192.168.15.95 on eth0 to 255.255.255.255 port 67
> > DHCPACK of 192.168.15.95 from 192.168.15.2
> > suspect value in domain_name option - discarded
> > chown: unrecognized option '--reference=/etc/resolv.conf'
> > BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
> >
> > Usage: chown [-Rh]... USER[:[GRP]] FILE...
> > chmod: unrecognized option '--reference=/etc/resolv.conf'
> > BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
> >
> > Usage: chmod [-R] MODE[,MODE]... FILE...
> > bound to 192.168.15.95 -- renewal in 40023 seconds.
> > root@beaglebone:~#
> >
> > On Mon, Jan 21, 2019 at 9:07 AM Lukasz Zemla <Lukasz.Zemla@woodward.com> wrote:
> >>
> >> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Zoran Stojsavljevic
> >> Sent: Monday, January 21, 2019 7:56 AM
> >>
> >> [...]
> >>
> >> > While downloading initramfs on the target system, while bringing kernel up, the following
> >> > happened (actual log):
> >> > [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 ip=dhcp
> >> > ... [snap]...
> >> > [  114.064032] Sending DHCP requests ...... timed out!
> >> > [  190.652571] IP-Config: Auto-configuration of network failed
> >> > [  190.663158] Freeing unused kernel memory: 1024K
> >> > [  190.668661] Run /init as init process
> >> > System time before build time, advancing clock.
> >> > Failed to mount tmpfs at /sys/fs/cgroup: No such file or directory
> >> > Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or directory
> >> > [!!!!!!] Failed to mount API filesystems, freezing.
> >> > Freezing execution.
> >> > [  192.984442] random: crng init done
> >> > I have two questions (please, could you provide to me some help here):
> >> > [1] How to fix this run-time bug (what I should do in the configuration)?
> >> >     I found some interesting explanation about possible solution (PACKAGECONFIG):
> >> >     https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html
> >>
> >> Probably you are missing CONFIG_CGROUPS in your kernel configuration.
> >> Please read README file in the systemd sources folder - it describes all options
> >> required to be enabled in kernel configuration.
> >>
> >> > [2] I would like also to include networkctl service (should I do something specific to
> >> >     enable it, or this is done by default enabling systemd)?
> >>
> >> Please add following to your conf/local.conf file:
> >> PACKAGECONFIG_append_pn-systemd = " networkd"
> >>
> >> Best regards,
> >> Lukasz Zemla
> >>
> >> ***
> >> The information in this email is confidential and intended solely for the individual or entity to whom it is addressed.  If you have received this email in error please notify the sender by return e-mail, delete this email, and refrain from any disclosure or action based on the information.
> >> ***
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Systemd service recipe fails while booting from initramfs
  2019-01-22 16:38     ` Zoran Stojsavljevic
@ 2019-01-22 16:45       ` Nicolas Dechesne
  2019-01-22 21:08         ` Peter Bergin
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Dechesne @ 2019-01-22 16:45 UTC (permalink / raw)
  To: Zoran Stojsavljevic; +Cc: Yocto Project

On Tue, Jan 22, 2019 at 5:38 PM Zoran Stojsavljevic
<zoran.stojsavljevic@gmail.com> wrote:
>
> Hello Nicolas,
>
> I build ONLY initramfs to be used on BBB DUT in order to test VMs. I
> do not use mtd neither flash rootfs (as mounted on flash), although in
> the BBB DUT's flash I have embedded Debian stretch. I use different
> ash scripts in U-Boot to bring only ramboot.
>
> Here is the proof:
> root@beaglebone:~# df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> devtmpfs                213596         0    213596   0% /dev
> tmpfs                   251260         0    251260   0% /dev/shm
> tmpfs                   251260      8428    242832   3% /run
> tmpfs                   251260         0    251260   0% /sys/fs/cgroup
> tmpfs                   251260         0    251260   0% /tmp
> tmpfs                   251260       116    251144   0% /var/volatile
>
> But this email thread, my best guess, addresses your concerns:
> https://lists.yoctoproject.org/pipermail/yocto/2018-July/041680.html
>
> There is also how to build image with initramfs ONLY, in this thread,
> written by me:
> https://lists.yoctoproject.org/pipermail/yocto/2018-July/041696.html

thanks, that exactly what I was looking for.

>
> I hope this helps.
>
> Zoran
> _______
>
>
> On Tue, Jan 22, 2019 at 4:49 PM Nicolas Dechesne
> <nicolas.dechesne@linaro.org> wrote:
> >
> > hi,
> >
> > On Tue, Jan 22, 2019 at 4:42 PM Zoran Stojsavljevic
> > <zoran.stojsavljevic@gmail.com> wrote:
> > >
> > > Hello Lukasz,
> > >
> > > Thank you very much for the advises. I did what you have suggested, and this does work.
> > >
> > > And it solves my basic problem (NO GO for some reason when I had network manager).
> > >
> > > I use DUT (BBB) with YOCTO initramfs linux as testing vehicle for my various pass-through VBox VMs (several designs) via my notebook host to test them, how different designs VMs connect and interact with DUT.
> >
> > can you share how you built your initramfs?  Are you saying that you
> > are booting an initramfs which then mounts the rootfs where you have
> > core-image-minimal?
> >
> > >
> > > Lukasz and Peter,
> > >
> > > I also will investigate more about systemd service in order to get more inside info about how to properly configure the service.
> > >
> > > Thank you,
> > > Zoran
> > > _______
> > >
> > > Here is the transcript after I built new YOCTO BBB DUT initramfs build:
> > >
> > > root@beaglebone:~# uname -a
> > > Linux beaglebone 4.19.7-jumpnow #1 Tue Jan 22 10:36:57 UTC 2019 armv7l GNU/Linux
> > > root@beaglebone:~# systemctl restart systemd-networkd
> > > root@beaglebone:~# ps -elf | grep dhc
> > > 0 S root      1521  1328  0  80   0 -   745 pipe_w 19:14 ttyO0    00:00:00 grep dhc
> > > root@beaglebone:~# ifconfig eth0 down
> > > root@beaglebone:~# dhclient -4 eth0 -v
> > > Internet Systems Consortium DHCP Client 4.4.1
> > > Copyright 2004-2018 Internet Systems Consortium.
> > > All rights reserved.
> > > For info, please visit https://www.isc.org/software/dhcp/
> > >
> > > [11982.445947] net eth0: initializing cpsw version 1.12 (0)
> > > [11982.550762] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
> > > Listening on LPF/eth0/64:cf:d9:ff:67:05
> > > Sending on   LPF/eth0/64:cf:d9:ff:67:05
> > > Sending on   Socket/fallback
> > > DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
> > > [11984.640851] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
> > > DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
> > > DHCPOFFER of 192.168.15.95 from 192.168.15.2
> > > DHCPREQUEST for 192.168.15.95 on eth0 to 255.255.255.255 port 67
> > > DHCPACK of 192.168.15.95 from 192.168.15.2
> > > suspect value in domain_name option - discarded
> > > chown: unrecognized option '--reference=/etc/resolv.conf'
> > > BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
> > >
> > > Usage: chown [-Rh]... USER[:[GRP]] FILE...
> > > chmod: unrecognized option '--reference=/etc/resolv.conf'
> > > BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
> > >
> > > Usage: chmod [-R] MODE[,MODE]... FILE...
> > > bound to 192.168.15.95 -- renewal in 40023 seconds.
> > > root@beaglebone:~#
> > >
> > > On Mon, Jan 21, 2019 at 9:07 AM Lukasz Zemla <Lukasz.Zemla@woodward.com> wrote:
> > >>
> > >> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Zoran Stojsavljevic
> > >> Sent: Monday, January 21, 2019 7:56 AM
> > >>
> > >> [...]
> > >>
> > >> > While downloading initramfs on the target system, while bringing kernel up, the following
> > >> > happened (actual log):
> > >> > [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 ip=dhcp
> > >> > ... [snap]...
> > >> > [  114.064032] Sending DHCP requests ...... timed out!
> > >> > [  190.652571] IP-Config: Auto-configuration of network failed
> > >> > [  190.663158] Freeing unused kernel memory: 1024K
> > >> > [  190.668661] Run /init as init process
> > >> > System time before build time, advancing clock.
> > >> > Failed to mount tmpfs at /sys/fs/cgroup: No such file or directory
> > >> > Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or directory
> > >> > [!!!!!!] Failed to mount API filesystems, freezing.
> > >> > Freezing execution.
> > >> > [  192.984442] random: crng init done
> > >> > I have two questions (please, could you provide to me some help here):
> > >> > [1] How to fix this run-time bug (what I should do in the configuration)?
> > >> >     I found some interesting explanation about possible solution (PACKAGECONFIG):
> > >> >     https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html
> > >>
> > >> Probably you are missing CONFIG_CGROUPS in your kernel configuration.
> > >> Please read README file in the systemd sources folder - it describes all options
> > >> required to be enabled in kernel configuration.
> > >>
> > >> > [2] I would like also to include networkctl service (should I do something specific to
> > >> >     enable it, or this is done by default enabling systemd)?
> > >>
> > >> Please add following to your conf/local.conf file:
> > >> PACKAGECONFIG_append_pn-systemd = " networkd"
> > >>
> > >> Best regards,
> > >> Lukasz Zemla
> > >>
> > >> ***
> > >> The information in this email is confidential and intended solely for the individual or entity to whom it is addressed.  If you have received this email in error please notify the sender by return e-mail, delete this email, and refrain from any disclosure or action based on the information.
> > >> ***
> > >
> > > --
> > > _______________________________________________
> > > yocto mailing list
> > > yocto@yoctoproject.org
> > > https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Systemd service recipe fails while booting from initramfs
  2019-01-22 16:45       ` Nicolas Dechesne
@ 2019-01-22 21:08         ` Peter Bergin
  2019-01-23  5:01           ` Zoran Stojsavljevic
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Bergin @ 2019-01-22 21:08 UTC (permalink / raw)
  To: Zoran Stojsavljevic; +Cc: Yocto Project

[-- Attachment #1: Type: text/plain, Size: 7244 bytes --]

Hi Zoran,

I'm not sure I got your question correct but I'll try to give you a 
super simple network config for systemd-networkd using dhcp.

Add the file '/etc/systemd/network/10-dhcp.network' with the following 
content:

     	[Match]
	Name=*

	[Network]
	DHCP=yes

Then I hope you will get your interface up with DHCP.

Regards,
/Peter



On 2019-01-22 17:45, Nicolas Dechesne wrote:
> On Tue, Jan 22, 2019 at 5:38 PM Zoran Stojsavljevic
> <zoran.stojsavljevic@gmail.com> wrote:
>> Hello Nicolas,
>>
>> I build ONLY initramfs to be used on BBB DUT in order to test VMs. I
>> do not use mtd neither flash rootfs (as mounted on flash), although in
>> the BBB DUT's flash I have embedded Debian stretch. I use different
>> ash scripts in U-Boot to bring only ramboot.
>>
>> Here is the proof:
>> root@beaglebone:~# df
>> Filesystem           1K-blocks      Used Available Use% Mounted on
>> devtmpfs                213596         0    213596   0% /dev
>> tmpfs                   251260         0    251260   0% /dev/shm
>> tmpfs                   251260      8428    242832   3% /run
>> tmpfs                   251260         0    251260   0% /sys/fs/cgroup
>> tmpfs                   251260         0    251260   0% /tmp
>> tmpfs                   251260       116    251144   0% /var/volatile
>>
>> But this email thread, my best guess, addresses your concerns:
>> https://lists.yoctoproject.org/pipermail/yocto/2018-July/041680.html
>>
>> There is also how to build image with initramfs ONLY, in this thread,
>> written by me:
>> https://lists.yoctoproject.org/pipermail/yocto/2018-July/041696.html
> thanks, that exactly what I was looking for.
>
>> I hope this helps.
>>
>> Zoran
>> _______
>>
>>
>> On Tue, Jan 22, 2019 at 4:49 PM Nicolas Dechesne
>> <nicolas.dechesne@linaro.org> wrote:
>>> hi,
>>>
>>> On Tue, Jan 22, 2019 at 4:42 PM Zoran Stojsavljevic
>>> <zoran.stojsavljevic@gmail.com> wrote:
>>>> Hello Lukasz,
>>>>
>>>> Thank you very much for the advises. I did what you have suggested, and this does work.
>>>>
>>>> And it solves my basic problem (NO GO for some reason when I had network manager).
>>>>
>>>> I use DUT (BBB) with YOCTO initramfs linux as testing vehicle for my various pass-through VBox VMs (several designs) via my notebook host to test them, how different designs VMs connect and interact with DUT.
>>> can you share how you built your initramfs?  Are you saying that you
>>> are booting an initramfs which then mounts the rootfs where you have
>>> core-image-minimal?
>>>
>>>> Lukasz and Peter,
>>>>
>>>> I also will investigate more about systemd service in order to get more inside info about how to properly configure the service.
>>>>
>>>> Thank you,
>>>> Zoran
>>>> _______
>>>>
>>>> Here is the transcript after I built new YOCTO BBB DUT initramfs build:
>>>>
>>>> root@beaglebone:~# uname -a
>>>> Linux beaglebone 4.19.7-jumpnow #1 Tue Jan 22 10:36:57 UTC 2019 armv7l GNU/Linux
>>>> root@beaglebone:~# systemctl restart systemd-networkd
>>>> root@beaglebone:~# ps -elf | grep dhc
>>>> 0 S root      1521  1328  0  80   0 -   745 pipe_w 19:14 ttyO0    00:00:00 grep dhc
>>>> root@beaglebone:~# ifconfig eth0 down
>>>> root@beaglebone:~# dhclient -4 eth0 -v
>>>> Internet Systems Consortium DHCP Client 4.4.1
>>>> Copyright 2004-2018 Internet Systems Consortium.
>>>> All rights reserved.
>>>> For info, please visit https://www.isc.org/software/dhcp/
>>>>
>>>> [11982.445947] net eth0: initializing cpsw version 1.12 (0)
>>>> [11982.550762] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
>>>> Listening on LPF/eth0/64:cf:d9:ff:67:05
>>>> Sending on   LPF/eth0/64:cf:d9:ff:67:05
>>>> Sending on   Socket/fallback
>>>> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
>>>> [11984.640851] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
>>>> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
>>>> DHCPOFFER of 192.168.15.95 from 192.168.15.2
>>>> DHCPREQUEST for 192.168.15.95 on eth0 to 255.255.255.255 port 67
>>>> DHCPACK of 192.168.15.95 from 192.168.15.2
>>>> suspect value in domain_name option - discarded
>>>> chown: unrecognized option '--reference=/etc/resolv.conf'
>>>> BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
>>>>
>>>> Usage: chown [-Rh]... USER[:[GRP]] FILE...
>>>> chmod: unrecognized option '--reference=/etc/resolv.conf'
>>>> BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
>>>>
>>>> Usage: chmod [-R] MODE[,MODE]... FILE...
>>>> bound to 192.168.15.95 -- renewal in 40023 seconds.
>>>> root@beaglebone:~#
>>>>
>>>> On Mon, Jan 21, 2019 at 9:07 AM Lukasz Zemla <Lukasz.Zemla@woodward.com> wrote:
>>>>> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Zoran Stojsavljevic
>>>>> Sent: Monday, January 21, 2019 7:56 AM
>>>>>
>>>>> [...]
>>>>>
>>>>>> While downloading initramfs on the target system, while bringing kernel up, the following
>>>>>> happened (actual log):
>>>>>> [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 ip=dhcp
>>>>>> ... [snap]...
>>>>>> [  114.064032] Sending DHCP requests ...... timed out!
>>>>>> [  190.652571] IP-Config: Auto-configuration of network failed
>>>>>> [  190.663158] Freeing unused kernel memory: 1024K
>>>>>> [  190.668661] Run /init as init process
>>>>>> System time before build time, advancing clock.
>>>>>> Failed to mount tmpfs at /sys/fs/cgroup: No such file or directory
>>>>>> Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or directory
>>>>>> [!!!!!!] Failed to mount API filesystems, freezing.
>>>>>> Freezing execution.
>>>>>> [  192.984442] random: crng init done
>>>>>> I have two questions (please, could you provide to me some help here):
>>>>>> [1] How to fix this run-time bug (what I should do in the configuration)?
>>>>>>      I found some interesting explanation about possible solution (PACKAGECONFIG):
>>>>>>      https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html
>>>>> Probably you are missing CONFIG_CGROUPS in your kernel configuration.
>>>>> Please read README file in the systemd sources folder - it describes all options
>>>>> required to be enabled in kernel configuration.
>>>>>
>>>>>> [2] I would like also to include networkctl service (should I do something specific to
>>>>>>      enable it, or this is done by default enabling systemd)?
>>>>> Please add following to your conf/local.conf file:
>>>>> PACKAGECONFIG_append_pn-systemd = " networkd"
>>>>>
>>>>> Best regards,
>>>>> Lukasz Zemla
>>>>>
>>>>> ***
>>>>> The information in this email is confidential and intended solely for the individual or entity to whom it is addressed.  If you have received this email in error please notify the sender by return e-mail, delete this email, and refrain from any disclosure or action based on the information.
>>>>> ***
>>>> --
>>>> _______________________________________________
>>>> yocto mailing list
>>>> yocto@yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/yocto


[-- Attachment #2: Type: text/html, Size: 9483 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Systemd service recipe fails while booting from initramfs
  2019-01-22 21:08         ` Peter Bergin
@ 2019-01-23  5:01           ` Zoran Stojsavljevic
  0 siblings, 0 replies; 9+ messages in thread
From: Zoran Stojsavljevic @ 2019-01-23  5:01 UTC (permalink / raw)
  To: Peter Bergin; +Cc: Yocto Project

[-- Attachment #1: Type: text/plain, Size: 8262 bytes --]

Hello Peter,

> I'm not sure I got your question correct but I'll try to give you *a
super*
> *simple *network config for systemd-networkd using dhcp.

*Super simple answer.* From my previous answer (from log provided):

[11982.445947] net eth0: initializing cpsw version 1.12 (0)
[11982.550762] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver
[SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
Listening on LPF/eth0/64:cf:d9:ff:67:05
Sending on   LPF/eth0/64:cf:d9:ff:67:05
Sending on   Socket/fallback





*DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7[11984.640851]
cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control
offDHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10DHCPOFFER of
192.168.15.95 from 192.168.15.2DHCPREQUEST for 192.168.15.95 on eth0 to
255.255.255.255 port 67DHCPACK of 192.168.15.95 from 192.168.15.2*
suspect value in domain_name option - discarded
chown: unrecognized option '--reference=/etc/resolv.conf'
BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.

Best Regards,
Zoran
_______


On Tue, Jan 22, 2019 at 10:08 PM Peter Bergin <peter@berginkonsult.se>
wrote:

> Hi Zoran,
>
> I'm not sure I got your question correct but I'll try to give you a super
> simple network config for systemd-networkd using dhcp.
>
> Add the file '/etc/systemd/network/10-dhcp.network' with the following
> content:
>
>     	[Match]
> 	Name=*
>
> 	[Network]
> 	DHCP=yes
>
> Then I hope you will get your interface up with DHCP.
>
> Regards,
> /Peter
>
>
>
> On 2019-01-22 17:45, Nicolas Dechesne wrote:
>
> On Tue, Jan 22, 2019 at 5:38 PM Zoran Stojsavljevic<zoran.stojsavljevic@gmail.com> <zoran.stojsavljevic@gmail.com> wrote:
>
> Hello Nicolas,
>
> I build ONLY initramfs to be used on BBB DUT in order to test VMs. I
> do not use mtd neither flash rootfs (as mounted on flash), although in
> the BBB DUT's flash I have embedded Debian stretch. I use different
> ash scripts in U-Boot to bring only ramboot.
>
> Here is the proof:
> root@beaglebone:~# df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> devtmpfs                213596         0    213596   0% /dev
> tmpfs                   251260         0    251260   0% /dev/shm
> tmpfs                   251260      8428    242832   3% /run
> tmpfs                   251260         0    251260   0% /sys/fs/cgroup
> tmpfs                   251260         0    251260   0% /tmp
> tmpfs                   251260       116    251144   0% /var/volatile
>
> But this email thread, my best guess, addresses your concerns:https://lists.yoctoproject.org/pipermail/yocto/2018-July/041680.html
>
> There is also how to build image with initramfs ONLY, in this thread,
> written by me:https://lists.yoctoproject.org/pipermail/yocto/2018-July/041696.html
>
> thanks, that exactly what I was looking for.
>
>
> I hope this helps.
>
> Zoran
> _______
>
>
> On Tue, Jan 22, 2019 at 4:49 PM Nicolas Dechesne<nicolas.dechesne@linaro.org> <nicolas.dechesne@linaro.org> wrote:
>
> hi,
>
> On Tue, Jan 22, 2019 at 4:42 PM Zoran Stojsavljevic<zoran.stojsavljevic@gmail.com> <zoran.stojsavljevic@gmail.com> wrote:
>
> Hello Lukasz,
>
> Thank you very much for the advises. I did what you have suggested, and this does work.
>
> And it solves my basic problem (NO GO for some reason when I had network manager).
>
> I use DUT (BBB) with YOCTO initramfs linux as testing vehicle for my various pass-through VBox VMs (several designs) via my notebook host to test them, how different designs VMs connect and interact with DUT.
>
> can you share how you built your initramfs?  Are you saying that you
> are booting an initramfs which then mounts the rootfs where you have
> core-image-minimal?
>
>
> Lukasz and Peter,
>
> I also will investigate more about systemd service in order to get more inside info about how to properly configure the service.
>
> Thank you,
> Zoran
> _______
>
> Here is the transcript after I built new YOCTO BBB DUT initramfs build:
>
> root@beaglebone:~# uname -a
> Linux beaglebone 4.19.7-jumpnow #1 Tue Jan 22 10:36:57 UTC 2019 armv7l GNU/Linux
> root@beaglebone:~# systemctl restart systemd-networkd
> root@beaglebone:~# ps -elf | grep dhc
> 0 S root      1521  1328  0  80   0 -   745 pipe_w 19:14 ttyO0    00:00:00 grep dhc
> root@beaglebone:~# ifconfig eth0 down
> root@beaglebone:~# dhclient -4 eth0 -v
> Internet Systems Consortium DHCP Client 4.4.1
> Copyright 2004-2018 Internet Systems Consortium.
> All rights reserved.
> For info, please visit https://www.isc.org/software/dhcp/
>
> [11982.445947] net eth0: initializing cpsw version 1.12 (0)
> [11982.550762] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
> Listening on LPF/eth0/64:cf:d9:ff:67:05
> Sending on   LPF/eth0/64:cf:d9:ff:67:05
> Sending on   Socket/fallback
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
> [11984.640851] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
> DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
> DHCPOFFER of 192.168.15.95 from 192.168.15.2
> DHCPREQUEST for 192.168.15.95 on eth0 to 255.255.255.255 port 67
> DHCPACK of 192.168.15.95 from 192.168.15.2
> suspect value in domain_name option - discarded
> chown: unrecognized option '--reference=/etc/resolv.conf'
> BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
>
> Usage: chown [-Rh]... USER[:[GRP]] FILE...
> chmod: unrecognized option '--reference=/etc/resolv.conf'
> BusyBox v1.29.2 (2019-01-19 17:24:17 UTC) multi-call binary.
>
> Usage: chmod [-R] MODE[,MODE]... FILE...
> bound to 192.168.15.95 -- renewal in 40023 seconds.
> root@beaglebone:~#
>
> On Mon, Jan 21, 2019 at 9:07 AM Lukasz Zemla <Lukasz.Zemla@woodward.com> <Lukasz.Zemla@woodward.com> wrote:
>
> From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org <yocto-bounces@yoctoproject.org>] On Behalf Of Zoran Stojsavljevic
> Sent: Monday, January 21, 2019 7:56 AM
>
> [...]
>
>
> While downloading initramfs on the target system, while bringing kernel up, the following
> happened (actual log):
> [    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 ip=dhcp
> ... [snap]...
> [  114.064032] Sending DHCP requests ...... timed out!
> [  190.652571] IP-Config: Auto-configuration of network failed
> [  190.663158] Freeing unused kernel memory: 1024K
> [  190.668661] Run /init as init process
> System time before build time, advancing clock.
> Failed to mount tmpfs at /sys/fs/cgroup: No such file or directory
> Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or directory
> [!!!!!!] Failed to mount API filesystems, freezing.
> Freezing execution.
> [  192.984442] random: crng init done
> I have two questions (please, could you provide to me some help here):
> [1] How to fix this run-time bug (what I should do in the configuration)?
>     I found some interesting explanation about possible solution (PACKAGECONFIG):
>     https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html
>
> Probably you are missing CONFIG_CGROUPS in your kernel configuration.
> Please read README file in the systemd sources folder - it describes all options
> required to be enabled in kernel configuration.
>
>
> [2] I would like also to include networkctl service (should I do something specific to
>     enable it, or this is done by default enabling systemd)?
>
> Please add following to your conf/local.conf file:
> PACKAGECONFIG_append_pn-systemd = " networkd"
>
> Best regards,
> Lukasz Zemla
>
> ***
> The information in this email is confidential and intended solely for the individual or entity to whom it is addressed.  If you have received this email in error please notify the sender by return e-mail, delete this email, and refrain from any disclosure or action based on the information.
> ***
>
> --
> _______________________________________________
> yocto mailing listyocto@yoctoproject.orghttps://lists.yoctoproject.org/listinfo/yocto
>
>
>

[-- Attachment #2: Type: text/html, Size: 12668 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Systemd service recipe fails while booting from initramfs
  2019-01-21  6:56 Zoran Stojsavljevic
@ 2019-01-21  8:34 ` Peter Bergin
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Bergin @ 2019-01-21  8:34 UTC (permalink / raw)
  To: zoran.stojsavljevic; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2612 bytes --]

On 2019-01-21 07:56, Zoran Stojsavljevic wrote:
> Hello to all,
>
> I have added to my local.conf the following lines in order to port 
> systemd service
> in YOCTO (Thud release):
>
> _/## Add systemd service
> VIRTUAL-RUNTIME_init_manager = "systemd"
> VIRTUAL-RUNTIME_dev_manager = "systemd"
> DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
> VIRTUAL-RUNTIME_initscripts = ""
> DISTRO_FEATURES_append = " nfs systemd"/_
>
> By executing bitbake -k core-image-minimal command, all went good 
> (although it rebuilt
> almost the whole build - circa 80% of it), which is understandable.
>
> While downloading initramfs on the target system, while bringing 
> kernel up, the following
> happened (actual log):
> [    0.000000] Kernel command line: console=ttyO0,115200n8 
> root=/dev/ram0 ip=dhcp
> ... [snap]...
> [  114.064032] Sending DHCP requests ...... timed out!
> [  190.652571] IP-Config: Auto-configuration of network failed
> [  190.663158] Freeing unused kernel memory: 1024K
> [  190.668661] Run /init as init process
> System time before build time, advancing clock.
> /*Failed to mount tmpfs at /sys/fs/cgroup: No such file or directory
> Failed to mount cgroup at /sys/fs/cgroup/systemd: No such file or 
> directory
> [!!!!!!] */Failed to mount API filesystems, freezing.
> /*Freezing execution.*/
> [  192.984442] random: crng init done
>
> I have two questions (please, could you provide to me some help here):
> [1] How to fix this run-time bug (what I should do in the configuration)?
>      I found some interesting explanation about possible solution 
> /(PACKAGECONFIG)/:
> https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html

Could be that you miss some required kernel configurations. See 
systemd/README 
(https://github.com/systemd/systemd/blob/8464d9e0dc506538fd0f2d1d667966750cb9cf30/README#L38)
> [2] I would like also to include networkctl service (should I do 
> something specific to
>      enable it, or this is done by default enabling systemd)?
PACKAGECONFIG will control which features you have enabled for systemd. 
To check which ones you have you can execute 'bitbake -e systemd | grep 
^PACKAGECONFIG='. If you want to change this config you can adjust 
PACKAGECONFIG in your own systemd_%.bbappend file.

I guess networkd is enabled default with the systemd recipe. But check 
it out. There are several way to see which files that are included in 
your image. I use buildhistory.bbclass in all my build which make it 
easy too look up what's included.

Regards,
/Peter


[-- Attachment #2: Type: text/html, Size: 5452 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Systemd service recipe fails while booting from initramfs
@ 2019-01-21  6:56 Zoran Stojsavljevic
  2019-01-21  8:34 ` Peter Bergin
  0 siblings, 1 reply; 9+ messages in thread
From: Zoran Stojsavljevic @ 2019-01-21  6:56 UTC (permalink / raw)
  To: Yocto Project

[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]

Hello to all,

I have added to my local.conf the following lines in order to port systemd
service
in YOCTO (Thud release):






*## Add systemd serviceVIRTUAL-RUNTIME_init_manager =
"systemd"VIRTUAL-RUNTIME_dev_manager =
"systemd"DISTRO_FEATURES_BACKFILL_CONSIDERED =
"sysvinit"VIRTUAL-RUNTIME_initscripts = ""DISTRO_FEATURES_append = " nfs
systemd"*

By executing bitbake -k core-image-minimal command, all went good (although
it rebuilt
almost the whole build - circa 80% of it), which is understandable.

While downloading initramfs on the target system, while bringing kernel up,
the following
happened (actual log):
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0
ip=dhcp
... [snap]...
[  114.064032] Sending DHCP requests ...... timed out!
[  190.652571] IP-Config: Auto-configuration of network failed
[  190.663158] Freeing unused kernel memory: 1024K
[  190.668661] Run /init as init process
System time before build time, advancing clock.


*Failed to mount tmpfs at /sys/fs/cgroup: No such file or directoryFailed
to mount cgroup at /sys/fs/cgroup/systemd: No such file or
directory[!!!!!!] *Failed to mount API filesystems, freezing.
*Freezing execution.*
[  192.984442] random: crng init done

I have two questions (please, could you provide to me some help here):
[1] How to fix this run-time bug (what I should do in the configuration)?
     I found some interesting explanation about possible solution
*(PACKAGECONFIG)*:

https://lists.yoctoproject.org/pipermail/yocto/2013-November/016965.html
[2] I would like also to include networkctl service (should I do something
specific to
     enable it, or this is done by default enabling systemd)?

Thank you,
Zoran

[-- Attachment #2: Type: text/html, Size: 2438 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-01-23  5:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21  8:07 Systemd service recipe fails while booting from initramfs Lukasz Zemla
2019-01-22 15:41 ` Zoran Stojsavljevic
2019-01-22 15:48   ` Nicolas Dechesne
2019-01-22 16:38     ` Zoran Stojsavljevic
2019-01-22 16:45       ` Nicolas Dechesne
2019-01-22 21:08         ` Peter Bergin
2019-01-23  5:01           ` Zoran Stojsavljevic
  -- strict thread matches above, loose matches on Subject: below --
2019-01-21  6:56 Zoran Stojsavljevic
2019-01-21  8:34 ` Peter Bergin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.