The Following User Says Thank You to Benson For This Useful Post: | ||
![]() |
2008-08-07
, 17:55
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#282
|
I will warn that iceweasel now looks horrible here, but I think that's because I clobbered something else, not from debbie.
The Following User Says Thank You to qole For This Useful Post: | ||
![]() |
2008-08-09
, 23:34
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#283
|
![]() |
2008-08-10
, 06:39
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#284
|
About unmounting: I found that killing all chrooted programs like this:
for i in [0-9]* ; do if ls -dl $i/root | grep -q /opt ; then kill $i ; fi ; done
And then unmounting in the correct order (basically reversed order of mounting), works everytime.
ls: [0-9]*/root: No such file or directory
![]() |
2008-08-10
, 06:52
|
|
Posts: 1,671 |
Thanked: 11,478 times |
Joined on Jun 2008
@ Warsaw, Poland
|
#285
|
The Following User Says Thank You to Stskeeps For This Useful Post: | ||
![]() |
2008-08-10
, 07:37
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#286
|
Can't you use 'fuser' or the likes instead of some voodoo solution of killing processes in chroot?
fuser -m "$CHROOT" -k
![]() |
2008-08-10
, 08:56
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#287
|
#Any external devices MNTD=`cat /proc/mounts | grep ' /media/' | awk '{print $2}'` for MDRV in $MNTD ; do if [ ! -d "$CHROOT$MDRV" ] ; then mkdir "$CHROOT$MDRV" fi mount -o bind "$MDRV" "$CHROOT$MDRV" done
The big news is that the chroot script is now BOOTABLE-DEBIAN-SAFE.
I have taken out all of the file copy commands and put them into a separate script, called "synchroot" which makes a unique backup of all copied files. This script is only run when the user creates an empty file called ~/.synchroot (which is deleted when the script completes). This way, the files are only copied into the chroot when the user requests it, which may be never, in the case of those with custom setups.
This will allow you to chroot into your OS2007 partition, for example, or into your bootable beta3 partition, without worrying about copying over any files. All you do is modify your ~/.chroot file.
I have also included a closechroot script, which closes all chroot apps and unmounts the chroot. This is useful for changing chroots, etc.
This also includes Benson's fixed debbie script.
![]() |
2008-08-10
, 19:31
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#288
|
sudo 'CHROOT=/debian IMGFILE=/dev/mmcblk0p4 debbie iceweasel'
'CHROOT=/os2007 IMGFILE=/dev/mmcblk0p3 debbie xmame froggers.zip'
![]() |
2008-08-11
, 19:29
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#289
|
![]() |
2008-08-12
, 00:35
|
Posts: 96 |
Thanked: 1 time |
Joined on Jul 2007
@ Utah
|
#290
|
![]() |
Tags |
chroot, debian, easy debian |
|
(And I think I may have been a bit over-the-top with that post, actually. I'd forgotten about posting that when I went to set up my own chroot scripts from scratch on a clean flash (I was off-line, and hadn't got my backups handy), and even having looked at and tweaked your version previously, I only got perhaps over half the mounts and file clones right before I gave up a couple hours later. Major hat-tip for your success!)
World's first inductively-charged N900!