diff --git a/scripts/create-disk.sh b/scripts/create-disk.sh index cfe7f0b..b4b42c6 100755 --- a/scripts/create-disk.sh +++ b/scripts/create-disk.sh @@ -16,6 +16,11 @@ set -euo pipefail # You should have received a copy of the GNU General Public License # along with this program. If not, see . +if [ $(id -u) = 0 ]; then + echo "Script should not be run as root, it could break something! Exiting!" >&2 + exit 1 +fi + # paths to bootcode mbr_file=build/mbr.bin vbr_file=build/vbr.bin @@ -70,6 +75,11 @@ label-id: 0xa0b0c0d0 start=$part_start, size=$((disk_sectors - part_start)), type=c, bootable EOF +mtool_src=/tmp/mtools.conf +cat > $mtool_src <