antek's tech blog - appleZola2021-01-16T00:00:00+00:00https://anadoxin.org/blog/tags/apple/atom.xmlBug Sur on Apple M12021-01-16T00:00:00+00:002021-01-16T00:00:00+00:00Unknownhttps://anadoxin.org/blog/big-sur-on-apple-m1.html/<p>I've received a new MacBook Pro with the M1 chip and I've tried to perform a "factory reset" on it (that is, wipe all user data, and reinstall the operating system to a clean state). This is how it went.</p>
<p><strong>TL;DR</strong> -- Before attempting to do anything, update your Big Sur to at least version 11.1. <strong>Don't</strong> use Disk Utility when removing the partitions; Use the "Erase Mac" function from Recovery assistant instead.</p>
<p>In order to reset the Mac to factory defaults, a reinstallation of the system needs to be performed. This can be done in various ways, booting into Recovery mode and using the "reinstall macOS" option is one of them.</p>
<p>So, I went into the Recovery mode and used this option. Few minutes later, the process failed with a cryptic error:</p>
<blockquote>
<p>An error occured preparing the update. Failed to personalise the software update. Please try again.</p>
</blockquote>
<!--image shortcode magic-->
<img alt="Failed to personalise the software update" src="https://anadoxin.org/blog/big-sur-on-apple-m1.html/error1.png" class="zoomable" data-background="var(--col-bg)"/>
<p>(Apologies for the potato quality of the photos!)</p>
<p>So, since the installer told me to "try again", I've restarted the computer, booted to Recovery once again, and tried to reinstall the system once more time. This resulted in the same error as above, so it was a no-go.</p>
<p>I've tried to update the system to the newest version. Maybe this is a known issue and it has been fixed in some update? I've booted the system normally and scheduled an update the system to the newest macOS Big Sur <code>11.1</code>. It started to download the update, but after an hour it got stuck with "15 minutes left" status. I've waited for another hour, but nothing has changed, it was still "15 minutes left". I've cancelled the update, and tried again, but after another hour it was stuck at "15 minutes left" once again. I've cancelled the update and started DuckDuckGo'ing for the solution.</p>
<p>Turned out that some people were successful with the update under Safe Mode. So I've restarted the computer and entered Safe Mode.</p>
<p>Entering Safe Mode is different on M1's. You need to power off the laptop, and then when it's powered off, you need to press the power key button and hold it. After the Boot Chooser will start, select your hard disk, and then press and hold <code>Shift</code>. The button right under the disk will change its caption to <code>Continue in Safe Mode</code>. You can click it (while still holding <code>Shift</code>), so you will boot the system in the Safe Mode.</p>
<!--image shortcode magic-->
<img alt="Screenshot of Safe Mode button" src="https://anadoxin.org/blog/big-sur-on-apple-m1.html/safemode.png" class="zoomable" data-background="var(--col-bg)"/>
<p>Under Safe Mode, I've scheduled the update. Fortunately, this helped -- the installer has passed the "15 minutes" mark, and it finished without errors. Few reboots later, I was on newest Big Sur version.</p>
<p>So, I've resumed with my original plan. Rebooted to Recovery, issued system reinstallation from there, and it succeeded. But it didn't remove any user settings, because welp, I didn't erase anything.</p>
<p>I went back to the Recovery partition, and used the 'Erase' option in Disk Utility. It succeeded without errors, and I've reinstalled macOS system again.</p>
<p>An hour later, I was finally finished. The system has been removed and reinstalled to a clean state, and the macOS first time setup has popped up. The problem was that during the Account Creation step, I was unable to create any user. I've created a few dummy users, but each time the account creation dialog has been showing me the "can't add user" error, and each error has been predated by a ~10 minute wait.</p>
<!--image shortcode magic-->
<img alt="'Can't create user' error" src="https://anadoxin.org/blog/big-sur-on-apple-m1.html/error2.png" class="zoomable" data-background="var(--col-bg)"/>
<p>Finally I've decided to restart the laptop and try again.</p>
<p>But the laptop entered the standard login screen instead of the "initial setup" screen. It has remembered all the dummy user's I've created and I could choose the one I'd like to use during login. But macOS didn't accept any password. It also didn't accept my iCloud password when I've tried to use "reset my password using iCloud" -- as it some authorization daemon was not working.</p>
<p>So, I've erased the disk again (using DiskUtil), reinstalled macOS again, tried to create the user again, with different names, different logins and different passwords, but couldn't get past that account creation dialog. I went to DuckDuckGo again and started searching for solutions.</p>
<!--image shortcode magic-->
<img alt="'Disk Utility' screenshot" src="https://anadoxin.org/blog/big-sur-on-apple-m1.html/diskutil.png" class="zoomable" data-background="var(--col-bg)"/>
<p>One solution I found was to try to reset the password of currently installed user in the system. So I've booted up the Recovery mode, entered the Terminal, and launched the 'resetpassword' tool. I've tried to reset the passwords of my dummy users, but the password reset tool has been erroring out with "authentication tool request is not supported", or something like that, so it was a dead end as well.</p>
<p>Used DuckDuckGo again. Some people were reporting success when using the "Erase Mac" option of the "resetpassword" tool. So I've restarted the computer into Recovery mode again, entered the Terminal, started "resetpassword" tool, and from the menu, I've selected the "Erase Mac" option. Few clicks later, the tool has started to "erase" the mac, and after the reboot it booted into Recovery mode automatically. Then I could run reinstallation of the system again.</p>
<!--image shortcode magic-->
<img alt="'resetpassword' screenshot" src="https://anadoxin.org/blog/big-sur-on-apple-m1.html/erasemac.png" class="zoomable" data-background="var(--col-bg)"/>
<p>Fortunately, this time I was able to create the user. It still took about 30 seconds for the "account creation tool" to create it, but I haven't encountered any major problems since this time. The system has booted properly, and works pretty well since then.</p>
<p>Ease of use? Last time I've tried to install GNU/Linux, it took maybe 10 minutes, but for Big Sur, I've wasted 6 hours.</p>
Rant about Apple's keyboard hotkey system2020-11-11T00:00:00+00:002020-11-11T00:00:00+00:00Unknownhttps://anadoxin.org/blog/rant-about-apples-keyboard-hotkey-system.html/<p>Nothing could be easier to remember and understand -- I don't understand why Windows hasn't adopted it yet.</p>
<p><code>Command</code> is generally used for command execution. But also it's used as a modification for mouse clicks. So, when you click with <code>Command</code> button active, you can sometimes get a different outcome.</p>
<p><code>Shift</code> key normally modifies letters to uppercase. But it also can be used as a modifier for commands. For example, <code>Command-P</code> displays the Print dialog, and <code>Shift-Command-P</code> will display Page Setup dialog.</p>
<p><code>Option</code> is also used as a modifier to <code>Command</code>. But not always; you can use Option as a modifier to anything. As <a href="https://developer.apple.com/design/human-interface-guidelines/macos/user-interaction/keyboard/">Human Interface Guidelines</a> writes, it can be used as a modifier to a function that is a convenience or power user function (wait, what's the nature of the "Page Setup" function?). And it will sometimes change the contents of the menus when using the mouse or touchpad (so, for each app you can actually have two menu sets, not just one). Also it's a standard modifier for using special national letters in some locales, like <code>ż</code> or <code>ó</code>. Also it can act as a modifier for mouse clicks.</p>
<p><code>Control</code> is also used as a modifier for Command, but also sometimes it's a standalone modifier for keys. But sometimes Control <em>left</em> click is used as mouse <em>right</em> click. But, <a href="https://developer.apple.com/design/human-interface-guidelines/macos/user-interaction/keyboard/">Apple Human Interface Guidelines</a> tell you to completely avoid the Control key when you create an app, because it's somehow <em>used too much</em>.</p>
<blockquote>
<p>As much as possible, avoid using the Control key as a modifier. The Control key is already used extensively throughout the system. To avoid possible conflicts, use it only when necessary.</p>
</blockquote>
<p>I bet this line exists mostly in order to differentiate macOS from Windows, because Control key is a common key in Windows!</p>
<p>Next, the <code>Fn</code> key is used as a key modifier (because <code>Control</code>, <code>Option</code> and <code>Shift</code> are apparently not enough). But also some options are launched by using the <code>Fn</code> key alone, without Command (e.g. <code>fn fn</code> will sometimes start Dictation mode). Plus, <code>Fn+ESC</code> will enable the <code>Alt</code> mode, which acts like the <code>Alt</code> key on a Windows keyboard.</p>
<p>I'll even skip the fact that the <code>Command</code> key uses an ancient Nordic symbol of protection, that was carved on stones and houses in order to protect the objects and their owners from evil spirits and bad luck. And in current times, it's used as a "<a href="https://en.wikipedia.org/wiki/Looped_square">place of cultural interest</a>" sign, which is obviously practically the same as a menu option, right?</p>
<p>And what's the symbol <code>Option</code> uses? I don't even know.</p>
<p>Why the <code>Control</code> symbol is the same as <code>Shift+6</code> symbol (both look like <code>^</code>)? Why <code>fn</code> doesn't have any symbol, despite the fact that it's a pretty heavily used button (it's used for page down/page up)? Why <code>Shift</code> uses the 'up arrow' symbol, and <code>Control</code> also uses kind of a more minimalistic up arrow?</p>
<p>Some questions are better left unanswered.</p>