[ -n "$POST_SCRIPTS" ] || POST_SCRIPTS='yes'
[ -n "$PRE_SCRIPTS" ] || PRE_SCRIPTS='yes'
[ -n "$RECONFIGURE" ] || RECONFIGURE='console-data'
-[ -n "$RELEASE" ] || RELEASE='jessie'
+[ -n "$RELEASE" ] || RELEASE='stretch'
[ -n "$RM_APTCACHE" ] || RM_APTCACHE='yes'
[ -n "$SCRIPTS" ] || SCRIPTS='no' # deprecated, replaced by POST_SCRIPTS
[ -n "$SECURE" ] || SECURE='yes'
-m, --mirror <URL> Mirror which should be used for apt-get/aptitude.
-i, --iso <mnt> Mountpoint where a Debian ISO is mounted to, for use
instead of fetching packages from a mirror.
- -r, --release <name> Release of new Debian system (default: jessie).
+ -r, --release <name> Release of new Debian system (default: stretch).
-t, --target <target> Target partition (/dev/...) or directory where the
system should be installed to.
-p, --mntpoint <mnt> Mountpoint used for mounting the target system,
# ask for Debian release {{{
prompt_for_release()
{
- [ -n "$RELEASE" ] && DEFAULT_RELEASE="$RELEASE" || DEFAULT_RELEASE='jessie'
+ [ -n "$RELEASE" ] && DEFAULT_RELEASE="$RELEASE" || DEFAULT_RELEASE='stretch'
RELEASE="$(dialog --stdout --title "${PN}" --default-item $DEFAULT_RELEASE --menu \
"Please enter the Debian release you would like to use for installation:" \
0 50 5 \
mount -t proc none "${MNTPOINT}"/proc
mount -t sysfs none "${MNTPOINT}"/sys
- mount --bind /dev "${MNTPOINT}"/dev
- mount --bind /dev/pts "${MNTPOINT}"/dev/pts
+ mount -t devtmpfs udev "${MNTPOINT}"/dev
+ mount -t devpts devpts "${MNTPOINT}"/dev/pts
# Has chroot-script installed GRUB to MBR using grub-install (successfully), already?
# chroot-script skips installation for unset ${GRUB}
;;
esac
- case "$RELEASE" in
- lenny|squeeze|wheezy)
- if grep -q '^GRUB_DISABLE_LINUX_UUID=.*true' "${MNTPOINT}"/etc/default/grub 2>/dev/null ; then
- ewarn "GRUB_DISABLE_LINUX_UUID is set to true in /etc/default/grub, not adjusting root= in grub.cfg."
- ewarn "Please note that your system might NOT be able to properly boot."
- else
- einfo "Adjusting grub.cfg for successful boot sequence."
- sed -i "s;root=[^ ]\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg
- fi
- ;;
- esac
+ if grep -q '^GRUB_DISABLE_LINUX_UUID=.*true' "${MNTPOINT}"/etc/default/grub 2>/dev/null ; then
+ ewarn "GRUB_DISABLE_LINUX_UUID is set to true in /etc/default/grub, not adjusting root= in grub.cfg."
+ ewarn "Please note that your system might NOT be able to properly boot."
+ else
+ einfo "Adjusting grub.cfg for successful boot sequence."
+ sed -i "s;root=[^ ]\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg
+ fi
umount "${MNTPOINT}"/proc
umount "${MNTPOINT}"/sys
# make sure we can access network [relevant for cdebootstrap]
[ -f "${MNTPOINT}"/etc/resolv.conf ] || cp $VERBOSE /etc/resolv.conf "${MNTPOINT}"/etc/resolv.conf
- # provide system's /etc/hosts to the target:
- if ! [ -f "$MNTPOINT/etc/hosts" ] ; then
- cp $VERBOSE /etc/hosts "${MNTPOINT}"/etc/hosts
- fi
-
# setup default locales
[ -n "$LOCALES" ] && cp $VERBOSE "${CONFFILES}"/locale.gen "${MNTPOINT}"/etc/locale.gen
# execute all scripts in /etc/debootstrap/post-scripts/ {{{
execute_post_scripts() {
- # make sure we have $MNTPOINT available for our scripts
+ # make sure we have $MNTPOINT and HOSTNAME available for our scripts
export MNTPOINT
+ export TARGET_HOSTNAME=$HOSTNAME
if [ -d "$_opt_scripts" ] || [ "$SCRIPTS" = 'yes' ] ; then
# legacy support for /etc/debootstrap/scripts/
eend 1
else
einfo "Executing chroot-script now"
- mount --bind /dev "$MNTPOINT"/dev
- mount --bind /dev/pts "$MNTPOINT"/dev/pts
+ mount -t devtmpfs udev "${MNTPOINT}"/dev
+ mount -t devpts devpts "${MNTPOINT}"/dev/pts
if [ "$DEBUG" = "true" ] ; then
chroot "$MNTPOINT" /bin/bash -x /bin/chroot-script ; RC=$?
else