[klibc] refactoring do-mounts out of kinit

Andrea Adami andrea.adami at gmail.com
Fri Jul 29 04:19:41 PDT 2011


On Thu, Jul 28, 2011 at 11:19 PM, Mike Waychison <mikew at google.com> wrote:
> On Thu, Jul 28, 2011 at 2:02 PM, maximilian attems <max at stro.at> wrote:
>> On Thu, Jul 28, 2011 at 01:34:22PM -0700, Mike Waychison wrote:
>>> On Thu, Jul 28, 2011 at 12:18 PM, maximilian attems <max at stro.at> wrote:
>> <snipp>
>>> > It is my plan to enhance run-init or switch_root (I don't mind much how it
>>> > is called. my personal pref is for the first, but people seem to have
>>> > settled for the fugly underline cmd). It should just move mount things
>>> > including /dev, /proc, /sys and maybe /run.
>>> > It is currently stupid to unmount for having init to remount them.
>>> > So kinit should just be fine with there. See
>>> > http://www.zytor.com/pipermail/klibc/2011-July/002988.html
>>> > which by itself seems still good to me (the switch_root relaxing got
>>> > nacked by hpa and I tend to agree with him on second thought).
>>>
>>> So, it looks like your patch moves the mountpoints, (which would
>>> probably solve my issue when booting ubuntu disks), but I don't think
>>> it's appropriate to _always_ do this.   Most of our systems boot root
>>> disks that _do not_ expect those guys to be mounted, and they are
>>> handled by the /etc/rc.d/rc.sysinit on the disk image itself.
>>
>> It would be a big bug of /etc/rc.d/rc.sysinit not to handle that.
>> not beeing a RH guy, have only one cluster at hand and there it
>> seems to check for the existence of /proc/mounts before mounting
>> /proc and /sys.
>
> Hmm, well, we forked from RH maybe 10 years ago?  We don't have those
> checks :\   I can add them if needed, but some other types of mounts
> aren't generally appropriate.  We don't use udev for instance, so
> mounting on top of /dev for our custom image would prove fatal..

<cut>

I'm watching this thread with interest, with regard to the packaging
of custom initramfs.
In OpenEmbedded we have a kexec-based bootloader written in C acting
as init, living in the cpio, so no shell.

>From day 0 we package it *and* precreate /proc and /mount and from our
tests /dev has to be as well prepopulated unless devtmpfs is used.


Regards

Andrea



More information about the klibc mailing list