10-bootstrap.sh
28 lines
| 971 B
| application/x-sh
|
BashLexer
/ bootstrap.d / 10-bootstrap.sh
Filip Pytloun
|
r56 | # | ||
# Debootstrap basic system | ||||
# | ||||
Jan Wagner
|
r67 | # Load utility functions | ||
Filip Pytloun
|
r56 | . ./functions.sh | ||
# Base debootstrap (unpack only) | ||||
if [ "$ENABLE_MINBASE" = true ] ; then | ||||
Jan Wagner
|
r82 | http_proxy=${APT_PROXY} debootstrap --arch="${RELEASE_ARCH}" --foreign --variant=minbase --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}/debian" | ||
Filip Pytloun
|
r56 | else | ||
Jan Wagner
|
r82 | http_proxy=${APT_PROXY} debootstrap --arch="${RELEASE_ARCH}" --foreign --include="${APT_INCLUDES}" "${RELEASE}" "${R}" "http://${APT_SERVER}/debian" | ||
Filip Pytloun
|
r56 | fi | ||
# Copy qemu emulator binary to chroot | ||||
Jan Wagner
|
r77 | install_exec "${QEMU_BINARY}" "${R}${QEMU_BINARY}" | ||
Filip Pytloun
|
r56 | |||
# Copy debian-archive-keyring.pgp | ||||
Jan Wagner
|
r82 | mkdir -p "${R}/usr/share/keyrings" | ||
install_readonly /usr/share/keyrings/debian-archive-keyring.gpg "${R}/usr/share/keyrings/debian-archive-keyring.gpg" | ||||
Filip Pytloun
|
r56 | |||
# Complete the bootstrapping process | ||||
chroot_exec /debootstrap/debootstrap --second-stage | ||||
# Mount required filesystems | ||||
Jan Wagner
|
r82 | mount -t proc none "${R}/proc" | ||
mount -t sysfs none "${R}/sys" | ||||
mount --bind /dev/pts "${R}/dev/pts" | ||||