View Single Post
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#2919
Originally Posted by pichlo View Post
Basically, adding a test for $IMGFILE!=none in two places and removing -m in the call to fuser as it was causing aforementioned issues.
I'm just in process of setting ED to use directory on /opt myself, and I noticed, that your closechroot modification contains something else (as addition to mentioned checks and removing -m):

Code:
TEST1=`mount | grep " $CHROOT "`
MAPPER=`mount | grep "/dev/mapper"`
if [ "x$TEST1" != "x" ] && [ "x$MAPPER" == "x" ] ; then
  if [ -f "/bin/gfuser" ] ; then
    gfuser -m "$CHROOT" -k
  else
    cd /proc
    fuser -m "$CHROOT" -k
  fi
 else
  cd /proc
  fuser "$CHROOT" -k
Above bunch of tests got removed, and replaced by just [i]cd /proc; fuser "$CHROOT -k[/code]. Any idea, why it did all the trickery to decide between gfuser (in case of using /dev/mapper = using loopback file) or fuser (and fallback to fuser in case of gfuser absence, even for said loopback file) in the first time? Also, why you've decided to remove it?

I would like to (one day) sum up all fixes, add some more (like removing dependency on murrina night orange in *maemo's* repos, which mess with some non-ed GTK programs, making using them harder), then, upload new version of easy debian package. Thus, Imm interested, why gfsuer was considered better for some specific scenario (and ithus, if that code snippet is worth keeping).

/Estel

//Edit

A sidenote:

Originally Posted by pichlo View Post
I just did not think ED needed to know about my entire /home tree (which would include ED recursively). Mounting user's home dir ought to be enough for everybody
Code:
pp900-a:/sbin# diff qchroot qchroot.old 
--- qchroot
+++ qchroot.old
@@ -76,10 +76,10 @@
 
   #Mount the user's home dir
   echo .... >/dev/stderr
-  mount -o bind /home/user "$CHROOT/home/user"
+  #mount -o bind /home/user "$CHROOT/home/user"
 
   # Do it the Fremantle way.
-  #mount /dev/mmcblk0p2 "$CHROOT/home"
+  mount /dev/mmcblk0p2 "$CHROOT/home"
   mount /dev/mmcblk0p1 "$CHROOT/home/user/MyDocs"
   
   #Make DBus work
pp900-a:/sbin#
I do not recommend mounting /home/user *at all* in any form for ED. If you investigate latest (Squeeze and later) images, they contain onchrootmount (or smth like that) script, that gets executed from within ED, and umount /dev/mmcblk0p2 (for ED only). It's due to fact, that having /home shared between ED and Maemo leaves you with total mess, if you try to move your ED imgfile/partition content/directory content to another device, or share it with someone (like with images in this thread). Obviously, it would require to also distribute parts of your /home/, but only those related to ED - post-separating them is PITA.

BTW, I know, that mounting it in qchroot, then, unmounting second later by some on<whatever>chroot script is stupid. I think qole decided on this approach, as he wanted to avoid updating easy debian package in Maemo repos for all cost (probably, he didn't wanted to go through promotion to extras, again).

This is also going to be fixed when/if I come to releae updated version - so, as you have browsed trough those scripts already, is it only place where something related to /dev/mmclk0p2 or Maemo's /home/ is executed?

// Edit 2
Just finished it, everything works as OK. First impression - initial start is, obviously, even faster than with native partition - due to skipping mounting part. Thanks a lot valdur55 and pichlo for solutions on fixing ED scripts!
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2013-06-10 at 08:09.
 

The Following User Says Thank You to Estel For This Useful Post: