From 82c27b7221723f87d338f9c644715bb6ef2b055b Mon Sep 17 00:00:00 2001 From: Artur Gurgul1 Date: Sun, 10 Aug 2025 08:05:57 +0200 Subject: [PATCH] Fix bug with umounting --- bin/make-winux | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/bin/make-winux b/bin/make-winux index d579ad8..3a8343d 100755 --- a/bin/make-winux +++ b/bin/make-winux @@ -12,7 +12,7 @@ function wxumount { mkdir -p $1 if mountpoint -q $1; then echo "Unmounting $1..." - umount /mnt/winux + umount $1 if [ $? -eq 0 ]; then echo "Successfully unmounted $1." else @@ -64,18 +64,15 @@ export WINUX_LOOP_DEV="$(losetup --find --show -P $WINUX_LOOP_DEV)" mkfs.ext2 ${WINUX_LOOP_DEV}p1 +tune2fs ${WINUX_LOOP_DEV}p1 -U 1be261e2-a12d-4468-aa45-cbd7e68636eb + mount ${WINUX_LOOP_DEV}p1 /mnt/winux ## The image is formatted and ready to copy files over - export LINUX_LOOP_DEV="$(losetup --find --show --partscan $LINUX_DISK_IMG)" - -tune2fs ${WINUX_LOOP_DEV}p1 -U 1be261e2-a12d-4468-aa45-cbd7e68636eb - mount ${LINUX_LOOP_DEV}p1 /mnt/linux - # copying files cd /mnt/linux @@ -95,7 +92,7 @@ tar --numeric-owner --xattrs --acls -cpf - \ #### TESTTING CODE -losetup -j $WINUX_DISK_IMG +# losetup -j $WINUX_DISK_IMG # Clean up after building @@ -110,10 +107,6 @@ for dev in $(losetup -j $LINUX_DISK_IMG | cut -d: -f1); do losetup -d "$dev" done - -# Create an archive -# - echo "making the archive" # Best compressing rato, but slow and memory hungry (I LIKE IT)