Alpine Install: from a disc to a virtualbox machine single only: Difference between revisions

From Alpine Linux
m (→‎Technical: Removed dead links)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''Overall description:''' Alpine Installation from a official disc/iso downloaded to a VirtualBox machine, where will be single OS only.
'''Overall description:''' Installing Alpine from an official disc image to a VirtualBox machine.


This document will guide you to install Alpine into VirtualBox virtual machine, use if you have a VirtualBox virtual machine and only wants to take a shoot into it. For others ways to install see at the [[Alpine_newbie_install_manual#Ways_to_install_Alpine_into_machines_or_virtuals|Alpine_newbie_install_manual]]
This document guides you through installing Alpine on a VirtualBox VM - this is ideal if you only want to try out Alpine.


== Terminology ==
== Terminology ==


* '''Host machine''': will be your real machine with installed operating system that have installed the VirtualBox software and "will host" the target operating system, in that case Alpine.
* '''Host machine''': the machine you're running VirtualBox on. It will "host" the target virtual machine.
* '''Guest machine''': will be your target machine where Alpine will be installed, emulated by the host operating system using the VirtualBox software installed in the real machine.
* '''Guest machine''': your target machine where Alpine will be installed, executed by the VirtualBox software on the host machine.
* '''Reserved RAM''': will be the amount of RAM that will be need to share exclusively to the virtual machine created by the VirtualBox software in the host machine, stolen from the real RAM.
* '''Reserved RAM''': the amount of host machine RAM that will be needed for exclusive use by the guest machine. The host machine cannot use this RAM while the guest machine is running.
* '''Virtual disc''': will be the storage medium device emulated as target for the emulated machine or "guest machine", where the Alpine will be installed.
* '''Virtual disc''': the emulated storage medium attached to the guest machine. Usually it is a file (or several files) which VirtualBox presents as a disk to the guest OS (Alpine).


== Requirements ==
== Requirements ==


* In the host machine we need installed the <code>virtualbox</code> program from VirtualBox software
On the host machine:
* In the host machine we need at least 1Gb of RAM, recommended 2Gb of RAM installed
 
* The guest machine need 512Mb RAM, but recommended 1Gb reserved if desktop software will be installed
* [https://www.virtualbox.org/ VirtualBox]
* In the host machine we need installed <code>wget</code> or a web browser to download install medium
* At least 1GB of RAM, 2GB or more is recommended
* Some means to download the install image (wget, curl, [https://www.mozilla.org/en-US/firefox/new/ web browser])
 
Guest machine:
 
* Minimum 512Mb RAM, but recommended 1Gb if you're going to use a graphical interface


== Preparing the medium to install ==
== Preparing the medium to install ==


Download the source medium to install and put into your home; there's more hardware medium sources to download, like the '''[https://en.wikipedia.org/wiki/Linux_on_z_Systems s390x]''' and '''[https://en.wikipedia.org/wiki/Ppc64 ppc64le]''', but due VirtualBox only emulates '''x86''', '''x64''' and '''arm''' hardware only, will list those here
Download the source medium to install and put into your home; there's more hardware medium sources to download, like the '''[https://en.wikipedia.org/wiki/Linux_on_z_Systems s390x]''' and '''[https://en.wikipedia.org/wiki/Ppc64 ppc64le]''', but because VirtualBox handles only '''x86''' and '''x64'''
hardware, we will list those here


The source medium to install will be as following format: '''<code><nowiki>http://dl-cdn.alpinelinux.org/alpine/v</nowiki><VERSION>/releases/<ARCH>/alpine-standard-<VERSION>.0-<ARCH>.iso</code>''' where <code>ARCH</code> and <code>VERSION</code> could be the following for VirtualBox virtual machines:
The name of the source medium to install will be in the following format: '''<code><nowiki>http://dl-cdn.alpinelinux.org/alpine/v</nowiki><VERSION>/releases/<ARCH>/alpine-standard-<VERSION>.0-<ARCH>.iso</code>''' where <code>ARCH</code> and <code>VERSION</code> can be one of the following, for VirtualBox virtual machines:


* <code><ARCH></code> can be
* <code><ARCH></code> can be
** '''x86''': The most and well know i386 to i686 of 32-bit machines.
** '''x86''': The well known i386 to i686. (32-bit machines)
** '''x86_64''': The popular AMD64 compatible 64-bit x86 based machines.
** '''x86_64''': The popular AMD64 compatible 64-bit x86 based machines.
* <code><VERSION></code> can be
* <code><VERSION></code> can be
** '''latest-stable''' for a more up to date without taking care of numbered
** '''latest-stable''' as the name says, the latest, stable version
** '''3.10''' where the UEFI started to become a option supported
** '''3.10''' UEFI support began with this version
** '''3.8''' the most recommended for machines between 2012 to 2016
** '''3.8''' recommended for machines manufactured between 2012 and 2016
** '''3.6''' the most recommended for machines very older
** '''3.6''' recommended for older machines


The most common option to use in a virtual box obviously must be x86 due are more cheap to test and does not consumes lot of memory due the address bus are more small respect 64-bit flavor, so the downloaded iso can be a url as:
Typically, the version most commonly used in a virtual box is the x86. The hardware is cheaper and operation does not consume a lot of memory.
The iso download URL format is:


* For '''"x86" <code><ARCH></code>''' and '''"3.8" <code><VERSION></code>''' will be:
* For '''"x86" <code><ARCH></code>''' and '''"3.10" <code><VERSION></code>''' will be:
<code><nowiki>http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86/alpine-standard-3.8.0-x86.iso</nowiki></code>
<code><nowiki>http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86/alpine-standard-3.10.0-x86.iso</nowiki></code>
* For '''"x86_64" <code><ARCH></code>''' and '''"3.10" <code><VERSION></code>''' will be:
<code><nowiki>http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86_64/alpine-standard-3.10.0-x86_64.iso</nowiki></code>


'''Graphical download''': Just point the web browser to that url and the download of the iso file will start. A file with '''.iso''' extension type, with name like <code>"alpine-standard-3.10.0-x86_64.iso"</code> (if amd64) or like <code>alpine-standard-3.10.0-x86.iso</code> (if i386); will be downloaded commonly into the Download directory of your home documents filesystem.
'''Graphical download''': Just point the web browser to that URL and the download will start. A file with '''.iso''' extension type, with a name like <code>"alpine-standard-3.10.0-x86.iso"</code> (if i386/686); will be downloaded into the directory specified in your browser configuration.


'''Command line method''': just open a terminal and ejecuted: <code>wget -c -t8 --no-check-certificate <nowiki>http://dl-cdn.alpinelinux.org/alpine/v</nowiki><VERSION>/releases/<ARCH>/alpine-standard-<VERSION>.0-<ARCH>.iso</code>, so for example:
'''Command line method''': just open a terminal and execute: <code>wget -c -t8 --no-check-certificate <nowiki>http://dl-cdn.alpinelinux.org/alpine/v</nowiki><VERSION>/releases/<ARCH>/alpine-standard-<VERSION>.0-<ARCH>.iso</code>, for example:


* For '''"x86" <code><ARCH></code>''' and '''"3.8" <code><VERSION></code>''' will be:
* For '''"x86" <code><ARCH></code>''' and '''"3.10" <code><VERSION></code>''' the command will be:
<code>wget -c -t8 --no-check-certificate <nowiki>http://dl-cdn.alpinelinux.org/alpine/v3.8/releases/x86/alpine-standard-3.8.0-x86.iso</nowiki></code>
<code>wget -c -t8 --no-check-certificate <nowiki>http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86/alpine-standard-3.10.0-x86.iso</nowiki></code>
* For '''"x86_64" <code><ARCH></code>''' and '''"3.10" <code><VERSION></code>''' will be:
<code>wget -c -t8 --no-check-certificate <nowiki>http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86_64/alpine-standard-3.10.0-x86_64.iso</nowiki></code>


You must take care the place where you run the command, in that place will be downloaded the file.
You must be mindful of the directory you run the command from, as that is where the file will be saved.


== Preparing the virtual machine to install ==
== Preparing the virtual machine to install ==
Line 54: Line 57:
Start the VirtualBox software program.
Start the VirtualBox software program.


# In the main window '''create a new virtual machine''' by '''clicking the blue spark New button'''. Will open a new window with the following questions:
# In the main window '''create a new virtual machine''' by '''clicking the blue spark New button'''. That will open a new window with the following questions:
## Will ask for a '''name for the virtual like "alpine-desktop-try1"'''.  
## It will ask for a '''name for the virtual like "alpine-desktop-try1"'''.  
## The Type of the '''Operating system choose "linux"'''
## The Type of the '''Operating system choose "linux"'''.
## The version '''choose "other linux"''' and must match with the <code><ARCH></code> choosed (like x86)
## The version '''choose "other linux"'''. It must match the chosen <code><ARCH></code> (e.g. x86).
## By push "Next" button to continue to create the machine
## Click the "Next" button to continue creating the virtual machine.
# Second are RAM of the virtual machine, choose '''memory as 512MB''' minimum amount of. and push "Next" button.
# When selecting the amount of RAM for the virtual machine, choose a minimum of '''512MB''' then click the "Next" button.
# A new windows with a '''Hard disk assistant will opened'''
# A new window with a '''Hard disk assistant will open'''.
## First choose the option '''"Create a virtual hard disk now"''' and push "Create" button.
## First choose '''"Create a virtual hard disk now"''' then click the "Create" button.
## Next choose the option for '''hard disk type: VDI''' and push "Next" button.
## Next choose the option for '''hard disk type: VDI''' and push "Next" button.
## Choose the '''dynamically allocated''' and push the "Next" button.
## Choose '''dynamically allocated''' then click the "Next" button.
## Next window will offer the '''size of virtual disk, not so much due 4GB are far enough''', use as you desire
## The next window will offer the '''size of virtual disk. 4GB''', however, you may choose a different amount of storage space.
## By push on "Create" the virtual machine will be ready to use
## After clicking on "Create" the virtual machine will be ready to use.
# Now the main window show you the "alpine-desktop-try1" created virtual machine, select them
# Now the main window shows you the "alpine-desktop-try1" virtual machine, select it.
## By push on "Configuration" yellow button go to the storage part and push it over
## Click on the yellow "Configuration" button. Go to the storage menu and pull it down.
## Select the disc drive icon for CD/DVD rom and push on the again CD/DVD drive icon at the right
## Select the disc drive icon for CD/DVD ROM and click on the CD/DVD drive icon at the right.
## Mini menu will opened, choose to select and external file event the host CD/DVD drive
## A Mini menu will open. Select an external file event the host CD/DVD drive.
## A file open dialog will open.. search to the downloaded iso of Alpine and select it
## A file open dialog will open. Search for the downloaded Alpine iso and select it.
## Once defined the iso file to boot, push on the "Ok" button and virtual machines are finished.
## Once you choose the iso file to boot, click the "Ok" button to finish creating the virtual machine.
# Push on the green arrow that said "Start" to start the virtual machine and boot up the iso
# Click the green "Start" arrow to start the virtual machine and boot the iso.


[[File:Alpine Install from a disc to a virtualbox machine single only-01-0.png|center|Alpine configuration commonly used of a virtual machine on virtual box virtual machine]]
[[File:Alpine Install from a disc to a virtualbox machine single only-01-0.png|center|Alpine configuration commonly used of a virtual machine on virtual box virtual machine]]
Line 78: Line 81:
== Booting the Alpine ISO disc ==
== Booting the Alpine ISO disc ==


When the machine start, you must be sure to choose the Optical drive (commonly named CD/DVD Rom drive), so the disc/iso will boot and after a while a command line shell will show you:
When the machine starts, you must be sure to choose the Optical drive (commonly named CD/DVD ROM drive), so the disc/iso will boot. After a while, a command line shell will show you
 
{{Tip|If your system are not configure to boot from a CD/DVD drive must be configure in the BIOS, ask to your vendor or technical support, VirtualBox need to hit the F12 key to choose boot medium}}
 
[[File:Alpine Install boot up to a shell 01-1.png|center|After boot up.. a command line shell of a complete ready to use Alpine will show you]]
 
== The setup install process ==


After boot up.. a command line shell of a complete ready to use Alpine will show you
[[File:Installation-alpine-alpine-setup-2-boot.png|350px|thumb|right|Installation : setup-alpine : booting process until login prompt]]


* At the '''login:''' to appear, type '''root''' and press enter.
TODO restore the inclusion of template inclkude pages here, were edited and now does not have any sense respect this guide..  
* Run the '''setup-alpine''' script
** Choose your keyboard layout. If you don't know your keyboard layout choose '''us'''. By example for most Latin American a ''es'' are enough, for Russian (an maybe Cirilyc ones) ''ru'' are enough.
** Host name, which will be the name of your computer, a good format are '''''pcv-alp32-virtual1''''' where "pcv means "PC virtual", "alp32" means "Alpine 32bit" and "virtual1" means the first virtual machine to try.
** Choose your network card, most people can just go with the default (press enter), take in consideration that Wired connections are more stable and faster rather than Wireless connections, also at the most modern the Wireless card, the lest supported or still not well tested.
*** Most people will use DHCP, so press enter again, if you have Internet connection fro ISP most settings are just DHCP so all will be configured automatically
*** You will be asked if you want to do any manual network configuration, press enter for no
** Type in your root password twice.
** Choose a time zone, you can get a list by pressing '''?'''. If you want a sub zone, e.g. Africa, type in Africa and press enter, if again you type '''?''' and enter, it will give you a list of sub zones in Africa. By example for Venezuela the zone are "America/Caracas" .
** Press '''f''' to choose the fastest mirror; those mirrors something for strange reason are not available in some countries. (WIP put here a good mirror that never fail)
** Choose an SSH server, this allows you to remotely manage your machine. OpenSSH is what the big distro's use, Dropbear is a tiny SSH replacement. Choose '''openssh''' for able to connect using command line from Unix-like systems.
** Choose an NTP client, this keeps your machine's time accurate using an Internet time server. Openntpd is what the big distro's use, while Chrony is a tiny replacement.
** Choose a disk you want to install Alpine onto, as an example, '''sda''' is the first disk in your computer.
*** Now choose how you would like to use it, for this guide, choose '''sys''', this will install the entire OS onto your hard drive
*** You are given a final chance to back out, type in '''Y''' to continue
* The installation is now complete and you will be asked to reboot. Type in '''reboot''' and press enter
 
[[File:Alpine Install from a disc to a virtualbox machine single only-02-0.png|center]]


== Finishing the installation ==
== Finishing the installation ==


'''You cannot see a graphical window system? take easy''' and get calm down.. in Alpine all are made by the right way.. so '''if user need a desktop.. user can install a desktop''' follow the next: [[Alpine newbie apk packages]] or bypass and go directly to [[Alpine newbie desktops]]
After setup ends, a "reboot" will be offered. Type "reboot" and press enter and your newly installed virtual machine will be booted. Don't forget to remove the boot medium.
 
For others ways to install see at the [[Alpine_newbie_install_manual#Ways_to_install_Alpine_into_machines_or_virtuals|Alpine_newbie_install_manual]]
 
= Documents series =
 
{| class="wikitable"
|-
! Previous required  !! What's next to read
|-
| [[Alpine newbie install manual]] || [[Alpine newbie apk packages]]
|}


= See Also =
[[File:Installation-alpine-alpine-setup-9-setup-disk-3-7end.png]]


# [[Newbie_Alpine_Ecosystem]]
'''You cannot see a graphical window system? No problem.''' With Alpine, GUIs are made the right way.  So '''if you need a desktop, you can install a desktop'''.
# [[Alpine newbie apk packages]]
# [[Alpine newbie desktops]]
# [[Alpine newbie developer]]
# [[Alpine newbie lammers]]


[[Category:Newbie]]
[[Category:Newbie]]
[[Category:Installation]]

Latest revision as of 04:52, 24 March 2023

Overall description: Installing Alpine from an official disc image to a VirtualBox machine.

This document guides you through installing Alpine on a VirtualBox VM - this is ideal if you only want to try out Alpine.

Terminology

  • Host machine: the machine you're running VirtualBox on. It will "host" the target virtual machine.
  • Guest machine: your target machine where Alpine will be installed, executed by the VirtualBox software on the host machine.
  • Reserved RAM: the amount of host machine RAM that will be needed for exclusive use by the guest machine. The host machine cannot use this RAM while the guest machine is running.
  • Virtual disc: the emulated storage medium attached to the guest machine. Usually it is a file (or several files) which VirtualBox presents as a disk to the guest OS (Alpine).

Requirements

On the host machine:

  • VirtualBox
  • At least 1GB of RAM, 2GB or more is recommended
  • Some means to download the install image (wget, curl, web browser)

Guest machine:

  • Minimum 512Mb RAM, but recommended 1Gb if you're going to use a graphical interface

Preparing the medium to install

Download the source medium to install and put into your home; there's more hardware medium sources to download, like the s390x and ppc64le, but because VirtualBox handles only x86 and x64 hardware, we will list those here

The name of the source medium to install will be in the following format: http://dl-cdn.alpinelinux.org/alpine/v<VERSION>/releases/<ARCH>/alpine-standard-<VERSION>.0-<ARCH>.iso where ARCH and VERSION can be one of the following, for VirtualBox virtual machines:

  • <ARCH> can be
    • x86: The well known i386 to i686. (32-bit machines)
    • x86_64: The popular AMD64 compatible 64-bit x86 based machines.
  • <VERSION> can be
    • latest-stable as the name says, the latest, stable version
    • 3.10 UEFI support began with this version
    • 3.8 recommended for machines manufactured between 2012 and 2016
    • 3.6 recommended for older machines

Typically, the version most commonly used in a virtual box is the x86. The hardware is cheaper and operation does not consume a lot of memory. The iso download URL format is:

  • For "x86" <ARCH> and "3.10" <VERSION> will be:

http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86/alpine-standard-3.10.0-x86.iso

Graphical download: Just point the web browser to that URL and the download will start. A file with .iso extension type, with a name like "alpine-standard-3.10.0-x86.iso" (if i386/686); will be downloaded into the directory specified in your browser configuration.

Command line method: just open a terminal and execute: wget -c -t8 --no-check-certificate http://dl-cdn.alpinelinux.org/alpine/v<VERSION>/releases/<ARCH>/alpine-standard-<VERSION>.0-<ARCH>.iso, for example:

  • For "x86" <ARCH> and "3.10" <VERSION> the command will be:

wget -c -t8 --no-check-certificate http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86/alpine-standard-3.10.0-x86.iso

You must be mindful of the directory you run the command from, as that is where the file will be saved.

Preparing the virtual machine to install

Start the VirtualBox software program.

  1. In the main window create a new virtual machine by clicking the blue spark New button. That will open a new window with the following questions:
    1. It will ask for a name for the virtual like "alpine-desktop-try1".
    2. The Type of the Operating system choose "linux".
    3. The version choose "other linux". It must match the chosen <ARCH> (e.g. x86).
    4. Click the "Next" button to continue creating the virtual machine.
  2. When selecting the amount of RAM for the virtual machine, choose a minimum of 512MB then click the "Next" button.
  3. A new window with a Hard disk assistant will open.
    1. First choose "Create a virtual hard disk now" then click the "Create" button.
    2. Next choose the option for hard disk type: VDI and push "Next" button.
    3. Choose dynamically allocated then click the "Next" button.
    4. The next window will offer the size of virtual disk. 4GB, however, you may choose a different amount of storage space.
    5. After clicking on "Create" the virtual machine will be ready to use.
  4. Now the main window shows you the "alpine-desktop-try1" virtual machine, select it.
    1. Click on the yellow "Configuration" button. Go to the storage menu and pull it down.
    2. Select the disc drive icon for CD/DVD ROM and click on the CD/DVD drive icon at the right.
    3. A Mini menu will open. Select an external file event the host CD/DVD drive.
    4. A file open dialog will open. Search for the downloaded Alpine iso and select it.
    5. Once you choose the iso file to boot, click the "Ok" button to finish creating the virtual machine.
  5. Click the green "Start" arrow to start the virtual machine and boot the iso.
Alpine configuration commonly used of a virtual machine on virtual box virtual machine
Alpine configuration commonly used of a virtual machine on virtual box virtual machine

Booting the Alpine ISO disc

When the machine starts, you must be sure to choose the Optical drive (commonly named CD/DVD ROM drive), so the disc/iso will boot. After a while, a command line shell will show you

Installation : setup-alpine : booting process until login prompt

TODO restore the inclusion of template inclkude pages here, were edited and now does not have any sense respect this guide..

Finishing the installation

After setup ends, a "reboot" will be offered. Type "reboot" and press enter and your newly installed virtual machine will be booted. Don't forget to remove the boot medium.

You cannot see a graphical window system? No problem. With Alpine, GUIs are made the right way. So if you need a desktop, you can install a desktop.