Reply
Thread Tools Search this Thread
Posts: 2 | Thanked: 0 times | Joined on Apr 2012
#1
My question is not related to development for N900 etc, but only to usage of scratchbox2 in general.

I can't setup a debian armel deboostrap with sb2, because it won't remap the /dev directory. And that's astonishing. In all tutorials on the internet everybody seems to leave out this detail, e.g. see here:

http://www.daimi.au.dk/~cvm/sb2.pdf
http://biffengineering.com/wiki/inde...ileEnvironment

You initiate the debootstrap with the following command:

Code:
$ fakeroot /usr/sbin/debootstrap --verbose --arch armel --foreign wheezy $ROOTFS http://ftp.debian.org/debian
(Adding --variant=scratchbox to it, doesn't make a significant difference here.) After sb2-init you would now want to run second-stage in order to get the rest of the packages like apt-get. But this command will fail in general:

Code:
$ sb2 -eR ./debootstrap/debootstrap --second-stage
The reason, why this will fail, can be found in ./debootstrap/debootstrap.log. Here we see, that in second-stage debootstrap tries to modify some entries in /dev. But of course "mknod" and "utime" will all fail due to missing permission:

Code:
tar: dev/kmem: Cannot mknod: Permission denied
tar: dev/mem: Cannot mknod: Permission denied
tar: dev/core: Cannot open: File exists
tar: dev/null: Cannot utime: Operation not permitted
scratchbox2 is not remapping the directory "/dev" to "$ROOTFS/dev"! You can check this with:

Code:
$ sb2 -eR sb2-show path /dev
/dev => /dev
Is there a way around this? With this limitation, sb2 seems to be entirely unusable to me...
 
Posts: 358 | Thanked: 486 times | Joined on Jan 2009
#2
I think you need to bind mount the real /dev to $ROOTFS/dev

See how the easy-debian scripts do it.
 
Posts: 2 | Thanked: 0 times | Joined on Apr 2012
#3
I posed the same question on the scratchbox-users mailing list and sb2 developer Lauri had a few useful answers for me:

http://lists.scratchbox.org/pipermai...il/001768.html

Scratchbox2 is not supposed to remap the /dev directory, but instead commands like mknod. The latest developer edition fixes this partially: http://lists.scratchbox.org/pipermai...il/001776.html

Looks like this is worked on

By the way. Where can I find the source code of the "easy-debian scripts". And what do they have to do with debootstrap and scratchbox2?
 
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

 
Forum Jump


All times are GMT -4. The time now is 08:33 AM.