Fix SSH choice and image build safeguards

This commit is contained in:
Storm Dragon
2026-07-17 00:12:40 -04:00
parent da26909527
commit b2d6cdc25d
4 changed files with 42 additions and 6 deletions
+3 -2
View File
@@ -29,9 +29,10 @@ The script is designed for an x86_64 Arch host so it can emulate ARM binaries wi
## Building Your First Image
1. Become root (`sudo -i`) so the script can create loop devices and mount them.
2. From `/path/to/stormux`, run:
2. From the Pi builder directory, run:
```bash
sudo ./pi4/build/build-stormux.sh -l en_US -s 8
cd /path/to/stormux/pi4/build
sudo ./build-stormux.sh -l en_US -s 8
```
- The builder creates an aarch64 image for Raspberry Pi 4/5-class systems.
- `-l en_US` selects the locale (use `es_ES`, `fr_FR`, etc.).
+32
View File
@@ -236,6 +236,38 @@ if [ "$(whoami)" != "root" ] ; then
exit 1
fi
# Refuse to mount the image over an unrelated filesystem already using /mnt.
if ! command -v mountpoint > /dev/null 2>&1; then
echo "Error: mountpoint is required to verify that /mnt is available."
exit 1
fi
if [[ ! -d /mnt || ! -w /mnt ]]; then
echo "Error: /mnt is missing or not writable. Please create or fix permissions."
exit 1
fi
if mountpoint -q /mnt; then
if [[ -t 0 ]]; then
read -rp "/mnt is already mounted. Unmount it to continue? [y/N] " answerText
case "$answerText" in
y|Y|yes|YES)
if ! umount /mnt; then
echo "Error: Failed to unmount /mnt."
exit 1
fi
;;
*)
echo "Error: Refusing to proceed while /mnt is mounted."
exit 1
;;
esac
else
echo "Error: /mnt is already mounted. Refusing to proceed in non-interactive mode."
exit 1
fi
fi
# make sure the needed tools are installed
if [[ "$(uname -m)" == "x86_64" ]]; then
if ! pacman -Q qemu-user-static &> /dev/null ; then