15 Create an Alpine Linux Virtual Machine

Braedyn Case

Alpine Linux is a lightweight, security-focused Linux distribution known for its small size and simplicity. It’s designed to be extremely small and efficient by including only essential components, which keeps the system fast and lightweight.  Alpine is commonly used in containers, embedded systems, and virtual machines because it has a very small footprint. It also emphasizes security with hardened kernels by default.

Phase 0 – Professional Alignment

Enterprise IT professionals often need to work from multiple computers while maintaining a consistent and reliable lab environment. In this chapter, you will configure your GNS3 environment to run from portable storage, allowing you to transport your enterprise networking laboratory between compatible systems while preserving your projects, virtual machines, and configurations.

DCWF Work Roles

The knowledge and skills developed in this chapter align with the following Department of Defense Cyber Workforce Framework (DCWF) work roles:

  • 531 – Systems Administrator
  • 511 – Network Operations Specialist
  • 441 – Network Services Specialist

NICE Work Roles

This chapter supports competencies associated with the following NICE Workforce Framework for Cybersecurity work roles:

  • Systems Administrator
  • Network Operations Specialist
  • Network Services Specialist

Professional Skills

By completing this chapter, you will begin developing the ability to:

  • Configure portable enterprise networking laboratory environments.
  • Manage virtual machine and project files across multiple systems.
  • Verify the portability and integrity of virtual networking environments.
  • Organize and maintain reusable laboratory resources.
  • Troubleshoot issues related to portable storage and virtualization.
  • Implement backup and recovery practices for virtual networking projects.

What You’ll Be Able to Do

After completing this chapter, you should be able to:

  • Configure GNS3 to operate from a portable storage device.
  • Transfer your enterprise networking laboratory between compatible computers.
  • Verify that GNS3 projects, virtual machines, and supporting files function correctly after migration.
  • Troubleshoot common issues related to portable environments and storage devices.
  • Maintain a consistent and reusable networking laboratory for classroom, home, or professional use.
  • Protect your laboratory environment through effective organization and backup practices.

 

LEARNING OBJECTIVES
  • Install Alpine Linux using VirtualBox
  • Configure Alpine via the terminal
  • Connect to the Internet via the terminal
PREREQUISITES
  • Oracle VirtualBox
DELIVERABLES
  • None. This is a resource for students.
RESOURCES
CONTRIBUTORS AND TESTERS
  • Antionette Hults, Cybersecurity Student, ERAU-Prescott
  • Mathew J. Heath Van Horn, PhD

NOTE: This lab has HEAVY use of the Linux terminal; if you are uncomfortable with that, it is highly recommended to use another chapter with a graphical install process.

 

Phase I – Download the Alpine ISO

Alpine Linux is fairly straightforward to install. In this phase, we will show you how to download Alpine Linux and configure it as a virtual machine.

  1. Click here to download the Alpine ISO
  2. Wait for the download to complete
  3. Open Oracle VirtualBox
  4. Click Machine > New
  5. In the New Virtual Machine Window, name the VM whatever you want (mine is called Alpine Linux)
  6. In the option for ISO image, select the dropdown arrow and click Other
  7. Go to the directory that contains your ISO image (likely downloads)
  8. Select the ISO image (it will be named something like alpine-virt-x86_64.iso)
  9. In the OS, select Linux if it isn’t selected already
  10. In OS Distribution, click the dropdown arrow and select Gentoo
  11. In OS Version, select Gentoo (64-bit) if not selected already.
    Screenshot instructions
    Figure 1 – Virtual Machine name and operating system

  12. Select the Specify virtual hardware tab (we will skip the unattended guest OS installation)
  13. For Base Memory, select the input box at the very right of the window and type in 1024
  14. For Number of CPUs, drag the slider all the way down to 1
    Screenshot Instructions
    Figure 2 – Specify Virtual Hardware settings
  15. Select the Specify virtual hard disk tab
  16.  Select Create a New Virtual Hard Disk (usually selected by default)
  17. For Disk Size, select the input box at the very right of the window and type 1.50
    Screenshot Instructions
    Figure 3 – Specify virtual hard disk settings

     

  18. Click on Finish
  19. Select your newly created VM, then right-click it
  20. Then click on Start > Start with GUI
Screenshot Instructions
Figure 4 – Starting the new VM

 

Phase II – Installing Alpine from the terminal

Since Aline Linux was designed for wireless routers with limited processing power, its package management system is a bit different.
  1. At the login screen, where it says “localhost login:” type in root
  2. Once logged in, type setup-alpine and click enter
    Screenshot Instructions
    Figure 5 – Prepare to install Alpine
  3. For Select keyboard layout  type “us” and click enter
  4. For Select Variant type “us” and click enter
  5. Once prompted to Enter a system hostname type whatever you want to name the system and click enter (Mine is called Alps)
  6. Once prompted for Interfaces just use the default and click enter
  7. Once prompted for IP address for eth0 just use the default and click enter
  8. Once prompted for manual network configuration just use the default and click enter
    Screenshot Instructions
    Figure 6 – Installing Alpine

    NOTE: You will see a prompt warning you about a weak/bad password. Just ignore it for our purposes a simple password is fine. This prompt will not affect the install process.

  9. Once prompted for Root Password type in “toor” and click enter
  10. Retype the password “toor” and click enter
  11. Once prompted for Timezone select the options for your region the commands below are an example of my timezone (Phoenix, AZ)
    1. For the first prompt of which timezone are you in type in “America” and click enter
    2. When prompted for the sub-timezone of America type in “Phoenix” and click enter
  12. When prompted for Proxy just use the default and click enter
  13. When prompted for the Network Time Protocol type in “chrony” and click enter
  14. When prompted for APK Mirror just use the default and click enter

    NOTE: For advanced users, you may add your own user if preferred. However, most labs using Alpine assume you are using the root account. Only make your own user if you have advanced knowledge of root access in Alpine Linux.

  15. When prompted for a User, just use the default and click enter (we will just use the root account)
  16. When prompted for the SSH server, type in “none” and click enter
  17. When prompted for Disk Install, type in “sda” and click enter
    Screenshot Instructions
    Figure 7 – Installing Alpine Pt. 2

     

  18. When prompted for How would you like to use it type “sys” and click enter
  19. When warned about Erasing the above disk(s), type “y” and click enter
Screenshot Instructions
Figure 8 – Installation of Alpine complete!

Phase III – Configure, boot, and connect

Configure the first boot and connect to the internet.
  1. Power off the Virtual Machine
  2. In Oracle Virtual Box Manager, right-click on your Virtual Machine and click Settings
  3. Once in Settings, click on Storage 
  4. Right-click on the alpine-virt-x86_64.iso and click Remove Attachment
    Screenshot Instructions
    Figure 9 – Removing the ISO file from Storage
  5. In the pop-up window, click Remove
  6. In the bottom right of the Settings window, click OK
  7. Start your Alpine VM and wait for the login screen to appear
  8. Once the login prompt appears, type in “root” and click enter
  9. Once prompted for a password, type in the password you created earlier (e.g., “toor”) and click enter
  10. Once logged in, test internet access by typing the following command

    ping -c 4 google.com

     

    Screenshot Instructions
    Figure 10 – Testing Internet Connection

     

  11. If you achieved a ping response, your Alpine VM is fully functional and ready for future labs!

Career Connection

IT professionals frequently maintain portable development, testing, and troubleshooting environments to support classroom instruction, consulting engagements, incident response, and field operations. The ability to create a portable enterprise lab reduces setup time, improves consistency, and ensures that critical tools and configurations are available wherever work is performed. The skills developed in this chapter mirror industry practices for managing portable virtual environments and supporting flexible, mobile IT operations.

End of Lab

Send correspondence to prmaster@erau.edu
Figure 404 – use prmaster@erau.edu for correspondence

License

Icon for the Creative Commons Attribution-NonCommercial 4.0 International License

Mastering Enterprise Networks 3e Copyright © 2024 by Mathew J. Heath Van Horn is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, except where otherwise noted.