Build Process - Filesystems

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Build Process - Filesystems

Patric Hafner | geOps
Dear Members of the OSGeo mailing list,

in last days, I run the build process as described here [1] several
times to test our install script. Unfortunately the building always
failed due to problem with unmouting of dev and proc-filesystem for
chroot.  After some small changes, I was able to fix this issue.
Do someone else also experienced those problems?

For me it is not obvious why it is necessary to bind the whole /dev into
the chroot - /dev/pts should do it. Secondly, it seems more safe to me,
to execute the mount of /proc outside the chroot.
After performing the following changes, building runs always fine in my
environment.

*build_chroot_debug.sh*

-- sudo mount --bind /dev/ edit/dev
++ sudo mount -t proc -o bind /proc edit/proc
++ sudo mount -o bind /dev/pts edit/dev/pts
...
-- sudo umount edit/dev
++ sudo umount edit/dev/pts
++ sudo umount edit/proc

*inchroot_debug.sh*

--mount -t proc none /proc
--mount -t sysfs none /sys
--mount -t devpts none /dev/pts
...
-- umount /proc || umount -lf /proc
-- umount /sys
-- umount /dev/pts

Any comments or ideas ?


[1]
http://wiki.osgeo.org/wiki/Live_GIS_Build#How_to_do_development_.2F_debugging_with_the_current_build_method

--

With best regards,

Patric Hafner

--
geOps e.K.
--------------------------------
Handelsregister A 702785, Amtsgericht Freiburg
Kaiser-Joseph-Strasse 263
D-79098 Freiburg
--------------------------------
fon     +49 761 503 126 91
fax     +49 761 503 126 94
--------------------------------
free service calls from D and CH
    00800 436 436 436
--------------------------------
web www.geops.de
rss www.geops.de/blog/feed
follow www.twitter.com/geops_tweet
--------------------------------

_______________________________________________
Live-demo mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/live-demo
http://live.osgeo.org
http://wiki.osgeo.org/wiki/Live_GIS_Disc
Reply | Threaded
Open this post in threaded view
|

Re: Build Process - Filesystems

Angelos Tzotsos
On 12/21/2012 12:17 PM, Patric Hafner | geOps wrote:

> Dear Members of the OSGeo mailing list,
>
> in last days, I run the build process as described here [1] several
> times to test our install script. Unfortunately the building always
> failed due to problem with unmouting of dev and proc-filesystem for
> chroot.  After some small changes, I was able to fix this issue.
> Do someone else also experienced those problems?
>
> For me it is not obvious why it is necessary to bind the whole /dev into
> the chroot - /dev/pts should do it. Secondly, it seems more safe to me,
> to execute the mount of /proc outside the chroot.
> After performing the following changes, building runs always fine in my
> environment.
>
> *build_chroot_debug.sh*
>
> -- sudo mount --bind /dev/ edit/dev
> ++ sudo mount -t proc -o bind /proc edit/proc
> ++ sudo mount -o bind /dev/pts edit/dev/pts
> ...
> -- sudo umount edit/dev
> ++ sudo umount edit/dev/pts
> ++ sudo umount edit/proc
>
> *inchroot_debug.sh*
>
> --mount -t proc none /proc
> --mount -t sysfs none /sys
> --mount -t devpts none /dev/pts
> ...
> -- umount /proc || umount -lf /proc
> -- umount /sys
> -- umount /dev/pts
>
> Any comments or ideas ?
>
>
> [1]
> http://wiki.osgeo.org/wiki/Live_GIS_Build#How_to_do_development_.2F_debugging_with_the_current_build_method
>
Hi Patric,

Thanks for your patch, I will test it too.
The previous instructions came directly from the official Ubuntu wiki,
so we did not touch them, and it worked ok (we simply had to reboot the
build VM after a successful build process).

Best,
Angelos

--
Angelos Tzotsos
Remote Sensing Laboratory
National Technical University of Athens
http://users.ntua.gr/tzotsos

_______________________________________________
Live-demo mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/live-demo
http://live.osgeo.org
http://wiki.osgeo.org/wiki/Live_GIS_Disc
Reply | Threaded
Open this post in threaded view
|

Re: Build Process - Filesystems

Micha Silver
Angelos Tzotsos wrote
On 12/21/2012 12:17 PM, Patric Hafner | geOps wrote:
> Dear Members of the OSGeo mailing list,
>
> in last days, I run the build process as described here [1] several
> times to test our install script. Unfortunately the building always
> failed due to problem with unmouting of dev and proc-filesystem for
> chroot.  After some small changes, I was able to fix this issue.
> Do someone else also experienced those problems?
>
> For me it is not obvious why it is necessary to bind the whole /dev into
> the chroot - /dev/pts should do it. Secondly, it seems more safe to me,
> to execute the mount of /proc outside the chroot.
> After performing the following changes, building runs always fine in my
> environment.
>
> *build_chroot_debug.sh*
>
> -- sudo mount --bind /dev/ edit/dev
> ++ sudo mount -t proc -o bind /proc edit/proc
> ++ sudo mount -o bind /dev/pts edit/dev/pts
> ...
> -- sudo umount edit/dev
> ++ sudo umount edit/dev/pts
> ++ sudo umount edit/proc
>
> *inchroot_debug.sh*
>
> --mount -t proc none /proc
> --mount -t sysfs none /sys
> --mount -t devpts none /dev/pts
> ...
> -- umount /proc || umount -lf /proc
> -- umount /sys
> -- umount /dev/pts
>
> Any comments or ideas ?
>
>
> [1]
> http://wiki.osgeo.org/wiki/Live_GIS_Build#How_to_do_development_.2F_debugging_with_the_current_build_method
>
Hi Patric,

Thanks for your patch, I will test it too.
The previous instructions came directly from the official Ubuntu wiki,
so we did not touch them, and it worked ok (we simply had to reboot the
build VM after a successful build process).

Best,
Angelos

--
Angelos Tzotsos
Remote Sensing Laboratory
National Technical University of Athens
http://users.ntua.gr/tzotsos

_______________________________________________
Live-demo mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/live-demo
http://live.osgeo.org
http://wiki.osgeo.org/wiki/Live_GIS_Disc

I can verify that Patric's suggestion works. Successfully creates a build, and also leaves the VM in a usable state.
--
Micha
Reply | Threaded
Open this post in threaded view
|

Re: Build Process - Filesystems

Angelos Tzotsos
On 01/03/2013 02:31 PM, Micha Silver wrote:

> Angelos Tzotsos wrote
>> On 12/21/2012 12:17 PM, Patric Hafner | geOps wrote:
>>> Dear Members of the OSGeo mailing list,
>>>
>>> in last days, I run the build process as described here [1] several
>>> times to test our install script. Unfortunately the building always
>>> failed due to problem with unmouting of dev and proc-filesystem for
>>> chroot.  After some small changes, I was able to fix this issue.
>>> Do someone else also experienced those problems?
>>>
>>> For me it is not obvious why it is necessary to bind the whole /dev into
>>> the chroot - /dev/pts should do it. Secondly, it seems more safe to me,
>>> to execute the mount of /proc outside the chroot.
>>> After performing the following changes, building runs always fine in my
>>> environment.
>>>
>>> *build_chroot_debug.sh*
>>>
>>> -- sudo mount --bind /dev/ edit/dev
>>> ++ sudo mount -t proc -o bind /proc edit/proc
>>> ++ sudo mount -o bind /dev/pts edit/dev/pts
>>> ...
>>> -- sudo umount edit/dev
>>> ++ sudo umount edit/dev/pts
>>> ++ sudo umount edit/proc
>>>
>>> *inchroot_debug.sh*
>>>
>>> --mount -t proc none /proc
>>> --mount -t sysfs none /sys
>>> --mount -t devpts none /dev/pts
>>> ...
>>> -- umount /proc || umount -lf /proc
>>> -- umount /sys
>>> -- umount /dev/pts
>>>
>>> Any comments or ideas ?
>>>
>>>
>>> [1]
>>> http://wiki.osgeo.org/wiki/Live_GIS_Build#How_to_do_development_.2F_debugging_with_the_current_build_method
>>>
>> Hi Patric,
>>
>> Thanks for your patch, I will test it too.
>> The previous instructions came directly from the official Ubuntu wiki,
>> so we did not touch them, and it worked ok (we simply had to reboot the
>> build VM after a successful build process).
>>
>> Best,
>> Angelos
>>
>> --
>> Angelos Tzotsos
>> Remote Sensing Laboratory
>> National Technical University of Athens
>> http://users.ntua.gr/tzotsos
>>
>> _______________________________________________
>> Live-demo mailing list
>> Live-demo@.osgeo
>> http://lists.osgeo.org/mailman/listinfo/live-demo
>> http://live.osgeo.org
>> http://wiki.osgeo.org/wiki/Live_GIS_Disc
>
> I can verify that Patric's suggestion works. Successfully creates a build,
> and also leaves the VM in a usable state.
Hi Patric and Micha,

Unfortunately this fix did not work on a full build as can be seen here:
http://aiolos.survey.ntua.gr/gisvm/dev/osgeo-live-debug-build9529-log.tar.gz

For some reason squashfs fails to read the installed files.
Please check my commit
http://trac.osgeo.org/osgeo/changeset/9529
in case I missed something.

Best,
Angelos

--
Angelos Tzotsos
Remote Sensing Laboratory
National Technical University of Athens
http://users.ntua.gr/tzotsos

_______________________________________________
Live-demo mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/live-demo
http://live.osgeo.org
http://wiki.osgeo.org/wiki/Live_GIS_Disc