[ -n "$INSTALL_NOTES" ] || INSTALL_NOTES='/etc/debootstrap/install_notes'
[ -n "$LOCALES" ] || LOCALES='yes'
[ -n "$MIRROR" ] || MIRROR="$FALLBACK_MIRROR"
-[ -n "$MKFS" ] || MKFS='mkfs.ext3'
+[ -n "$MKFS" ] || MKFS='mkfs.ext4'
[ -n "$PACKAGES" ] || PACKAGES='yes'
[ -n "$PRE_SCRIPTS" ] || PRE_SCRIPTS='yes'
[ -n "$RECONFIGURE" ] || RECONFIGURE='console-data'
Other options:
-v, --verbose Increase verbosity.
+ --debug Execute in very verbose way.
-h, --help Print this usage information and exit.
-V, --version Show summary of options and exit.
[ "$_opt_insecure" ] && echo "Warning: --insecure is deprecated, continuing anyway."
[ "$_opt_force" ] && FORCE=$_opt_force
[ "$_opt_verbose" ] && VERBOSE="-v"
+[ "$_opt_debug" ] && DEBUG="true"
+
+if [ "$DEBUG" = "true" ] ; then
+ set -x
+fi
[ "$_opt_help" ] && {
usage ; eend 0
$MKFS $TARGET ; RC=$?
if [ "$FIXED_DISK_IDENTIFIERS" = "yes" ] ; then
- einfo "Changing disk uuid for $TARGET to fixed (non-random) value using tune2fs"
- tune2fs "$TARGET" -U 26ada0c0-1165-4098-884d-aafd2220c2c6
- eend $?
+ if ! echo "$MKFS" | grep -q "mkfs.ext" ; then
+ eerror "Not changing disk uuid for $TARGET because $MKFS doesn't seem to match for ext{2,3,4} file system"
+ eend 1
+ bailout 1
+ else
+ einfo "Changing disk uuid for $TARGET to fixed (non-random) value using tune2fs"
+ tune2fs "$TARGET" -U 26ada0c0-1165-4098-884d-aafd2220c2c6
+ eend $?
+ fi
fi
# make sure /dev/disk/by-uuid/... is up2date, otherwise grub
dd if="${MBRTMPFILE}" of="${TARGET}" conv=notrunc
eend $?
fi
- parted -s "${TARGET}" 'mkpart primary ext3 2M -1'
+ parted -s "${TARGET}" 'mkpart primary ext4 2M -1'
# if dm-mod isn't available then kpartx will fail with
# "Is device-mapper driver missing from kernel? [...]"
else
einfo "Executing chroot-script now"
mount --bind /dev "$MNTPOINT"/dev
- chroot "$MNTPOINT" /bin/chroot-script ; RC=$?
+ if [ "$DEBUG" = "true" ] ; then
+ chroot "$MNTPOINT" /bin/sh -x /bin/chroot-script ; RC=$?
+ else
+ chroot "$MNTPOINT" /bin/chroot-script ; RC=$?
+ fi
umount "$MNTPOINT"/dev
eend $RC
fi