diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 929c145e..f4b84a3c 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -50,27 +50,22 @@ jobs: - name: Create a raw disk image run: | - dd if=/dev/zero of=disk.img bs=1M count=20480 # Create a 20 GB disk image. - loop_device=$(sudo losetup --find --partscan --show disk.img) # https://github.com/orgs/community/discussions/147257 - echo "Auto Loop Device: $loop_device" - #sudo losetup -d "$loop_device" - loop_device="/dev/loop3" + dd if=/dev/zero of=disk.img bs=1M count=15360 # Create a 15GB disk image + loop_device=$(sudo losetup --find --partscan --show disk.img) + losetup -d "$loop_device" echo "Loop Device: $loop_device" - sudo losetup "$loop_device" disk.img # Attach the file as a loopback device + losetup "$loop_device" disk.img # Attach the file as a loopback device parted -s "$loop_device" -- mklabel gpt parted -s "$loop_device" -- mkpart ESP fat32 1MiB 512MiB parted -s "$loop_device" -- set 1 esp on parted -s "$loop_device" -- mkpart primary btrfs 512MiB 100% - sed -i "s#/dev/loop0#$loop_device#g" ${{ matrix.config_installer.config_file }} - - sudo partprobe "$loop_device" || sudo losetup -c "$loop_device" - sudo udevadm settle + sed -i "s#/dev/loop0#$loop_device#g" arch.json + mknod "${loop_device}p1" b 259 0 # Manually create because hosted-runner kernel does not refresh /dev + mknod "${loop_device}p2" b 259 1 echo "System Disk Layout:" lsblk - ls -la /dev/loop3* - find /dev -type b -name 'loop*' - ls -l /dev/mapper/loop* + ls -la "$loop_device"* - name: Run the installer run: ${{ matrix.config_installer.installer }} config ${{ matrix.config_installer.config_file }}