Skip to contentSkip to conversation

systemd not working properly?

Buildroot Thomas Petazzoni 4 participants 8 messages Oct 19, 2014 – Jul 12, 2015

lore
Share & tools
lore
#0 lore raw

Dear systemd/Buildroot users,

I don't use systemd much, but every time I need to test a config with systemd enabled, there are quite a few errors at boot time, and more precisely, it doesn't even boot completely. Here are the errors I get:

[FAILED] Failed to start Remount Root and Kernel File Systems. See 'systemctl status systemd-remount-fs.service' for details.
...

Then a *very* long delay because of dev-ttyAMA0.device., that finally ends up with:

[ TIME ] Timed out waiting for device dev-ttyAMA0.device. [DEPEND] Dependency failed for Serial Getty on ttyAMA0.

And finally, I get no getty at all.

Defconfig being used:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_SYSTEMD=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_PACKAGE_AVAHI=y
BR2_PACKAGE_AVAHI_DAEMON=y

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#1 lore raw

Hi Thomas ,all

Quoted 10 lines · Thomas Petazzoni

Dear systemd/Buildroot users,

I don't use systemd much, but every time I need to test a config with systemd enabled, there are quite a few errors at boot time, and more precisely, it doesn't even boot completely. Here are the errors I get:

[FAILED] Failed to start Remount Root and Kernel File Systems. See 'systemctl status systemd-remount-fs.service' for details.
...

Quoted 7 lines

Then a *very* long delay because of dev-ttyAMA0.device., that finally ends up with:

[ TIME ] Timed out waiting for device dev-ttyAMA0.device. [DEPEND] Dependency failed for Serial Getty on ttyAMA0.

And finally, I get no getty at all.

So this particular issues, is due to the fact that for some reason, systemd doesn't like the fact that ttyAMA0 is a serial-link. If you delete the link in /etc/systemd/system/multi-user.target.wants/ and recreate it to point to getty at .service instead of serial-getty at .service, it will boot up fine.
I am still looking into why it doesn't work. I am exploring some idea.

Quoted 17 lines

Defconfig being used:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_SYSTEMD=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_PACKAGE_AVAHI=y
BR2_PACKAGE_AVAHI_DAEMON=y

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#5 lore raw
In reply to Thomas Petazzoni

Hello Thomas

Quoted 9 lines · On Sunday 19 October 2014 12:45:25 Thomas Petazzoni wrote:

Dear systemd/Buildroot users,

I don't use systemd much, but every time I need to test a config with systemd enabled, there are quite a few errors at boot time, and more precisely, it doesn't even boot completely. Here are the errors I get:

[FAILED] Failed to start Remount Root and Kernel File Systems. See 'systemctl status systemd-remount-fs.service' for details.
...

There is an incompatibility between busybox mount command and systemd[1][2]. This error should be resolved if you use mount from util-linux.

[1] http://lists.busybox.net/pipermail/busybox/2008-June/066078.html
[2] http://lists.busybox.net/pipermail/busybox/2012-July/078064.html

Signature · 3 lines
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
#6 lore raw
In reply to Thomas Petazzoni

Hi!

Quoted 18 lines · Thomas Petazzoni

Dear systemd/Buildroot users,

I don't use systemd much, but every time I need to test a config with systemd enabled, there are quite a few errors at boot time, and more precisely, it doesn't even boot completely. Here are the errors I get:

[FAILED] Failed to start Remount Root and Kernel File Systems. See 'systemctl status systemd-remount-fs.service' for details.
...

Then a *very* long delay because of dev-ttyAMA0.device., that finally ends up with:

[ TIME ] Timed out waiting for device dev-ttyAMA0.device. [DEPEND] Dependency failed for Serial Getty on ttyAMA0.

And finally, I get no getty at all.

Quoted 8 lines

Defconfig being used:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_SYSTEMD=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_PACKAGE_AVAHI=y
BR2_PACKAGE_AVAHI_DAEMON=y

I do not have a working ARM based device, I only test with QEMU/ARM and I have not experienced such issue with this configuration. :-(

Best regards
ELB

#7 lore raw

Hi all,

Quoted 28 lines · Eric Le Bihan

Hi!

Quoted 26 lines · Thomas Petazzoni

Dear systemd/Buildroot users,

I don't use systemd much, but every time I need to test a config with systemd enabled, there are quite a few errors at boot time, and more precisely, it doesn't even boot completely. Here are the errors I get:

[FAILED] Failed to start Remount Root and Kernel File Systems. See 'systemctl status systemd-remount-fs.service' for details.
...

Then a *very* long delay because of dev-ttyAMA0.device., that finally ends up with:

[ TIME ] Timed out waiting for device dev-ttyAMA0.device. [DEPEND] Dependency failed for Serial Getty on ttyAMA0.

And finally, I get no getty at all.

Defconfig being used:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_SYSTEMD=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_PACKAGE_AVAHI=y
BR2_PACKAGE_AVAHI_DAEMON=y

In the end, FHANDLE needs to be selected in the Linux configuration for systemd to work properly.
This option is enabled automatically when systemd is selected as init system in BR. In Thomas case (and mine too), the kernel was too old and it was not build with this feature enabled.
Rebuilding fixed the issue.

#2 lore raw
In reply to Maxime Hadjinlian

Dear Maxime Hadjinlian,

Quoted 6 lines · Maxime Hadjinlian
Quoted 6 lines

Then a *very* long delay because of dev-ttyAMA0.device., that finally ends up with:

[ TIME ] Timed out waiting for device dev-ttyAMA0.device. [DEPEND] Dependency failed for Serial Getty on ttyAMA0.

Quoted 7 lines
Quoted 1 line

And finally, I get no getty at all.

So this particular issues, is due to the fact that for some reason, systemd doesn't like the fact that ttyAMA0 is a serial-link. If you delete the link in /etc/systemd/system/multi-user.target.wants/ and recreate it to point to getty at .service instead of serial-getty at .service, it will boot up fine.
I am still looking into why it doesn't work. I am exploring some idea.

I still see this issue today. Can we fix this to have something that works properly out of the box?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw
Quoted 2 lines · Thomas Petazzoni

Dear Maxime Hadjinlian,

Hi Thomas

Quoted 17 lines · Maxime Hadjinlian
Quoted 7 lines
Quoted 7 lines

Then a *very* long delay because of dev-ttyAMA0.device., that finally ends up with:

[ TIME ] Timed out waiting for device dev-ttyAMA0.device. [DEPEND] Dependency failed for Serial Getty on ttyAMA0.

Quoted 7 lines
Quoted 1 line

And finally, I get no getty at all.

So this particular issues, is due to the fact that for some reason, systemd doesn't like the fact that ttyAMA0 is a serial-link. If you delete the link in /etc/systemd/system/multi-user.target.wants/ and recreate it to point to getty at .service instead of serial-getty at .service, it will boot up fine.
I am still looking into why it doesn't work. I am exploring some idea.

Quoted 2 lines

I still see this issue today. Can we fix this to have something that works properly out of the box?

Sure things. I'll keep that in my queue for Friday :).

Quoted 8 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150707/41ba330a/attachment.html>

#4 lore raw
Quoted 22 lines · Maxime Hadjinlian
Quoted 2 lines · Thomas Petazzoni

Dear Maxime Hadjinlian,

Hi Thomas

Quoted 17 lines · Maxime Hadjinlian
Quoted 14 lines
Quoted 8 lines

Then a *very* long delay because of dev-ttyAMA0.device., that finally ends up with:

[ TIME ] Timed out waiting for device dev-ttyAMA0.device. [DEPEND] Dependency failed for Serial Getty on ttyAMA0.

And finally, I get no getty at all.

So this particular issues, is due to the fact that for some reason, systemd doesn't like the fact that ttyAMA0 is a serial-link. If you delete the link in /etc/systemd/system/multi-user.target.wants/ and recreate it to point to getty at .service instead of serial-getty at .service, it will boot up fine.
I am still looking into why it doesn't work. I am exploring some idea.

Quoted 3 lines
Quoted 2 lines

I still see this issue today. Can we fix this to have something that works properly out of the box?

Sure things. I'll keep that in my queue for Friday :).

So after verified and talked to you, here's the definitive answer to that:

If you build your kernel through Buildroot, you'll have FHANDLE selected if you use systemd as init.
If you build your kernel any other way and don't select FHANDLE in the kernel's configuration, you'll end up with exactly this problem.

Quoted 8 lines
Quoted 8 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com