Project

General

Profile

Support #930

Install Standard Alpine Linux as VirtualBox Guest

Added by Daniel Curtis almost 6 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Server
Target version:
Start date:
04/08/2018
Due date:
% Done:

100%

Estimated time:
1.50 h
Spent time:

Description

This is a guide for installing a Standard version of the Alpine Linux distro as a VirtualBox guest. VirtualBox is expected to have the host additions already installed.

Install Alpine

  • Create a new VM and add the downloaded ISO to the Storage section.
  • Start the VM and wait until the login prompt appears. Username is root, password is blank.
  • Start the alpine setup script:
    setup-alpine
    
    • Setup the localization:
      us
      us
      
    • Set the hostname:
      alpine
      
    • Next hit enter to use the automatically detected network interface.
    • Next hit enter to use DHCP network interface.
    • Next hit enter to skip manual network configuration.
    • Set the new root password.
    • Set the timezone:
      America
      
    • Set the subtimezone:
      Los_Angeles
      
    • Next hit enter to skip proxy settings.
    • Next hit enter to detect the fastest repo mirror.
    • Next hit enter to select the default SSH server.
    • Next hit enter to select the default NTP client.
    • Enter the hard drive to install Alpine to:
      sda
      
    • Choose a sys install:
      sys
      
    • Enter y to erase the hard drive:
      y
      
    • Reboot to exit the installer, make sure to remove the ISO from the Storage section of the VM:
      reboot
      

Setup Alpine

  • Once the VM has rebooted, login as root.
  • Install nano:
    apk add nano
    
  • Edit the apk repository mirror list:
    nano /etc/apk/repositories
    
    • And enable the community repo:
      http://dl-cdn.alpinelinux.org/alpine/v3.7/main
      http://dl-cdn.alpinelinux.org/alpine/v3.7/community
      
  • Update the apk package metadata:
    apk update
    

VirtualBox

  • Start by creating a shared folder on the host system, this guide uses Shared as the folder name.
  • Install the virtualbox guest additions:
    apk add virtualbox-guest-additions virtualbox-guest-modules-hardened
    
  • Load the kernel modules:
    modprobe -a vboxsf
    
  • Make a mount point and mount the shared virtualbox folder:
    mkdir -p /media/shared
    mount -t vboxsf Shared /media/shared
    

Resources

Also available in: Atom PDF