Bug 7442 - rootfs remount does not work as expected with sysvinit
Summary: rootfs remount does not work as expected with sysvinit
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2014.08
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-15 05:15 UTC by joymarquis
Modified: 2014-10-24 23:30 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
buildroot configure file (44.06 KB, text/plain)
2014-09-15 05:22 UTC, joymarquis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description joymarquis 2014-09-15 05:15:56 UTC
Problem
=======
The rootfs can not do remount correctly, with the default sysvinit string:
 * rwmo::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW


Possible root cause
===================
The rootfs can do remount as expected, by removing the comment string and changing the string to:
 * rwmo::sysinit:/bin/mount -o remount,rw /


Program information
===================
FYI: The manual execution for commands below are working as expected:
 * /bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
 * /bin/mount -o remount,rw

mount version (mount -V):
 * mount from util-linux 2.24.2 (libmount 2.24.0: debug, assert)
init version (strings /sbin/init | tail):
 * @(#) init 2.88  26-Mar-2010  miquels@cistron.nl



Debug method
============
The problem is debugged and observed by adding follow lines into /etc/inittab
tst1::sysinit:/bin/mount > /dev/tst1
rwmo::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
tst2::sysinit:/bin/mount > /dev/tst2
rwmt::sysinit:/bin/mount -o remount,rw /
tst3::sysinit:/bin/mount > /dev/tst3


Debug log
=========
After login, the three files proved the problem:
==> /dev/tst1 <==
none on /dev type devtmpfs (rw,relatime,size=516720k,nr_inodes=23632,mode=755)
/dev/sda1 on / type ext3 (ro,relatime,errors=continue,user_xattr,barrier=0,data=ordered)
proc on /proc type proc (rw,relatime)

==> /dev/tst2 <==
none on /dev type devtmpfs (rw,relatime,size=516720k,nr_inodes=23632,mode=755)
/dev/sda1 on / type ext3 (ro,relatime,errors=continue,user_xattr,barrier=0,data=ordered)
proc on /proc type proc (rw,relatime)

==> /dev/tst3 <==
none on /dev type devtmpfs (rw,relatime,size=516720k,nr_inodes=23632,mode=755)
/dev/sda1 on / type ext3 (rw,relatime,errors=continue,user_xattr,barrier=0,data=ordered)
proc on /proc type proc (rw,relatime)
Comment 1 joymarquis 2014-09-15 05:22:23 UTC
Created attachment 5672 [details]
buildroot configure file

Attached buildroot configure file for analyzing on initramfs related configurations.
Comment 2 Peter Korsgaard 2014-10-24 23:30:30 UTC
Fixed in git by Gustavo:

http://git.buildroot.net/buildroot/commit/?id=bcb835b042d385bac801e00cff2f1dbacff93629