Category: macos

Macbook Pro unable to reinstall from Time Machine

Macbook Pro unable to reinstall from Time Machine

The reinstallation was hung with following message:

Preparing to restore "Machintosh HD"...

After a few hours, still the same. Hard reboot later found that no modification in old OS, even requested erasing the disk.

Actions taken

Formatted disk before retry, got same issue.

Possible issue

The possible issue could be that the Mac can not reach Time Machine backup, because there is no blinking of the backup USB disk.

Solution

Install fresh OS, then start performing OS transfer from Time Machine backup.

Install brew in MacOS 10.13.6

Install brew in MacOS 10.13.6

Steps

Download following packages, install first two packages.

Xcode_10.1.xip
Command_Line_Tools_macOS_10.13_for_Xcode_10.1.dmg
Kernel_Debug_Kit_10.13.6_build_17G10017.dmg
Swift_5_Runtime_Support_for_Command_Line_Tools.dmg
Swift_Playgrounds_Author_Template_for_Xcode_10.xip
Font_Tools_for_Xcode_11.dmg
Additional_Tools_for_Xcode_10.1.dmg

Run following command to install

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

References

All Downloads
Install Homebrew · Mac M1

iMac waked up regularly

iMac waked up regularly

My iMac keeps waking up, although this wasn't a problem for my Mac mini, it is an issue for my iMac. The difference between is, iMac got very annoying fan noise, even no activity.

Many factors

There are so many factors to wake iMac up according to Apple, but I think the may reason is Timemachine. The option of Wake for network access in Energy Saver is for the tasks to be taken during sleep, including Timemachine. But this option is related to wake up on LAN as well, then if I need WoL, I can not turn off this option.

There is also no Do not disturb option in my this iMac, it has older macOS High Sierra.

Issue

The actual issue caused annoying problem, is Timemachine has no scheduling.

Another issue

Unlike some other OS, iMac won't maintain ssh connection after sleeped. This is a huge issue to me because I use ssh heavily. Thinking to configure VPN, and use VPN to connect to other servers, maybe can maintain connection.

References

If your Mac sleeps or wakes unexpectedly

Turn off iMac Display Only

Turn off iMac Display Only

The iMac might not auto sleep sometimes, so what do you like to do before you go for quick snack? Turn off iMac display only. But there is not switch on monitor, luckily there are some ways to do.

Keyboard with Eject key

  • Control + Shift + Eject

Keyboard with Power key

  • Control + Shift + Power

Keyboard without Eject/Power

Go to login screen

  • Control + Command + Q

Then at the login screen

  • Escape

Keyboard with Touch Bar

Configure

  • Select System Preferences
  • Open Keyboard
  • Click Customize Control Strip...
  • Drag Screen Lock icon into the Touch Bar
  • Click Done.

Perform

Go to login screen

  • Tap the the Screen Lock icon on your Touch Bar

Then at the login screen

  • Escape to turn off the display immediately.

Mouse

Configure

  • Select System Preferences
  • Open Mission Control
  • Click Hot Corners
  • Choose Put Display to Sleep for one of the corner

Perform

  • Move your mouse to the corner configured

Terminal

Run the following command:

pmset displaysleepnow

References

[How to Turn Off Your Mac's Display Without Putting Your Computer to Sleep}(https://www.iclarified.com/76166/how-to-turn-off-your-macs-display-without-putting-your-computer-to-sleep)

Reconfigure iCloud in MacOS

Reconfigure iCloud in MacOS

Many days headache was fixed this morning...

Story

The problem with iCloud on my newly installed MacOS, which is High Sierra, 10.13.6, out of support by Apple.

The machine was installed via Internet, and the MacOS was Mountain Lion, then upgraded to High Sierra, the lastest can be installed in this 2011 iMac.

Issue

When connecting to iCloud at beginning, the iCloud can not sync Keychains, it is quite an issue for me, because I need to register all credentials to this iMac separately.

Then I decided to reconfigure iCloud by re-login to iCloud again.

But iCloud could not be registered any more after logout, I thought it could be issue with my unsupported OS.

Symptom

The symptom was repeating asking for iCloud user and password, no matter which iCloud I like to use. In the email account list, the account is just appear in very short period, then closed immediately.

Fix

This morning I tried to send email, found out that I could not add iCloud account, I decided to search solution in Internet.

The solution works for delete all files related to iCloud and system configuration. It is works for my newly configured iMac, because I have nothing in it.

Steps

Run following commands in terminal

rm ~/Library/Application Support/iCloud
rm ~/Library/Preferences/com.apple.systempreferences.plist01
rm ~/Library/Keychains

Then reboot

sudo reboot

References

Mac Can’t Connect to iCloud? Here Are 7 Ways to Fix It

Remap Windows keyboard to Mac layout

Remap Windows keyboard to Mac layout

MacOS keyboard preference can remap keys for individual keyboard. This is not a global key remapping, it will not impact other keyboards except the one selected.

Steps

  • Go to System Preferences
  • Click on Keyboard
  • Click on Modifier Keys
  • Select keyboard to be modified in Select keyboard option
  • Map Option key to Command key, and Command key to Option key

How-To: Remap Windows keyboards to match the Mac keyboard layout

Add root certificate to MacOS

Add root certificate to MacOS

If you have your own root certificate like I do, the follow the steps below to add it in MacOS.

Browser vs OS level installation

When accessing a server which signed using your own root certificate, if it isn't installed locally, browser will prompt the warning. Then need to select trust the certifcate in order to continue.

This action only trust that machine certificate in the browser, it only does

  • Trust the machine certificate, not the root certificate
  • Only trust in the browser currently used

The benefit of installing root certificate OS level are

  • All applications will trust certificate
  • Only one time installation required
  • Trusted for all users in the system (Not Firefox Browser)

Download certificate

Provide by issuer

Go to issuer software, such as Synology NAS, download from certificate store, and extract CA certificate, such as example-ca-cert.pem.

From browser with root certificate

The root certificate can be downloaded from browser if the brower has been installed. For example, in Firefox,

  • Click on lock icon besides URL => connection secure => more information, then Page Info window appears
  • Click on View Certificate in Security tab, then certificate information page is displayed as a new browser tab.
  • Look for chain certificate. In Firefox, it is under Miscellaneous => Download PEM (chain)
  • Click on chain certificate and save it locally.

Note: The downloaded certificate file contains both server certificate and root certificate. Delete server certificate using text editor if possible. If the server certificate had been installed in keychain, it can be removed from keychain later too

Install certificate

Use following steps to install CA certificate into keychain

  • Double click the certificate file (with ".pem" or ".cer" extension)
  • Choose "System" from the keychain option. Then press "Add" to install after password provided

Set certificate "Always Trust"

To set system wide trust, use following steps.

  • Open Keychain Access application
  • Look for root certificate, double click it
  • Expand Trust section
  • Select "Always Trust" from list of When using this certificate.

Delete server certificate if needed

If the server certificate was also installed, suggest to delete it from keychain and browser certificate store. This is to avoid false information about successful installation.

  • Open Keychain Access application
  • Look for server certificate
  • Right click on it, then select delete certificate

Firefox Only

In Firefox, which has its own certificate store, the system certificates are not accepted. So use following steps to enable system certificates to be used for current user.

  • Open new tab, and type about:config
  • Search for security.enterprise_roots.enabled
  • Change it to true by double click the line.

Note: This only enable trust for current user

Reboot

Verify

Use browser to access another website which has the same root certificate, the certificate not trusted page should not appear.

References

FAQ: How to add root certificate to Mac OS X

iMac 27″ Mid 2011 OS reinstallation

iMac 27" Mid 2011 OS reinstallation

In order to reinstall OS, I searched Internet, and no one tell the truth, let me spent a few hours. I'm also not sure my method will work later or not. Need to think a way to create local bootable disk.

Keyboard and Mouse

I don't have wired apple keyboard and mouse, so used Windows keyboard. It doesn't have Command key, but searching internet, found the Intel iMac can use Command or Alt. Yes, Alt works, can display boot option.

Installation Method

Missing installation CD (Failed)

After a few relocation, I could not find the installation CD, it is at least hard to find, decided to create an installation USB.

Installation USB (Failed)

My new iMac mini has OS Big Sur, I tried methods given by Apple, none of them can work.

I created Big Sur bootable USB, but when tried to install, gave me stop sign.

I tried to click the links to download old MacOS from Apple, they don't work at all.

I tried to download OS image from other website, they can not be executed and run Apple given command, because they are for different OS.

I tried use Daemon Tools to create bootable USB from dmg file, in fact, not working.

Internet (Good)

When I kept finding methods to create bootable image, suddenly, the iMac display installation utilities after boot, which means installation can be continue without installation media, this is good feature of iMac.

Disk to be installed

Got funny issue, can not detect my SSD, I thought the SATA connection issue. Open it and reconnected it, tested on external USB, suddenly found the disk can be detected by Disk Utility. Then thought again, noticed that the disk needs to be erased.

OS upgrade and patching

After installation completed, it is running Mount Lion, very old OS, then App Store update got issue, can not update software patch.

After search internet, found High Sierra can be installed, then clicked on Apple OS installation link which was work before, it works.

Not completed, there are quite number of patches to be installed, although take long time, the actual installation time reported by installation process is much longer, about 15 mintues reduced to two or three minutes, this is the benefit of SSD disk.

Backup

To avoid spending too much time next time, I decided to create installation media image and perform backup.

After opened time machine disk selection window, the AFP enabled NAS immediately appear, but not the SMB only NAS. Manual mapping/accessing of disk is required before Time machine could see it.

El Capitan:

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia -

Appendices

Media Creation

The commands are given by Apple as below for media creation.

Beware: They can not work with OS which is different than current.

Big Sur:*

sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

Catalina:*

sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

Mojave:*

sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

High Sierra:*

sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

References

How to create a bootable installer for macOS