Skip to content

Commit 7451707

Browse files
authored
Update interactive-defaults.ks
1 parent 687d001 commit 7451707

1 file changed

Lines changed: 38 additions & 4 deletions

File tree

‎iso/usr/share/anaconda/interactive-defaults.ks‎

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,46 @@
11
bootc --source-imgref containers-storage:ghcr.io/carletoncomputersciencesociety/arcade-machine:latest --target-imgref ghcr.io/carletoncomputersciencesociety/arcade-machine:latest
22

3-
%pre --interpreter=/bin/bash
3+
cmdline
4+
5+
%pre --erroronfail --interpreter=/bin/bash
6+
7+
# Output to TTY
8+
exec &>>/dev/tty1
9+
10+
declare -a target_disks
11+
12+
for dev in /sys/block/*; do
13+
name=$(basename "$dev")
14+
# Skip partitions (whole disks only)
15+
[ -f "$dev/partition" ] && continue
16+
# Skip removable media (USB installer, CD/DVD)
17+
removable=$(cat "$dev/removable" 2>/dev/null)
18+
[ "$removable" -eq 1 ] && continue
19+
target_disks+=("$name")
20+
done
21+
22+
count=${#target_disks[@]}
23+
24+
if [ "$count" -eq 0 ]; then
25+
echo "ERROR: No non-removable disk found. Aborting." >&2
26+
exit 1
27+
elif [ "$count" -gt 1 ]; then
28+
echo "ERROR: Multiple non-removable disks found: ${target_disks[*]}" >&2
29+
exit 1
30+
fi
31+
32+
TARGET_DISK="${target_disks[0]}"
33+
echo "Will install to $TARGET_DISK"
34+
35+
cat > /tmp/disk-include <<EOF
36+
ignoredisk --only-use=$TARGET_DISK
37+
EOF
38+
439
read -p "Press Enter to begin installation (or Ctrl+C to abort): " _
5-
%end
640
7-
cmdline
41+
%end
842

9-
ignoredisk --only-use=sda
43+
%include /tmp/disk-include
1044
zerombr
1145
clearpart --all --initlabel
1246
autopart --type=plain --fstype=xfs --nohome --noswap

0 commit comments

Comments
 (0)