PACKAGES='yes'
PRE_SCRIPTS='yes'
RECONFIGURE='console-data'
-RELEASE='squeeze'
+RELEASE='wheezy'
RM_APTCACHE='yes'
SCRIPTS='yes'
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: squeeze).
+ -r, --release <name> Release of new Debian system (default: wheezy).
-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='squeeze'
+ [ -n "$RELEASE" ] && DEFAULT_RELEASE="$RELEASE" || DEFAULT_RELEASE='wheezy'
RELEASE="$(dialog --stdout --title "${PN}" --default-item $DEFAULT_RELEASE --menu \
"Please enter the Debian release you would like to use for installation:" \
0 50 4 \
- lenny Debian/old-stable \
- squeeze Debian/stable \
- wheezy Debian/testing \
+ lenny Debian/5.0 \
+ squeeze Debian/6.0 \
+ wheezy Debian/7.0 \
sid Debian/unstable)"
[ $? -eq 0 ] || bailout
}
[ -n "$RELEASE" ] && INFOTEXT="$INFOTEXT
Using release: $RELEASE"
[ -n "$HOSTNAME" ] && INFOTEXT="$INFOTEXT
- Using hostname $HOSTNAME"
+ Using hostname: $HOSTNAME"
[ -n "$MIRROR" ] && INFOTEXT="$INFOTEXT
Using mirror: $MIRROR"
[ -n "$ISO" ] && INFOTEXT="$INFOTEXT
Using ISO: $ISO"
+ [ -n "$ARCH" ] && INFOTEXT="$INFOTEXT
+ Using arch: $ARCH"
INFOTEXT="$INFOTEXT
[ $? -eq 0 ] || bailout 0
else # if not running automatic installation display configuration and prompt for execution:
- einfo "$PN - Please recheck configuration before execution:"
+ einfo "$PN [${VERSION}] - Please recheck configuration before execution:"
echo
echo " Target: $TARGET"
fi
[ -n "$RELEASE" ] && echo " Using release: $RELEASE"
- [ -n "$MIRROR" ] && echo " Using mirror: $MIRROR"
[ -n "$HOSTNAME" ] && echo " Using hostname: $HOSTNAME"
+ [ -n "$MIRROR" ] && echo " Using mirror: $MIRROR"
[ -n "$ISO" ] && echo " Using ISO: $ISO"
+ [ -n "$ARCH" ] && echo " Using arch: $ARCH"
if [ -n "$VIRTUAL" ] ; then
echo " Deploying as Virtual Machine."
[ -n "$VMSIZE" ] && echo " Using Virtual Disk file with size of ${VMSIZE}."
fi
# }}}
+# architecture setup {{{
+if [ -n "$ARCH" ] ; then
+ ARCHCMD="--arch $ARCH"
+ ARCHINFO=" (${ARCH})"
+else
+ ARCH="$(dpkg --print-architecture)"
+ ARCHCMD="--arch $ARCH"
+ ARCHINFO=" (${ARCH})"
+fi
+# }}}
+
checkconfiguration
# finally make sure at least $TARGET is set [the partition for the new system] {{{
fi
# }}}
-# architecture setup {{{
-if [ -n "$ARCH" ] ; then
- ARCHCMD="--arch $ARCH"
- ARCHINFO=" (${ARCH})"
-else
- ARCH="$(dpkg --print-architecture)"
- ARCHCMD="--arch $ARCH"
- ARCHINFO=" (${ARCH})"
-fi
-# }}}
-
# make sure we have the right syntax when using an iso image {{{
if [ -n "$ISO" ] ; then
case $ISO in
# if dm-mod isn't available then kpartx will fail with
# "Is device-mapper driver missing from kernel? [...]"
- if ! kpartx -av $TARGET >/dev/null 2>&1 ; then
+ if ! kpartx -av $TARGET >/dev/null 2>&1 || ! grep -q device-mapper /proc/misc >/dev/null 2>&1 ; then
einfo "Device-mapper not ready yet, trying to load dm-mod module."
modprobe dm-mod ; eend $?
fi
rm -f "${MNTPOINT}/tmp/core.img"
einfo "Updating grub configuration file."
+ if [ -n "$BOOT_APPEND" ] ; then
+ sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/ s#\"\$# ${BOOT_APPEND}\"#" "${MNTPOINT}"/etc/default/grub
+ fi
chroot "${MNTPOINT}" update-grub
umount "${MNTPOINT}"/proc