Skip to contentSkip to conversation

New: checkroot.sh and /proc/mounts issue

Bug 1418 [email protected] 1 participant 1 message Sep 15, 2006

lore
Share & tools
lore
#0 lore raw

http://bugs.openembedded.org/show_bug.cgi?id=1418

Summary: checkroot.sh and /proc/mounts issue
Product: Openembedded
Version: unspecified
Platform: ARM
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: Build
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]

checkroot.sh right before it is finished checks the privs. of rootfs in /proc/modules. If the rootfs is rw then checkroot.sh exits otherwise it remounts it as rw.
When my system enters this script this is what /proc/mounts looks like:
rootfs / rootfs rw 0 0
/dev/root / jffs2 ro 0 0
proc /proc proc rw 0 0
checkroot.sh does its check and sees rootfs is rw so it exists with out mounting "/" as rw. However /dev/root is the real "/" and it is mounted as ro so it does need to be remounted as rw or the system comes up with the root file system in ro mode.

I modified checkroot.sh as follows:
Line: 153
-- if [ $(grep rootfs /proc/mounts | awk '{print $4}') = rw ]; then
++ if [ $(grep "/dev/root" /proc/mounts | awk '{print $4}') = rw ]; then
exit 0
fi
echo "Remounting root file system..."
mount -n -o remount,$rootmode /

I do not believe this is the best long term solution but it is a temporary one for me that works. I would like to hear other people's options on this matter.

Why are there two entries in the /proc/mounts for "/"?
I verified they are present the minute sysinit calls the first run level script.

Regards,
Shane

Signature · 3 lines
Configure bugmail: http://bugs.openembedded.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.