Op 13 apr. 2012, om 21:31 heeft Denys Dmytriyenko het volgende geschreven:

> On Fri, Apr 13, 2012 at 09:54:23AM -0400, Graham Murphy wrote:
>> I'll add an extra data point. I find that boot succeeds if the file
>> /etc/machine-id exists, even if it is an empty file.
>> 
>> So far as I can tell from a brief look, systemd tries
>> to create the file /etc/machine-id, if it does not exist,
>> but this appears to be attempted when the root file system
>> is readonly. (And, yes, if you force the root filesystem to
>> be read-write when /sbin/init starts, again the boot will be
>> successful.) Not sure yet why that cascades into the observed
>> failure yet.
> 
> Thanks, that's a good analysis! Wondering why it's not manifesting in a 
> proper 
> error message in systemd...

I have a hack to get around this:

koen@dominion:/OE/tentacle/sources/meta-openembedded/meta-oe/recipes-core/systemd$
 git diff .
diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb 
b/meta-oe/recipes-core/systemd/systemd_git.bb
index b23e5f5..f4ca72a 100644
--- a/meta-oe/recipes-core/systemd/systemd_git.bb
+++ b/meta-oe/recipes-core/systemd/systemd_git.bb
@@ -14,7 +14,7 @@ inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r26"
+PR = "r27"
 
 inherit useradd pkgconfig autotools vala perlnative
 
@@ -64,6 +64,10 @@ do_install() {
 
        # create dir for journal
        install -d ${D}${localstatedir}/log/journal
+
+       # create machine-id
+       # 20:12 < mezcalero> koen: you have three options: a) run 
systemd-machine-id-setup at install time, b) have / read-only and an empty file 
there (for stateless) and c) boot with / writable
+       touch ${D}${sysconfdir}/machine-id
 }
 
But I wonder if we should fix it differently. We already have this one:

koen@dominion:/OE/tentacle/sources/meta-openembedded/meta-oe/recipes-core/systemd$
 cat ./systemd-compat-units/machineid.service
[Unit]
Description=Machine ID first boot configure
DefaultDependencies=no
ConditionPathExists=|!/etc/machine-id
After=remount-rootfs.service
Before=sysinit.target

[Service]
ExecStart=/bin/systemd-machine-id-setup
RemainAfterExit=No
Type=oneshot
StandardOutput=syslog

[Install]
WantedBy=basic.target
WantedBy=sysinit.target

Which apparently is too late.

regards,

Koen
_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel

Reply via email to