From ba7fb05342eb1e5ec1388c36d49ecf13755e46f9 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 21 Oct 2025 18:58:12 +0200 Subject: [PATCH 1/6] Replace mkdir with makeDir for storage directory --- src/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install.sh b/src/install.sh index 581d38b8..3da44305 100644 --- a/src/install.sh +++ b/src/install.sh @@ -155,7 +155,7 @@ install() { esac rm -f "$dest" - mkdir -p "$STORAGE" + makeDir "$STORAGE" find "$STORAGE" -maxdepth 1 -type f \( -iname '*.rom' -or -iname '*.vars' \) -delete find "$STORAGE" -maxdepth 1 -type f \( -iname 'data.*' -or -iname 'macos.*' \) -delete From 13d44e6204b50cc1510c9b31bd0fdc23e3ce0fe7 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 21 Oct 2025 19:48:45 +0200 Subject: [PATCH 2/6] Update boot.sh --- src/boot.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/boot.sh b/src/boot.sh index 2fc8400a..48a324e0 100644 --- a/src/boot.sh +++ b/src/boot.sh @@ -51,12 +51,14 @@ if [ ! -s "$DEST.rom" ] || [ ! -f "$DEST.rom" ]; then /run/utk.bin "$OVMF/$ROM" replace_ffs LogoDXE "/var/www/img/${PROCESS,,}.ffs" save "$DEST.tmp" fi mv "$DEST.tmp" "$DEST.rom" + ! setOwner "$DEST.rom" && error "Failed to set the owner for \"$DEST.rom\" !" fi if [ ! -s "$DEST.vars" ] || [ ! -f "$DEST.vars" ]; then [ ! -s "$OVMF/$VARS" ] || [ ! -f "$OVMF/$VARS" ]&& error "UEFI vars file ($OVMF/$VARS) not found!" && exit 45 cp "$OVMF/$VARS" "$DEST.tmp" mv "$DEST.tmp" "$DEST.vars" + ! setOwner "$DEST.vars" && error "Failed to set the owner for \"$DEST.vars\" !" fi BOOT_OPTS+=" -drive if=pflash,format=raw,readonly=on,file=$DEST.rom" @@ -158,6 +160,8 @@ if [ ! -f "$IMG" ]; then fi +! setOwner "$IMG" && error "Failed to set the owner for \"$IMG\" !" + BOOT_DRIVE_ID="OpenCore" DISK_OPTS+=" -device virtio-blk-pci,drive=${BOOT_DRIVE_ID},bus=pcie.0,addr=0x5,bootindex=$BOOT_INDEX" From 11078c6eec078f0279a58b01f13bfd26742cb7f0 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 21 Oct 2025 19:54:33 +0200 Subject: [PATCH 3/6] Update install.sh --- src/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/install.sh b/src/install.sh index 3da44305..89be17f1 100644 --- a/src/install.sh +++ b/src/install.sh @@ -191,7 +191,9 @@ generateID() { UUID=$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random) UUID="${UUID^^}" UUID="${UUID//[![:print:]]/}" + echo "$UUID" > "$file" + ! setOwner "$file" && error "Failed to set the owner for \"$file\" !" return 0 } @@ -208,7 +210,9 @@ generateAddress() { # Generate Apple MAC address based on Docker container ID in hostname MAC=$(echo "$HOST" | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/00:16:cb:\3:\4:\5/') MAC="${MAC^^}" + echo "$MAC" > "$file" + ! setOwner "$file" && error "Failed to set the owner for \"$file\" !" return 0 } @@ -239,6 +243,9 @@ generateSerial() { echo "$SN" > "$file" echo "$MLB" > "$file2" + ! setOwner "$file" && error "Failed to set the owner for \"$file\" !" + ! setOwner "$file2" && error "Failed to set the owner for \"$file2\" !" + return 0 } @@ -262,6 +269,7 @@ if [ ! -f "$BASE_IMG" ] || [ ! -s "$BASE_IMG" ]; then if [ ! -f "$BASE_IMG" ] || [ ! -s "$BASE_IMG" ]; then ! install "$VERSION" "$BASE_IMG" && exit 34 + ! setOwner "$BASE_IMG" && error "Failed to set the owner for \"$BASE_IMG\" !" fi fi From 96813876f37350f7368e6a65e4b69f6440bb2ed0 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 21 Oct 2025 19:56:59 +0200 Subject: [PATCH 4/6] Update install.sh --- src/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/install.sh b/src/install.sh index 89be17f1..37d00ad0 100644 --- a/src/install.sh +++ b/src/install.sh @@ -155,7 +155,10 @@ install() { esac rm -f "$dest" - makeDir "$STORAGE" + + if ! makeDir "$STORAGE"; then + error "Failed to create directory \"$STORAGE\" !" && return 1 + fi find "$STORAGE" -maxdepth 1 -type f \( -iname '*.rom' -or -iname '*.vars' \) -delete find "$STORAGE" -maxdepth 1 -type f \( -iname 'data.*' -or -iname 'macos.*' \) -delete From a4d4366a6906fbeafa3da2305ea82404844658fd Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 22 Oct 2025 03:58:06 +0200 Subject: [PATCH 5/6] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index e53ce146..da51411c 100644 --- a/readme.md +++ b/readme.md @@ -146,7 +146,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/macos/refs/heads/maste ``` > [!IMPORTANT] -> If your system has an AMD processor it is generally not advisable to enable multiple cores (at least not until macOS is installed and running correctly). It might introduce stability and performance problems, so proceed with caution. +> If your system has an AMD processor (instead of Intel), it is not advisable to enable multiple cores before the installation is completed and you have verified that everything runs stable for a while. Because in many cases it will introduce issues, which are difficult to pinpoint if you do not have experience with its behaviour on a single core first. ### How do I assign an individual IP address to the container? From 15d4ec972b51451103cca3925bb352f2dbd950c9 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 22 Oct 2025 04:01:29 +0200 Subject: [PATCH 6/6] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 0d987a0f..366ae016 100644 --- a/readme.md +++ b/readme.md @@ -146,7 +146,7 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/macos/refs/heads/maste ``` > [!IMPORTANT] -> If your system has an AMD processor (instead of Intel), it is not advisable to enable multiple cores before the installation is completed and you have verified that everything runs stable for a while. Because in many cases it will introduce issues, which are difficult to pinpoint if you do not have experience with its behaviour on a single core first. +> If your system has an AMD processor (instead of Intel), it is not advisable to enable multiple cores before the installation is completed and you have verified that everything runs stable for a while. Because in many cases it will introduce issues, which are difficult to pinpoint if you do not have experience with its behavior on a single core first. ### How do I assign an individual IP address to the container?