Skip to content

Commit

Permalink
Update install.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
D3vil0p3r authored Dec 17, 2024
1 parent 57a2e41 commit 60ea172
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 60ea172

Please sign in to comment.