Ubuntu – debootstrap –second-stage for

command linedebootstrapinstallation

I just played around with debootstrap and schroot. I'm setting up my environments with debootstrap. I'm not using --second-stage option of debootstrap.

When and how do I need to use this option. What does debootstrap do in the second stage?

Best Answer

Separating the two stages is only needed if you are bootstrapping a distribution for a foreign architecture (CrossDebootstrap). Ssee the description of the --foreign option on the man page. For example, using a x86 machine to create a Debian/Ubuntu installation for an embedded ARM or PowerPC system.

The first stage downloads the needed .deb files and unpacks them into the directory you specify. The second stage runs all of the package configuration scripts, which must be done using the target architecture (or by using qemu-user-static to emulate the target architecture).

If you're not building an install for a foreign architecture, the stages are combined and you can ignore the --second-stage option.