Rebuild Macbook Air - Feb 2023 Long Overdue
scottmuc opened this issue · 3 comments
Yay for Repaving!
As much as possible is documented inline in this issue template. In case of problems you may find help by viewing
all the previous repave issues. Have fun!
Things to do with the existing build
-
Create USB stick with latest macOS
Instructions
-
Format a USB (> 16GB) stick and name it UNTITLED
-
Fetch the latest version of macos from the App Store
-
Run the following
$ sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/UNTITLED --nointeraction Password: Erasing disk: 0%... 10%... 20%... 30%... 100% Copying to disk: 0%... 10%... 20%... 30%... 40%... 50%... 60%... 70%... 80%... 90%... 100% Making disk bootable... Install media now available at "/Volumes/Install macOS Big Sur"
-
-
Create credentials for the rebuild
Instructions
Run
create-repave-secrets
with an argument that follows the naming convention of:machine.<month name>.air
-
Backup anything worth keeping
Instructions
Generally, this means look at the following directories for things that I might want to carry over to the fresh
install or possibly consider saving to a cloud service:Desktop
Documents
Downloads
Rebuild steps
-
Reboot to load installer
Instructions
Hold down the Option key to trigger the boot selection menu.
- Use Disk Utility to wipe existing partition and make a new one (new name, new encryption key)
- Install the OS
Post OS install steps
-
Install git, clone this repo, and run
coalese_this_machine
Instructions
git # this will trigger the XCode installer which brings git along with it mkdir ~/workspace git clone https://github.com/scottmuc/infrastructure.git ~/workspace/infrastructure ~/workspace/infrastructure/homedirs/osx/coalesce_this_machine
- Launch and configure 1 Password
- Initialise 1 Password CLI
- Map capslock to control
note to speed things up, some of the steps above can be done while coalese_this_machine
is running.
Done When
-
Make a tiny DNS change and run terraform
Instructions
# Initialize and log into the 1 Password CLI initialize-1password eval $(op signin) # Unlock the repo in order to access values in ./secrets dir cd ~/workspace/infrastructure ./scripts/locksmith unlock # Initialize Terraform and apply cd dns terraform init ./terraform_apply
-
Make a signed commit mentioning this issue (exercises
gpg_op
)Instructions
# Initialize and log into the 1 Password CLI initialize-1password eval $(op signin) gpg_op restore -e "scott@scottmuc.com"
- Be able to push the commit (exercises
ssh_op_agent
) - Log into GitHub in Brave (exercises 1 Password browser extension)
- Old keys and credentials are deleted (GitHub and 1Password)
- Make this template slightly better
Had some issues due to asdf
bootstrapping. Will commit a few changes around that. This is related to #49.
The current alacrritty-colorscheme
install code installs it in the global python (which the PATH is incorrect, so I'm going to remove it). Need to install the relevant asdf plugins and then perform the installation of the tools.
There's not much to improve with this template. Despite being nearly a year since the last repave, all the steps were still important. The issues I encountered on this repave were due to the underlying automation being out of date, so some fixes need to be applied there.
Everything is running fine after the repave... calling it done.