@@ -1,41 +1,41 | |||
|
1 | 1 | # |
|
2 | 2 | # Debootstrap basic system |
|
3 | 3 | # |
|
4 | 4 | |
|
5 | 5 | # Load utility functions |
|
6 | 6 | . ./functions.sh |
|
7 | 7 | |
|
8 | 8 | VARIANT="" |
|
9 | 9 | COMPONENTS="main" |
|
10 | 10 | |
|
11 | 11 | # Use non-free Debian packages if needed |
|
12 | 12 | if [ "$ENABLE_NONFREE" = true ] ; then |
|
13 | 13 | COMPONENTS="main,non-free,contrib" |
|
14 | 14 | fi |
|
15 | 15 | |
|
16 | 16 | # Use minbase bootstrap variant which only includes essential packages |
|
17 | 17 | if [ "$ENABLE_MINBASE" = true ] ; then |
|
18 | 18 | VARIANT="--variant=minbase" |
|
19 | 19 | fi |
|
20 | 20 | |
|
21 | 21 | # Base debootstrap (unpack only) |
|
22 | http_proxy=${APT_PROXY} debootstrap ${APT_EXCLUDES} --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}" | |
|
22 | http_proxy=${APT_PROXY} debootstrap ${APT_EXCLUDES} --arch="${RELEASE_ARCH}" --foreign ${VARIANT} --components="${COMPONENTS}" --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}/debian" | |
|
23 | 23 | |
|
24 | 24 | # Copy qemu emulator binary to chroot |
|
25 | 25 | install -m 755 -o root -g root "${QEMU_BINARY}" "${R}${QEMU_BINARY}" |
|
26 | 26 | |
|
27 | 27 | # Copy debian-archive-keyring.pgp |
|
28 | 28 | mkdir -p "${R}/usr/share/keyrings" |
|
29 | 29 | install_readonly /usr/share/keyrings/debian-archive-keyring.gpg "${R}/usr/share/keyrings/debian-archive-keyring.gpg" |
|
30 | 30 | |
|
31 | 31 | # Complete the bootstrapping process |
|
32 | 32 | chroot_exec /debootstrap/debootstrap --second-stage |
|
33 | 33 | |
|
34 | 34 | # Mount required filesystems |
|
35 | 35 | mount -t proc none "${R}/proc" |
|
36 | 36 | mount -t sysfs none "${R}/sys" |
|
37 | 37 | |
|
38 | 38 | # Mount pseudo terminal slave if supported by Debian release |
|
39 | 39 | if [ -d "${R}/dev/pts" ] ; then |
|
40 | 40 | mount --bind /dev/pts "${R}/dev/pts" |
|
41 | 41 | fi |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant