#!/bin/bash function first_stage(){ echo foo first_stage apt install debootstrap lsblk -fTpo NAME,FSTYPE,LABEL,UUID,FSAVAIL,MOUNTPOINT select DEVICE in $(lsblk -frpno NAME); do echo using $DEVICE continue done echo mkfs.ext4 ${DEVICE}p1 mkfs.ext4 ${DEVICE}p1 mount ${DEVICE}p1 $TARGET echo mount ${DEVICE}p1 $TARGET echo debootstrap sid $TARGET debootstrap sid $TARGET #choose_dialog } function second_stage(){ echo bar second_stage passwd echo -n > /etc/motd }