-r, --release <name> Release of new Debian system (default: stable).
-t, --target <target> Target partition (/dev/...) or directory.
-p, --mntpoint <mnt> Mountpoint used for mounting the target system.
- --debopt <params> Extra parameters passed to the debootstrap.
+ --debopt <params> Extra parameters passed to the debootstrap command.
--interactive Use interactive mode (frontend).
--nodebootstrap Skip debootstrap, only do configuration to the target.
--groot <device> Root device for usage in grub, corresponds with
# create filesystem {{{
mkfs() {
+ if grep -q $TARGET /proc/mounts ; then
+ eerror "$TARGET already mounted, exiting to avoid possible damage. (Manually unmount $TARGET)" ; eend 1
+ exit 1
+ fi
+
if [ -n "$MKFS" ] ; then
einfo "Running $MKFS on $TARGET"
$MKFS $TARGET
einfo "Running grml-debootstrap on a directory, nothing to mount."
else
if grep -q $TARGET /proc/mounts ; then
- eerror "$TARGET already mounted, exiting."
+ ewarn "$TARGET already mounted, continuing anyway." ; eend 0
else
[ -d "$MNTPOINT" ] || mkdir -p "$MNTPOINT"
einfo "Mounting $TARGET to $MNTPOINT"