差異處
這裏顯示兩個版本的差異處。
| 下次修改 | 前次修改 | ||
| macos [2019/09/08 13:59] – 建立 jz | macos [2024/06/02 15:48] (目前版本) – jz | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== Macos ====== | ====== Macos ====== | ||
| + | |||
| + | ===== Software ===== | ||
| + | |||
| + | [[https:// | ||
| ===== System ===== | ===== System ===== | ||
| 行 7: | 行 11: | ||
| < | < | ||
| csrutil status | csrutil status | ||
| + | </ | ||
| + | |||
| + | ==== Power Management ==== | ||
| + | < | ||
| + | pmset -b standbydelaylow 900 | ||
| + | pmset -b standbydelayhigh 10800 | ||
| + | pmset -b tcpkeepalive 0 | ||
| + | pmset -g | ||
| + | </ | ||
| + | |||
| + | ==== Disk Util ==== | ||
| + | < | ||
| + | diskutil list | ||
| + | diskutil unmount | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | diskutil partitionDisk /dev/disk7 MBR fat32 " | ||
| + | </ | ||
| + | |||
| + | ==== USB Serial ==== | ||
| + | < | ||
| + | ioreg -p IOUSB -l -b | grep -E " | ||
| + | </ | ||
| + | |||
| + | ==== DNS server ==== | ||
| + | < | ||
| + | scutil --dns | ||
| + | </ | ||
| + | |||
| + | ==== Route ==== | ||
| + | < | ||
| + | route -n get default www.google.com | ||
| + | route -n get default | ||
| + | netstat -rn | ||
| + | </ | ||
| + | |||
| + | == Dual boot == | ||
| + | Holding Option key on boot to switch boot drive. | ||
| + | Holding Ctrl key and the icon will change, this set the default boot drive. | ||
| + | |||
| + | == Set Disk Label == | ||
| + | < | ||
| + | diskutil list | ||
| + | sudo diskutil mount disk0s1 # mount EFI partition | ||
| + | sudo bless --folder / | ||
| + | </ | ||
| + | |||
| + | ===== Set Disk Icon ===== | ||
| + | < | ||
| + | csrutil disable # in recovery mode | ||
| + | |||
| + | ## For macOS icon | ||
| + | ### find the preboot partition | ||
| + | sudo diskutil apfs list | ||
| + | ### mount the preboot partition | ||
| + | sudo diskutil mountDisk / | ||
| + | ### copy icon | ||
| + | sudo cp / | ||
| + | |||
| + | ## For Windows icon | ||
| + | ## mount the EFI parititon | ||
| + | sudo diskutil mountDisk / | ||
| + | ### copy icon | ||
| + | sudo cp / | ||
| + | |||
| + | csrutil enable # in recovery mode | ||
| + | </ | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | ==== Bootcamp ==== | ||
| + | Download bootcamp driver from | ||
| + | - https:// | ||
| + | - Apple' | ||
| + | |||
| + | === Macbook Pro mid 2012 === | ||
| + | Install Windows 10 with EFI. | ||
| + | Fix audio driver issue | ||
| + | https:// | ||
| + | |||
| + | Download Tools. | ||
| + | Windows Binary Tools (WBT - Dec 2016) extracted to c:\dsdt directory. | ||
| + | https:// | ||
| + | |||
| + | Windows Driver Kit (WDK), which contains the Windows ASL Compiler (asl.exe) | ||
| + | https:// | ||
| + | |||
| + | < | ||
| + | mkdir c:\dsdt | ||
| + | c: & cd \dsdt | ||
| + | set 64bit_OS_asl=" | ||
| + | set 32bit_OS_asl=" | ||
| + | copy /y %32bit_OS_asl% c:\dsdt > nul & copy /y %64bit_OS_asl% c:\dsdt > nul | ||
| + | if not exist c: | ||
| + | c: & cd \dsdt | ||
| + | acpidump -b -z | ||
| + | asl /u dsdt.dat | ||
| + | copy dsdt.asl dsdt-modified.asl | ||
| + | </ | ||
| + | |||
| + | Modify dsdt-modified.asl | ||
| + | < | ||
| + | DWordMemory (ResourceProducer, | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | ,, , AddressRangeMemory, | ||
| + | // - ADD THIS SECTION --------------------------------------------------------------------------- | ||
| + | QWordMemory (ResourceProducer, | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | ,, , AddressRangeMemory, | ||
| + | // ---------------------------------------------------------------------------------------------- | ||
| + | }) | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | c: & cd \dsdt | ||
| + | asl /loadtable dsdt-modified.aml | ||
| + | bcdedit -set TESTSIGNING ON | ||
| + | </ | ||
| + | |||
| + | Remove test mode watermark for Windows. | ||
| + | [[https:// | ||
| + | |||
| + | |||
| + | === Fixing hybrid MBR === | ||
| + | |||
| + | https:// | ||
| + | |||
| + | GPT | ||
| + | < | ||
| + | Create a protective MBR which covers the whole disk. | ||
| + | Command (? for help): x | ||
| + | |||
| + | Expert command (? for help): n | ||
| + | |||
| + | Expert command (? for help): o | ||
| + | |||
| + | Disk size is 3907029168 sectors (1.8 TiB) | ||
| + | MBR disk identifier: 0x00000000 | ||
| + | MBR partitions: | ||
| + | |||
| + | Number | ||
| + | | ||
| + | </ | ||
| + | |||
| + | Hybrid MBR | ||
| + | < | ||
| + | Recovery/ | ||
| + | |||
| + | WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one, | ||
| + | just hit the Enter key at the below prompt and your MBR partition table will | ||
| + | be untouched. | ||
| + | |||
| + | Type from one to three GPT partition numbers, separated by spaces, to be | ||
| + | added to the hybrid MBR, in sequence: 2 3 4 | ||
| + | Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y | ||
| + | |||
| + | Creating entry for GPT partition #2 (MBR partition #2) | ||
| + | Enter an MBR hex code (default AF): AF | ||
| + | Set the bootable flag? (Y/N): n | ||
| + | |||
| + | Creating entry for GPT partition #3 (MBR partition #3) | ||
| + | Enter an MBR hex code (default 07): 07 | ||
| + | Set the bootable flag? (Y/N): y | ||
| + | |||
| + | Creating entry for GPT partition #4 (MBR partition #4) | ||
| + | Enter an MBR hex code (default 07): 07 | ||
| + | Set the bootable flag? (Y/N): n | ||
| + | |||
| + | Recovery/ | ||
| + | |||
| + | Disk size is 3907029168 sectors (1.8 TiB) | ||
| + | MBR disk identifier: 0xFDB98627 | ||
| + | MBR partitions: | ||
| + | |||
| + | Number | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ==== Create Install Disk for Windows 10 ==== | ||
| + | [[https:// | ||
| + | < | ||
| + | # GPT | ||
| + | diskutil eraseDisk MS-DOS " | ||
| + | # MBR | ||
| + | diskutil eraseDisk MS-DOS " | ||
| + | |||
| + | hdiutil mount ~/ | ||
| + | rsync -vha --exclude=sources/ | ||
| + | brew install wimlib | ||
| + | mkdir / | ||
| + | wimlib-imagex split / | ||
| </ | </ | ||