The main difference is that now when you run as root it'll follow the same path as before, that's creating the ext3 image with qemu, mounting it as loop and running debootstrap. It turns out that using genext2fs takes much longer when creating the image, and also consumes a lot of memory.
This is the small benchmark I did comparing running with root and as user:
Remember that with root the debootstrap's second phase runs as user mode emulation, and with user we have to qemu in full emulation mode.
Root:
time sudo bash ./rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 512M --seed ubuntu-minimal --dist lucid --serial ttyS2 --components "main universe multiverse" --restore-package-cache
real 5m37.361s
user 4m42.340s
sys 0m23.620s
User:
time bash ./rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 512M --seed ubuntu-minimal --dist lucid --serial ttyS2 --components "main universe multiverse" --no-root --restore-package-cache
real 15m4.278s
user 13m34.490s
sys 0m7.340s
If everything goes well tomorrow will push it to the tree and close this bug.
Just pushed the second version this patch to my branch: lp:~rsalveti/project-rootstock/no-root
The main difference is that now when you run as root it'll follow the same path as before, that's creating the ext3 image with qemu, mounting it as loop and running debootstrap. It turns out that using genext2fs takes much longer when creating the image, and also consumes a lot of memory.
This is the small benchmark I did comparing running with root and as user:
Remember that with root the debootstrap's second phase runs as user mode emulation, and with user we have to qemu in full emulation mode.
Root: package- cache
time sudo bash ./rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 512M --seed ubuntu-minimal --dist lucid --serial ttyS2 --components "main universe multiverse" --restore-
real 5m37.361s
user 4m42.340s
sys 0m23.620s
User: package- cache
time bash ./rootstock --fqdn beagleboard --login ubuntu --password temppwd --imagesize 512M --seed ubuntu-minimal --dist lucid --serial ttyS2 --components "main universe multiverse" --no-root --restore-
real 15m4.278s
user 13m34.490s
sys 0m7.340s
If everything goes well tomorrow will push it to the tree and close this bug.