[for-dylan] systemd: fix bootup with 'ro' by re-adding util-linux-mount to RDEPENDS

Submitted by Koen Kooi on April 14, 2013, 1:48 p.m.

Details

Message ID 1365947306-15542-1-git-send-email-koen@dominion.thruhere.net
State New
Headers show

Commit Message

Koen Kooi April 14, 2013, 1:48 p.m.
When using busybox mount the filesystem won't get remounted as 'rw' and bootup will fail.

This fixes the regression seen after switching from 'danny' to 'dylan'.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-core/systemd/systemd_199.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
index 2de9c14..0d07f85 100644
--- a/meta/recipes-core/systemd/systemd_199.bb
+++ b/meta/recipes-core/systemd/systemd_199.bb
@@ -188,7 +188,7 @@  FILES_${PN} = " ${base_bindir}/* \
 FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
 FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
 
-RDEPENDS_${PN} += "dbus"
+RDEPENDS_${PN} += "dbus util-linux-mount"
 
 RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units \
                       util-linux-agetty \

Comments

Ross Burton April 15, 2013, 9:59 a.m.
On 14 April 2013 14:48, Koen Kooi <koen@dominion.thruhere.net> wrote:
> When using busybox mount the filesystem won't get remounted as 'rw' and bootup will fail.
>
> This fixes the regression seen after switching from 'danny' to 'dylan'.

I was going to say that I've never noticed this and have been running
busybox's mount, but on reading the hddimg boot scripts I see it
mounts / as read-write before switching the root.

Does busybox produce any useful errors as to why it's not working?  I
cherry-picked some fixes from busybox git but hopefully we're still
missing some and I'd prefer to pull a fix instead of util-linux-mount.

Ross
Koen Kooi April 15, 2013, 10:09 a.m.
Op 15 apr. 2013, om 11:59 heeft "Burton, Ross" <ross.burton@intel.com> het volgende geschreven:

> On 14 April 2013 14:48, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> When using busybox mount the filesystem won't get remounted as 'rw' and bootup will fail.
>> 
>> This fixes the regression seen after switching from 'danny' to 'dylan'.
> 
> I was going to say that I've never noticed this and have been running
> busybox's mount, but on reading the hddimg boot scripts I see it
> mounts / as read-write before switching the root.
> 
> Does busybox produce any useful errors as to why it's not working?  

No, it pretends everything is OK and the remount succeeded. 

regards,

Koen
Ross Burton April 15, 2013, 10:16 a.m.
On 15 April 2013 11:09, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> Does busybox produce any useful errors as to why it's not working?
>
> No, it pretends everything is OK and the remount succeeded.

Thanks busybox!

/me sighs

Ross
Koen Kooi April 15, 2013, 10:28 a.m.
Op 15 apr. 2013, om 12:16 heeft "Burton, Ross" <ross.burton@intel.com> het volgende geschreven:

> On 15 April 2013 11:09, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>> Does busybox produce any useful errors as to why it's not working?
>> 
>> No, it pretends everything is OK and the remount succeeded.
> 
> Thanks busybox!
> 
> /me sighs

The worst part: I debugged this very issue 2 years ago as well, so busybox mount hasn't improved much during that time.

regards,

Koen
Ross Burton April 15, 2013, 10:42 a.m.
Hi Koen,

On 15 April 2013 11:16, Burton, Ross <ross.burton@intel.com> wrote:
> On 15 April 2013 11:09, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>> Does busybox produce any useful errors as to why it's not working?
>>
>> No, it pretends everything is OK and the remount succeeded.
>
> Thanks busybox!

There's several fixes upstream that we don't have in our busybox, it
would be much appreciated if you could try this patch which rolls them
all up.

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/mount&id=1fc11cc25938b6a0c1e9b69a30326de8608cb98f

(yes, I'll fix the patch to have a proper comment :)

Cheers,
Ross
Enrico Scholz April 15, 2013, 10:47 a.m.
"Burton, Ross" <ross.burton-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
writes:

>> When using busybox mount the filesystem won't get remounted as 'rw'
>> and bootup will fail.
>>
>> This fixes the regression seen after switching from 'danny' to 'dylan'.
>
> I was going to say that I've never noticed this and have been running
> busybox's mount, but on reading the hddimg boot scripts I see it
> mounts / as read-write before switching the root.

This might break systemd's fsck'ing of /.


> Does busybox produce any useful errors as to why it's not working?

busybox's mount just does not read /etc/fstab for 'mount -o remount'.
Code is difficult to read but seems it reads mtab only and applies
options given on cmdline.



Enrico
Ross Burton April 15, 2013, 10:57 a.m.
On 15 April 2013 11:47, Enrico Scholz <enrico.scholz@sigma-chemnitz.de> wrote:
>> I was going to say that I've never noticed this and have been running
>> busybox's mount, but on reading the hddimg boot scripts I see it
>> mounts / as read-write before switching the root.
>
> This might break systemd's fsck'ing of /.

And initscripts's fscking too.  I'll fix this in init-live.sh (for 1.5!).

Ross
Koen Kooi April 15, 2013, 11 a.m.
Op 15 apr. 2013, om 12:47 heeft Enrico Scholz <enrico.scholz@sigma-chemnitz.de> het volgende geschreven:

> "Burton, Ross" <ross.burton-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> writes:
> 
>>> When using busybox mount the filesystem won't get remounted as 'rw'
>>> and bootup will fail.
>>> 
>>> This fixes the regression seen after switching from 'danny' to 'dylan'.
>> 
>> I was going to say that I've never noticed this and have been running
>> busybox's mount, but on reading the hddimg boot scripts I see it
>> mounts / as read-write before switching the root.
> 
> This might break systemd's fsck'ing of /.

Systemd skips fsck if root is rw. Darren sent patches for mkefidisk to pass 'ro', so those work.

regards,

Koen
Koen Kooi April 15, 2013, 11 a.m.
Op 15 apr. 2013, om 12:42 heeft "Burton, Ross" <ross.burton@intel.com> het volgende geschreven:

> Hi Koen,
> 
> On 15 April 2013 11:16, Burton, Ross <ross.burton@intel.com> wrote:
>> On 15 April 2013 11:09, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>>> Does busybox produce any useful errors as to why it's not working?
>>> 
>>> No, it pretends everything is OK and the remount succeeded.
>> 
>> Thanks busybox!
> 
> There's several fixes upstream that we don't have in our busybox, it
> would be much appreciated if you could try this patch which rolls them
> all up.
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/mount&id=1fc11cc25938b6a0c1e9b69a30326de8608cb98f

Do you have an oe-core patch?
Ross Burton April 15, 2013, 11:05 a.m.
On 15 April 2013 12:00, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/mount&id=1fc11cc25938b6a0c1e9b69a30326de8608cb98f
>
> Do you have an oe-core patch?

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/patch/?id=1fc11cc25938b6a0c1e9b69a30326de8608cb98f
will apply to oe-core just as well as it applies to poky.

Ross
Koen Kooi April 15, 2013, 11:22 a.m.
Op 15 apr. 2013, om 13:05 heeft "Burton, Ross" <ross.burton@intel.com> het volgende geschreven:

> On 15 April 2013 12:00, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/mount&id=1fc11cc25938b6a0c1e9b69a30326de8608cb98f
>> 
>> Do you have an oe-core patch?
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/patch/?id=1fc11cc25938b6a0c1e9b69a30326de8608cb98f
> will apply to oe-core just as well as it applies to poky.

'git merge' was very unhappy with it.
Koen Kooi April 15, 2013, 11:31 a.m.
Op 15 apr. 2013, om 12:42 heeft "Burton, Ross" <ross.burton@intel.com> het volgende geschreven:

> Hi Koen,
> 
> On 15 April 2013 11:16, Burton, Ross <ross.burton@intel.com> wrote:
>> On 15 April 2013 11:09, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>>> Does busybox produce any useful errors as to why it's not working?
>>> 
>>> No, it pretends everything is OK and the remount succeeded.
>> 
>> Thanks busybox!
> 
> There's several fixes upstream that we don't have in our busybox, it
> would be much appreciated if you could try this patch which rolls them
> all up.
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/mount&id=1fc11cc25938b6a0c1e9b69a30326de8608cb98f

With that patch included and util-linux-mount removed:

[    3.027961] systemd-random-seed[107]: Failed to write new random seed file: Bad file descriptor
[    3.189475] systemd-tmpfiles[108]: rm_rf(/var/run/udisks): Read-only file system
[    3.262564] systemd-tmpfiles[108]: rm_rf(/var/run/pm-utils): Read-only file system
[    3.310582] systemd-tmpfiles[108]: rm_rf(/var/run/dbus): Read-only file system
[    3.331494] systemd-tmpfiles[108]: rm_rf(/var/run/utmp): Read-only file system
[    3.357310] systemd-tmpfiles[108]: rm_rf(/var/run/avahi-daemon): Read-only file system
[    3.383427] systemd-tmpfiles[108]: rm_rf(/var/run/syslogd.pid): Read-only file system
[    3.410699] systemd-tmpfiles[108]: rm_rf(/var/run/gdm): Read-only file system
[    3.435955] systemd-tmpfiles[108]: rm_rf(/var/run/connman): Read-only file system
[    3.462494] systemd-tmpfiles[108]: rm_rf(/var/run/ConsoleKit): Read-only file system
[    3.492882] systemd-tmpfiles[108]: Failed to create file /var/log/wtmp: Read-only file system
[    3.522076] systemd-tmpfiles[108]: Failed to create file /var/log/btmp: Read-only file system
[    3.554021] systemd-tmpfiles[108]: chmod(/var/tmp) failed: Read-only file system
[    4.676901] systemd-update-utmp[162]: Failed to write utmp record: Read-only file system

So busybox mount is still worthless
Ross Burton April 15, 2013, 11:33 a.m.
On 15 April 2013 12:31, Koen Kooi <koen@dominion.thruhere.net> wrote:
> So busybox mount is still worthless

Thanks.

In that case, I ACK your patch.

Ross