肇鑫的日常博客

日常

修改Mac中iOS/iPadOS设备默认备份的位置

起因

我的iCloud只买了50G的,其中iPhone和iPad的备份占了大头。终于有一天,提示空间不够了,要加钱。于是我选择手动备份iPad,但是我发现,苹果默认备份是在主磁盘,并且没有改存储设置的选项。让一个很少用到的备份,占用主磁盘,实在是太不划算了。于是我查找修改的办法。

原理

访达中默认备份的位置是~/Library/Application\ Support/MobileSync/Backup文件夹。我们只需要将这个位置通过ln转移到我们需要的位置即可。

实践

  1. 打开访达(Finder),按下cmd+shift+o,输入~/Library/Application\ Support/MobileSync/,跳转到这个文件夹。
  2. 如果上面的文件夹不存在,就创建一个,名字一定要拼对。
  3. 查看底下是否有Backup文件夹,如果有,执行4、5、6。如果没有执行4、6。
  4. 打开另一个访达窗口,找到你想要保存备份的文件夹位置,我这里是/Volumes/1T/MobileSync/Backup/
  5. 将3中Backup内部的文件夹复制并粘贴到4的文件夹中。完成后,删掉3中的Backup文件夹。
  6. 打开一个终端(Terminal),输入命令ln -s /Volumes/1T/MobileSync/Backup/ ~/Library/Application\ Support/MobileSync/Backup
  7. 在Finder中点击备份,你会看到新备份保存在指定的位置了。

参考

SSH升级后,key自动发生变化导致不能自动登录问题的处理

最近遇到一个奇怪的问题,原本能够通过key自动登录的ssh,突然不能登录了。

经过调查,我发现原本的key类型是“ecdsa-sha2-nistp256”,但是服务器现在要求的key是“ed25519”类型。此时在客户端(本机),删除掉“~/.ssh/config”和“~/.ssh/known_hosts”里对应的服务器端的信息。重新用ssh连接。此时,虽然不能自动登录,但是可以通过密码登录。

登录成功后,在服务器端修改“vi .ssh/authorized_keys ”。将原本的“ecdsa-sha2-nistp256”类型的key,替换为“ed25519”的新key。保存并关闭。

重新用ssh登录,这下自动登录又好用了。

生成“ed25519”的方法,可以看github的说明

结论

从上个月起,github改变了策略,新上传的key必须是“ed25519”类型,之前的类型不再接受。一些Linux发行版也采用了类似的策略。但是,自动改变的类型,导致之前能自动登录的不能成功,这的确造成了一些问题。

More Details On Installing macOS Monterey 12 Beta On Unsupported Macs

If you want to install macOS Monterey on your Mac and you Macs are not officially supported by Apple. I suggest you to follow this video.

Monterey on Unsupported Mac - OpenCore Legacy Patcher! Install the Latest Beta on 2012-2014 Macs!!!

I installed two of my Macs to macOS Monterey 12 beta 2 today, and I found for beginners that video was not enough. There were also something important that were missing. That was this article for.

Foundation Knowledges

Before installing the system, it is better to know how the booting process works.

Normal Boot With a Internal SSD

normal booting

When a user presses the power button, a Mac searches all disk partitions. The EFI partitions normal are hidden and load first by default. So If a user chooses to boot from the internal SSD, the EFI are loaded first and then the APFS partition.

There are hardware related drivers on the EFI and this affects the macOS that loads after EFI. This is very important. So keep the EFI of you internal SSD and don't override them unless you are 100% certain.

Booting With Installing USB Disk

booting with usb disk

After a user presses the power button, the user hold the Options button of the keyboard until a list shows. The list shows the Internal SSD, the EFI and macOS Monterey Installer on the USB Disk as well.

The user has to choose the EFI first then choose the macOS Monterey Installer. If the user chooses the Installer first, the system will show no disk error as the driver is not ready.

Installing macOS To External SSDinstalling to external SSD

Installing to external SSD is as easy as to choose the external SSD. However, after installing, you should install the EFI by OpenCore Legacy Patcher to the external SSD as well.

dual booting

Conclusion

Installing macOS on an unsupported Mac means installing both EFI and macOS on the Mac. Without the EFI, the Mac won't boot properly with the new macOS.

Others

You will need at least 35GB free space to install macOS Monterey 12 beta 2.

For your USB disk, partition it in GUID format. It is request to use EFI with GUID.

For iMac 5K users, DO NOT install EFI on your internal SSD. Or your screen will only get resolution at 3840x2160 most, even on macOS Big Sur 11.4. That is because currently the EFI by third-party can't do as well as Apple's.