[Back]
-
Preliminaries
Tasks for today:
- Install UTM on an ARM64 Mac.
- Set up a Puppy Linux virtual machine.
- Build and install the Linux kernel from source.
This guide is intended for Macs with Apple Silicon processors.
The Puppy Linux image used in this class is an x86-based image rather than
an ARM64 image. Consequently, UTM must emulate an x86 processor.
-
Installing UTM
-
Download UTM from the
UTM website
.
You may also install it from the Mac App Store.
-
Open the downloaded
.dmg file and drag UTM into the
Applications folder.
-
Open UTM from the Applications folder.
-
Creating the Puppy Linux VM
-
Download the Puppy Linux VM image from the course website:
Puppy Linux VM image.
-
Open UTM and click Create a New Virtual Machine.
-
Select Emulate.
-
Select Other
-
Choose the architecture that matches the provided VM image:
-
Select the Puppy Linux image as the boot or storage disk.
-
Allocate at least 1–2 GB of RAM to the VM. The amount depends on how much DRAM you have on your machine. Do not starve your host machine.
-
Enable UTM's default shared networking option. This provides the
guest with network access through the Mac's connection. Set the emulated network card to rtl8139.
-
Save the VM with a name such as
CS552 Puppy Linux.
-
Click the Run button to start the VM.
-
Configuring Networking in Puppy Linux
-
After Puppy Linux starts, locate the network icon in the lower-right
corner of the desktop. It may display a red X if networking
has not yet been configured.
-
Click the network icon to open the network configuration wizard.
-
Select the eth0 interface.
-
Click Test eth0 to check whether the interface can reach the
network.
-
Click Auto DHCP to obtain an IP address automatically.
-
Open a terminal and test the connection:
ping -c 4 google.com
If the ping command receives replies, networking is working correctly.
If eth0 does not appear, shut down the VM and check that
UTM's network device is enabled.
-
Kernel Building
The goal of this part of the lab is to obtain, build, and install the
Linux kernel from source inside the Puppy Linux VM.
-
Open a terminal inside Puppy Linux.
-
Run
uname -a and save the output:
uname -a
The output should identify the architecture of the emulated guest.
Even though the physical Mac is ARM64, the Puppy VM should report an
x86 architecture because the guest is being emulated.
-
Open the web browser inside Puppy Linux and navigate to the course
lab schedule page.
-
Download the Linux kernel source archive:
linux-2.6.33.3.tar.gz.
-
Open a terminal in the directory containing the downloaded file.
-
Extract the source archive:
tar -xzvf linux-2.6.33.3.tar.gz
- Enter the kernel source directory:
cd linux-2.6.33.3
- Build the kernel:
make
- Install the kernel:
make install
-
Reboot the Puppy Linux VM:
reboot
-
After the VM starts again, run:
uname -a
Compare this output with the output from the beginning of the lab.
Did the kernel version change?
Author: Deniz Yilmaz