[yocto] unionfs, initrd, switch_root ...

Khem Raj raj.khem at gmail.com
Wed Oct 19 16:37:34 PDT 2011


On Wed, Oct 19, 2011 at 2:50 PM, Chris Tapp <opensource at keylevel.com> wrote:
> I'm booting using the rootfs produced by bitbake as in initrd. This works
> nicely and gives a read-only boot device and a system that runs from RAM.
>
> What I want to do now is allow changes to be made to some files (e.g.
> network configuration) and have these saved on the boot device so that they
> can be restored at startup. To do this I plan to use unionfs to join / and
> something like /var/tmp/ufs. e.g.
>
> mkdir /var/tmp/ufs

may be you need mkdir -p  /var/tmp/ufs/proc

> mount -t unionfs -o dirs=/var/tmp/ufs=rw:/=ro unionfs /media/union
>
> This all works as expected. However, I now need to make /media/union the
> system root so that the system sees the ufs union copies of files. I think I
> need to 'switch_root'. However,
>
> switch_root /media/union /sbin/init 3
>
> gives errors like:
>
> switch_root: failed to mount moving /proc to /media/union/proc: No such file
> or directory
>
> This is where I get lost and I can't seem to find anything on the web that
> helps. A 'grep' of meta hasn't thrown anything up that helps - does anyone
> have a good web reference I can go and read? Lots of learning to do...
>
> Chris Tapp
>
> opensource at keylevel.com
> www.keylevel.com
>
>
>
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



More information about the yocto mailing list