Install macOS on a Chromebook – Chrome Unboxed

0
Install macOS on a Chromebook – Chrome Unboxed

Another day, another opportunity for me to do something absolutely irrational with my Chromebook. Why? Why not? Since Google was kind enough to add a Linux container to ChromeOS, I feel it’s my duty to tinker as much as possible to see how far I can push our favorite operating system. Over the past two years, I’ve installed a wide variety of Linux applications, desktop environments, various Linux distributions, and even a full Windows installation. Although it doesn’t require Linux, we even figured out how to use iMessage on a Chromebook just because we could.

I know I’m an outlier and I know most users have no desire to install non-native software on a Chromebook and that’s totally fine. For me, it’s mostly a matter of trying to try. That said, I was sitting at my desk the other day when a crazy thought popped into my head. Can you install macOS in any form, form, or mode using Linux? Turns out the answer is yes and a sharp developer has a Github repository dedicated to this task.

The process is actually quite simple and only takes a few lines of code in the built-in Linux terminal that comes with most modern Chromebooks. Before I go any further, I warn you that I don’t recommend doing this unless you just like to tinker. The experience is quite choppy even on my ASUS Core i7 with 16GB of RAM. If you’re looking for a legit macOS experience, this isn’t the tutorial you’re looking for. If you want to install macOS on your Chromebook just to say you did or maybe impress your friends, I’ll show you exactly how to do it. Do not worry. This all happens in the Linux container. If something goes wrong, you can easily remove Linux and start fresh. That said, you’ll want to make a backup of your existing Linux container if there’s anything you don’t want to lose.

Installing macOS

OK. Ready? To start, we’ll install the very useful nano text editor. Nano will allow us to quickly make changes to the build script used to run the macOS installation. Once you have configured Linux on your Chromebook and everything is up to date, you can install nano with the command below. If prompted, press “Y” or enter to verify the installation process.

sudo apt install nano

Next, we need to install a few prerequisite packages including qemu which is an open source system emulator. This, and some Python tools, can all be installed by pasting the following commands into your Linux terminal and hitting Enter.

sudo apt-get install qemu-system qemu-utils python3 python3-pip

We are now ready to begin the installation process. Thanks to foxlet and the macOS-Simple-KVM Github, we have all the tools needed to set up a virtual machine and install macOS using Linux on ChromeOS. To start, we need to clone the macOS-Simple-KVM git into our Linux container. Once this is complete, you will need to move to the newly created directory using the cd ordered. Run the following commands, one at a time.

git clone https://github.com/foxlet/macOS-Simple-KVM.git
cd macOS-Simple-KVM/

Next, we must download the macOS image that we want to install. This can be done using the jumpstart command below. By default this will install macOS Catalina but you can opt for Mojave or High Sierra by adding --high-sierra Where --mojave until the end of the order. Just paste the below command in Linux terminal and hit enter.

./jumpstart.sh

Now we need to create a “hard disk” to install macOS. Remember that you can only use the space available in the Linux container. The command below will allocate 64 GB for your new hard drive, but I recommend increasing it a bit if you have space in the Linux container. You can name the disk whatever you want or you can leave it as default MyDisk.qcow2 in the command below. If you rename it, note the file name as we will need it in the next step. Create your disk with the command below.

qemu-img create -f qcow2 MyDisk.qcow2 64G

Finally, we need to use nano to edit the basic.sh script. There are two lines you need to add to the end of this file. They are both in the box below. If you changed the name of the hard drive you created, you will need to update it in the first line of code below.

-drive id=SystemDisk,if=none,file=MyDisk.qcow2 
-device ide-hd,bus=sata.4,drive=SystemDisk 

By default, this machine uses 2 GB of RAM, 2 CPU cores and 4 CPU threads. While the basic.sh file is open, you can modify these settings if you wish. I upped mine to 12GB RAM and 4 CPU cores and can say it made a noticeable difference in performance. Note that you can only use hardware that is actually on your machine. If you have 8GB, changing that to 10GB won’t do you any good. To change the RAM and CPU settings, adjust the code in the first two lines highlighted in the image of the basic.sh file you see below. Once you have made all your changes, press Ctrl + X then Enter to save the file.

That’s it. You are now ready to launch the macOS installer. To do this, run the basic.sh script that we just modified. Once the installer starts, you’ll see the familiar macOS installer screen. Run the command below to start the script.

/basic.sh

Once the macOS installer has launched, select “Start macOS installation from macOS base system” and press Enter. This will take you to the macOS utilities screen. Before installing macOS, you’ll need to erase and format the virtual hard drive you created. To do this, select Disk Utility and select your hard drive created in step four. Name your drive whatever you want and set it to Mac OS Extended (Journaled) and GUID Partition Map. Once the formatting is complete, you can go back to the disk utilities screen and select “Reinstall macOS”. From there, select your newly formatted hard drive and wait for the installation process to complete. You will need to enter your Apple ID and password when prompted.

Again, not a great macOS experience, but it works. You’ll notice you have a double cursor when you’re inside the macOS virtual machine, but once you get used to it, the OS moves pretty well. That’s about it for this science experiment. If you love DIY and want to turn your Chromebook into a Mac, go ahead and give it a try.

Kudos to foxlet for creating this cool method of installing macOS on Linux.

T
WRITTEN BY

Related posts