Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 129971 - genkernel: remount / ro... (anotations only)
Summary: genkernel: remount / ro... (anotations only)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 129975
  Show dependency tree
 
Reported: 2006-04-14 11:28 UTC by Daniel
Modified: 2006-06-09 07:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
checkroot pimped up to detect union'd root-fs --> ignore's it (checkroot-init-script_uniond-root-check.patch,1023 bytes, patch)
2006-04-14 11:32 UTC, Daniel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2006-04-14 11:28:56 UTC
following code-lines from genkernel (version 3.3.11d) "/usr/share/genkernel/generic/linuxrc" are good, in my opinion much better than "-o rw" but there are still problems left regarding baselayout's checkroot. It's a guess, because I have not investigated this issue in deep but I'm pretty sure:

# mount ro so fsck doesn't barf later
mount -o ro ${REAL_ROOT}  ${NEW_ROOT}

baselayout's "checkroot" does not check for a "union'd rootfs". Instead it tries to "create" (touch) a file on / to determine whether / is mounted rw or ro. But thus / is actually ro (but already union'd (e.g. with a rw ramdisk)) it is (of course) writeable, so checkroot will try to remounted / "ro" what will cause errors.
I'll file a bug-report including a small (fix/work-around) for the checkroot-init-script to baselayout pointing to this bugreport here at genkernel.
Please do not delete/close/hide or whatever with this bugreport. I intend to reference from a (to be created baselayout-bugreport) to this genkernel-bugreport to make the dependencies more obvious.

Thanks in advance!

P.S.: If the baslayout-maintainers are not willing to integrate or pimp up my quick-hack'ed checkroot patch, I'll provide it here: (this works for me)

--- /etc/custom/checkroot.orig  2006-04-14 14:41:12.000000000 +0200
+++ /etc/init.d/checkroot       2006-04-14 19:57:41.000000000 +0200
@@ -9,6 +9,12 @@
 start() {
        local retval=0

+       # Is root part of a union?
+       which unionctl &>/dev/null && unionctl / --query &> /dev/null && union="yes"
+       if [ "${union}" = "yes"  ] ; then
+               ebegin "Rootfs seems to be part of a union - checkroot skipped"
+               eend 0
+       else
        if [[ ! -f /fastboot && -z ${CDBOOT} ]] && ! is_net_fs / ; then
                if touch -c / >& /dev/null ; then
                        ebegin "Remounting root filesystem read-only"
@@ -64,7 +70,6 @@
                        einfo "Rebooting"
                        /sbin/reboot -f
                fi
-       fi

        # Should we mount root rw ?
        if mount -vf -o remount / 2> /dev/null | \
@@ -80,6 +85,8 @@
                else
                        eend 0
                fi
+               fi
+       fi
        fi

        if [[ ${BOOT} == "yes" ]] ; then
Comment 1 Daniel 2006-04-14 11:32:29 UTC
Created attachment 84660 [details, diff]
checkroot pimped up to detect union'd root-fs --> ignore's it
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2006-06-09 07:32:54 UTC
I'm guessing that this is "fixed" since it is in baselayout.  I'm not sure why you filed two bugs, at all, though.  You could have just put all of the information in a single bug report.

Oh well...