Skip to content

Instantly share code, notes, and snippets.

@startergo
startergo / MBR_boot_GPT.md
Created April 11, 2024 19:12
Boot Windows 7/8 from GPT on BIOS system : No hybrid MBRs or DUET!

The principle here is simple: Have a ready Windows installation on a partition on a GPT disk. Then add the boot files and boot record to an MBR disk, and add a bootloader entry to the BCD pointing to the Windows installation (more precisely, winload.exe) Install in BIOS mode on MBR and then convert using gptgen Install in UEFI mode using DUET. (ONLY for 64-bit!) Apply the windows install image (install.wim) using ImageX (Windows 7) or DISM (Windows 8+)on the GPT disk (best)

Next insert the Windows DVD, and that small disk, whatever it may be. Open the command prompt.

Use diskpart to verify for yourself which drives are data drives, and which is your windows boot drive. For safety, I recommend removing the drive letters of all other drives except the windows boot drive, which I'll refer to as C:, using the command :

@startergo
startergo / Startup.nsh.md
Last active April 11, 2024 17:05
enable the registers on the Macbook Pro 5,3

Put the EFI Shell as EFI_System_Partition/EFI/BOOT/Bootx64.efi and the following script as EFI_System_Partition/EFI/BOOT/Startup.nsh

REM Enabling VGA on the PCI Bridge that the NVidia card is connected to
REM Setting Bridge Control Register (0x3e) to 8
mm 0010003E 8 -PCI

REM Enabling NVidia Card "I/O Space Access" and setting it as Bus Master
REM Setting Command Register (0x04) to 7
mm 03000004 7 -PCI
@startergo
startergo / bypass_server.md
Last active April 7, 2024 17:54
Bypass Server system restrictions Virtualizing Snow Leopard

For 10.4-10.6 systems, VMware restricts the installation to only the server version. Installing the client version requires some modifications. There are two methods:

Method 1: Modify the installation image:

Add the /System/Library/CoreServices/ServerVersion.plist empty file, pretending that the server system is installing in VMware. You can use the snowyhack.sh script to process images in macOS.

#!/bin/bash
# Copyright Dave Parsons 2016
#set -x
set -e
@startergo
startergo / Vmware_cpuid.md
Last active April 8, 2024 10:16
VMware core 2 duo processor emulation

https://forums.macrumors.com/threads/mac-os-x-10-4-tiger-on-a-modern-intel-mac-virtualization.2162582/ Vmware version has to be downgraded to less than 19 virtualHW.version = "18"

virtualHW.version = "18"
cpuid.inhibitDarwinMasks = "TRUE"
monitor_control.enable_fullcpuid = "TRUE"
cpuid.0.eax = "0000:0000:0000:0000:0000:0000:0000:1010"
cpuid.0.ebx = "0111:0101:0110:1110:0110:0101:0100:0111"
cpuid.0.ecx = "0110:1100:0110:0101:0111:0100:0110:1110"
cpuid.0.edx = "0100:1001:0110:0101:0110:1110:0110:1001"
@startergo
startergo / workaround.md
Last active March 25, 2024 11:05
Workaround for 0x80300024 Error In Windows 10/11 Setup

Workaround for 0x80300024 Error In Windows 10/11 Setup

During the installation of Windows 10 or Windows 11, on the partition creation and formatting page, you may encounter error 0x80300024. This error occurs on hardware configurations with multiple hard drives or SSDs. It is caused by inability of Windows Setup to correctly recognize which internal storage device is bootable.

But there is a workaround for error 0x80300024: by manually transferring the bootloader, BCD registry hive and bootable ramdisk to internal bootable storage device and booting from that device, we can hint Windows Setup which of the multiple internal storage devices is bootable. Windows installation will then proceed as usual.

Contents

  1. Symptoms of the problem
  2. Cause of this problem
  3. Solution in a nutshell
@startergo
startergo / macOS_dmg_create.md
Last active February 24, 2024 05:01
macOS DMG Deployment Workflow
  • Create a sparse image:
hdiutil create -size 32g -type SPARSE -fs HFS+J -volname "Macintosh HD" ~/Desktop/mountainlion_12f37_user.sparseimage
  • Mount the image:
hdiutil attach -owners on -noverify ~/Desktop/mountainlion_12f37_user.sparseimage
  • Mount the Installer:
@startergo
startergo / appstore_downlload.md
Created February 24, 2024 02:50
Command to open the App Store Download folder
  • On Mojave use this command to open the App Store Download folder:
open $TMPDIR../C/com.apple.appstore/
  • On Catalina use this command to open the App Store Download folder:
open $TMPDIR../C/com.apple.appstoreagent/com.apple.appstore/
  • Script for automation:
@startergo
startergo / Wazuh_macos.md
Last active February 16, 2024 20:19
Remove Wazuh client agent
  • Remove agent:
pkgutil --pkgs | grep wazuh
com.wazuh.pkg.wazuh-agent-etc
com.wazuh.pkg.wazuh-agent 
rm -rf /Library/Ossec
rm -rf /Library/StartupItems/WAZUH
rm -f /Library/LaunchDaemons/com.wazuh.agent.plist
rm -f /private/etc/ossec-init.conf
pkgutil --forget com.wazuh.pkg.wazuh-agent-etc
@startergo
startergo / osx-software-update-urls-10.3-to-14.txt
Created February 3, 2024 15:32 — forked from b0gdanw/osx-software-update-urls-10.3-to-14.txt
URLs of the index files used by the software update client on OS X
10.3 (Panther):
https://swscan.apple.com/scanningpoints/scanningpointX.xml
10.4 (Tiger):
https://swscan.apple.com/content/catalogs/index.sucatalog
https://swscan.apple.com/content/catalogs/index-1.sucatalog
10.5 (Leopard):
https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog
@startergo
startergo / safari_elcapitan.md
Created February 3, 2024 15:30
Safari 11.1.2 pkg for El Capitan
http://swcdn.apple.com/content/downloads/17/47/041-90821-A_G48H0SPB75/023eolmp0oepnvlgt92lh3l9iscqjwc39e/Safari11.1.2ElCapitan.pkg