On Tue, Jan 18, 2011 at 11:42:11PM +0000, Hector Oron wrote: > 2011/1/9 Johannes Schauer <j.schauer@email.de>: > > my goal is to build an armel rootfs without the need of super user > > privileges. > > > > using fakeroot, doing a debootstrap or multistrap is possible without > > the need of becoming root. using fakeroot i can even create device > > nodes and such without a problem but at some point i will have to > > chroot into the environment and execute some foreign binaries. > > (for example to execute dpkg --configure -a for a multistrap) > > > > for that i was using qemu-arm-static > > $ cp /usr/bin/qemu-arm-static $ROOTDIR/usr/bin > > and using the normal > > $ sudo chroot $ROOTDIR /bin/sh > > is working great but for that i have to have super user rights. > > > > so fakechroot comes to the rescue. > > > > in debootstrap with the same architecture as the host doing something > > like this will works: > > $ fakeroot fakechroot chroot $ROOTDIR_AMD64 /bin/sh > > > > but this does not work if $ROOTDIR contains an armel debootstrap/multistrap > > while i'm on amd64/i386. > > if i try i get (i already have qemu-arm-static copied over): > > $ fakeroot fakechroot chroot $ROOTDIR /bin/sh > > /lib/ld-linux.so.3: No such file or directory > > Works for me (with warnings) with something like: > > (it needs standard configuration for schroot.conf) > > $ fakeroot debootstrap --foreign --arch=armel sid $ROOTDIR > $ cp /usr/bin/qemu-arm-static $ROOTDIR/usr/bin > $ sudo sh -c "echo 0 > /proc/sys/vm/mmap_min_addr" > > $ fakeroot schroot -c sid_armel > ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be > preloaded: ignored. > W: Failed to change to directory '/srv/chroot': No such file or directory > W: Failed to change to directory '/home/zumbi': No such file or directory > W: Falling back to directory '/' > I have no name!@cat:/$ uname -a > Linux cat 2.6.27.4 #1 SMP Wed Oct 29 16:47:28 UTC 2008 armv5tel GNU/Linux > I have no name!@cat:/$ exit > zumbi@cat:/srv/chroot$ uname -a > Linux cat 2.6.27.4 #1 SMP Wed Oct 29 16:47:28 UTC 2008 x86_64 GNU/Linux > > Maybe, in the future, it can be integrated into schroot. Definitely, this would be really useful. Not being a qemu expert, I missed how you told it to make schroot run qemu-arm-static; are you using the command-prefix option or is this entirely transparent? Thanks, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
Attachment:
signature.asc
Description: Digital signature