Difference between revisions of "Installation"

From Alpine Linux
Jump to: navigation, search
(cited two times the more complete reference for install manual)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Alpine Linux can be installed as the main operating system on a physical machine ("bare metal"), including on embedded devices. For example, [https://en.wikipedia.org/wiki/PostmarketOS PostmarketOS] is a smartphone operating system based on Alpine. While this use case is less common than Alpine Linux's main use as a base system for container images in systems like Docker, this document describes how Alpine can be installed as the primary operating system for a computer.
+
While Alpine Linux is often used as base image for linux containers, it can of course be also installed on bare metal machine as well. That is the focus of this document.
  
Alpine in fact works as a [https://en.wikipedia.org/wiki/Live_USB live system]—any install disk of Alpine can also be run without installing to local storage of the machine it's booted on, running directly from the install media!
+
So remenber, this first document is a general use case, '''[[Alpine newbie install manual]]''' is the main reference to more ways to perform installation or permanent data saving on a device, for others hardware and use case
  
 
__TOC__
 
__TOC__
Line 19: Line 19:
 
= Installation Overview =
 
= Installation Overview =
  
The following steps are brief and intended for the common case; for complete info and other architectures, please consult the [[Alpine newbie install manual]].
+
The following steps are brief and intended for the common case; for complete info and other architectures, '''[[Alpine newbie install manual]]''' is the main reference to more ways to perform installation or permanent data saving on a device, for others hardware and use cases.
  
== 1. Download the media source ==
+
== 1. Download the installation image ==
  
The most common is to grab an ISO from [http://alpinelinux.org/downloads]. Take note of architectures in green buttons.
+
You need to acquire installation image, usually from [http://alpinelinux.org/downloads]. Most likely you will want the standard edition. Make sure you download the image for correct architecture.
  
== 2. Dump, burn or flash the image ==
+
== 2. Create the installation medium ==
  
Dump the ISO image onto a media source like USB/SD flashing; or CD/DVD/BR disk with burning software.
+
Either you can burn the image onto CD/DVD, you use usb stick for the installation.
In Linux, you can use <code><nowiki>dd if=<your iso filename> of=<your target media> bs=1M; sync</nowiki></code>, to flash a USB drive or SD card as target media install.
+
 
 +
Under linux, you can use the dd for that:
 +
 
 +
<code><nowiki>dd if=<source iso> of=<target device> bs=4M; sync</nowiki></code>
 +
 
 +
Make sure that the device '''does not''' include partition number, so example from my machine:
 +
 
 +
<code><nowiki>dd if=~/Downloads/alpine-standard-3.10.2-x86_64.iso of=/dev/sdb bs=4M</nowiki></code>
 +
 
 +
The target device '''will be erased''', so make sure you use something without any data you do not
 +
want to lose.
  
 
== 3. Boot and install process ==
 
== 3. Boot and install process ==
  
Log in as the user <code>root</code> by typing <code>root</code> and hitting ''enter''. Then execute <code>[[Alpine_setup_scripts#setup-alpine|setup-alpine]]</code>, answering the questions and hitting ''enter'' after each:
+
Log in as the user <code>root</code> and execute [[Alpine_setup_scripts#setup-alpine|setup-alpine]] and answer all the questions asked. Quick step-by-step walkthrough (go read [[Alpine_setup_scripts#setup-alpine|setup-alpine]] for more in-depth explanation):
  
 
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Installation : setup-alpine : complete process single install]]
 
[[File:Installation-alpine-alpine-setup-3-setup-scripts.png|350px|thumb|right|Installation : setup-alpine : complete process single install]]
  
* '''Select keyboard layout''': Choose your keyboard layout, e.g. ''us'' or ''es''.
+
===== Keyboard layout and variant =====
** '''Select variant''': Choose your keyboard layout variant,  e.g. ''us-nodeadkeys'' or ''es-winkeys''.
+
 
* '''Enter system hostname''': Choose the name of your computer; '''localhost''' is good enough and recommended for starting.
+
As you would expect, this is keyboard layout you want. If you are not sure, answering <code>us</code> to both layout and variant will get you started and you can change it later.
* '''Initialize network cards''': Here most people can just go with the default (just press enter).
+
 
** '''Any manual configuration''': Perform other configuration if needed, otherwise just type "no" and hit enter.
+
===== System hostname =====
** '''Select domain name''': This is not commonly asked, you can just hit enter.
+
 
* '''DNS nameservers?''': If asked, <code>8.8.8.8</code> is a recommended default that will be good for most people.
+
Pick the name of your computer, while not mandatory, something unique if prefered. Or you can just use <code>localhost</code> if you do not care.
* '''Changing password for root''': Next a root password must be defined. Input a passphrase; what you type won't be shown on the screen.
+
 
** '''Retype password''': Type the same passphrase to confirm the root password; what you type won't be shown on the screen.
+
===== Network configuratinon =====
* '''Which timezone to choose?''': Set it to your local time zone or hit enter for <code>UTC</code>.
+
 
* '''Proxy chooser''': Type <code>none</code> and hit enter if you're not using a proxy.
+
You will be asked ''which'' network interface you want to configure, if you are not sure, picking the offered default would likely work. Once selected, you will be asked <code>Ip address for XXX?</code>, you can either assign an IP address or write <code>dhcp</code>, which will mean take configuration from the network (the <code>dhcp</code> works great for home networks where you do not care about IP of your machine).
* '''Which NTP client to run?''': This is for keeping the system clock in sync. The default is good enough for most people.
+
 
* '''Enter mirror number''': <code>1</code> is a good choice for most people.
+
Assuming you decided to configure network yourself with IP address, you will also be asked for netmask, gateway, dns domain name and dns server IP. Correct values for there are beyond the scope of this document, please refer to your network administrator for guidance instead.
* '''Which SSH server?''': An SSH server allows you to remotely manage your machine. The default is good enough for most people.
+
 
* '''Disk Setup''' Choose how to set up your disks.
+
===== Password for root =====
** '''Which disks would you like to use?''': Choose the disk where files will be installed. Usually <code>sda</code> is the hard disk and <code>sdb</code> is the USB boot or CD/DVD image.
+
 
** '''How would you like to use it?''': Type "sys" and then press enter. This will cause the OS to be installed to the chosen disk&mdash;similar to how other distributions work.
+
Well this one is obvious.
 +
 
 +
===== Timezone =====
 +
 
 +
For servers, it is common to use UTC, for non-server machines, your local timezone should be likely used. Notice that you can use <code>?</code> to list the timezone.
 +
 
 +
===== HTTP/FTP Proxy =====
 +
 
 +
Most likely default (<code>none</code>) is the correct choice.
 +
 
 +
===== NTP client =====
 +
 
 +
Which client to use for keeping the system clock in sync, default works for most people.
 +
 
 +
===== Mirror =====
 +
 
 +
Pick mirror from which to download updates, <code>1</code> is CDN backed by Fastly, so reasonable choice for most people.
 +
 
 +
===== SSH server =====
 +
 
 +
Which SSH server do you want to configure on your machine. If you know that you will '''not''' connect to your machine remotely (most laptops for example), <code>none</code> should be used. Otherwise, the default (<code>openssh</code>) is a good pick.
 +
 
 +
===== Disk setup =====
 +
 
 +
Here your can pick the device to install the system on and also the mode in which it should be installed. For overview of the modes, see [[Alpine_setup_scripts#setup-modes|this]]. If you are not sure or just starting up, <code>sys</code> is likely what you want, it is the same mode that other distributions use for installation.
 +
 
 +
'''All data on the chosen device will be erased!'''
  
Take care that '''all data on your chosen disk will be erased'''. A final question will prompt you to continue. After confirming by typing 'y' and hitting enter, you cannot turn back.
+
===== Reboot =====
  
 
After the script finishes installing the system, it will tell you to reboot. Note that:
 
After the script finishes installing the system, it will tell you to reboot. Note that:
Line 61: Line 97:
 
* If the configured [[Alpine_setup_scripts#diskless_mode|runtime mode was "data"]], then keep the installation media inserted to boot the newly installed system.
 
* If the configured [[Alpine_setup_scripts#diskless_mode|runtime mode was "data"]], then keep the installation media inserted to boot the newly installed system.
  
To reboot, type <code>reboot</code> and hit enter. If you just wish to turn off the machine after installing, type <code>poweroff</code> instead.
+
Then execute <code>reboot</code> and once the machine restarts and finishes booting up, you should see login prompt of your new Alpine Linux installation.
 +
 
 +
The installation script only installs the base operating system. Applications such as a web server, mail server, desktop environment, or web browser are not installed and <code>root</code> is the only normal user. For instructions on proceeding after installation, please see [[Tutorials_and_Howtos#Post-Install|Tutorials_and_Howtos Post-Install section]].
  
 
= Further Documentation =
 
= Further Documentation =
 
The installation script only installs the base operating system. Applications such as a web server, mail server, desktop environment, or web browser are not installed and <code>root</code> is the only normal user. For instructions on proceeding after installation, please see [[Tutorials_and_Howtos#Post-Install|Tutorials_and_Howtos Post-Install section]].
 
  
 
More specific instructions and instructions for other architectures or machines (e.g. ARM, RPi, etc) are defined in [[Tutorials_and_Howtos#Installation:_Use_cases|Installation:_Use_cases]]. Also see the following wiki pages for more information:
 
More specific instructions and instructions for other architectures or machines (e.g. ARM, RPi, etc) are defined in [[Tutorials_and_Howtos#Installation:_Use_cases|Installation:_Use_cases]]. Also see the following wiki pages for more information:
Line 74: Line 110:
 
* [[Developer Documentation]]
 
* [[Developer Documentation]]
 
* [[Newbie Alpine Ecosystem]]
 
* [[Newbie Alpine Ecosystem]]
* [https://mckayemu.github.io/alpineinstalls/ https://mckayemu.github.io/alpineinstalls/ All informatin for Spanish users]
+
 
 +
== External links ==
 +
 
 +
* [https://mckayemu.github.io/alpineinstalls/ More information, in Spanish]
  
 
[[Category:Installation]]
 
[[Category:Installation]]

Latest revision as of 01:44, 4 November 2020

While Alpine Linux is often used as base image for linux containers, it can of course be also installed on bare metal machine as well. That is the focus of this document.

So remenber, this first document is a general use case, Alpine newbie install manual is the main reference to more ways to perform installation or permanent data saving on a device, for others hardware and use case


Quick Requirements

Nearly any hardware should run Alpine Linux but the following basic requirements are recommended:

  • At least 128MB of RAM for server without GUI, or at least 1.6GB for graphical desktop
  • At least 1GB storage device for server without GUI, or at least 10GB for graphical desktop with web browsing

For more information, see Requirements.

Installation : setup-alpine : booting process until login prompt

Installation Overview

The following steps are brief and intended for the common case; for complete info and other architectures, Alpine newbie install manual is the main reference to more ways to perform installation or permanent data saving on a device, for others hardware and use cases.

1. Download the installation image

You need to acquire installation image, usually from [1]. Most likely you will want the standard edition. Make sure you download the image for correct architecture.

2. Create the installation medium

Either you can burn the image onto CD/DVD, you use usb stick for the installation.

Under linux, you can use the dd for that:

dd if=<source iso> of=<target device> bs=4M; sync

Make sure that the device does not include partition number, so example from my machine:

dd if=~/Downloads/alpine-standard-3.10.2-x86_64.iso of=/dev/sdb bs=4M

The target device will be erased, so make sure you use something without any data you do not want to lose.

3. Boot and install process

Log in as the user root and execute setup-alpine and answer all the questions asked. Quick step-by-step walkthrough (go read setup-alpine for more in-depth explanation):

Installation : setup-alpine : complete process single install
Keyboard layout and variant

As you would expect, this is keyboard layout you want. If you are not sure, answering us to both layout and variant will get you started and you can change it later.

System hostname

Pick the name of your computer, while not mandatory, something unique if prefered. Or you can just use localhost if you do not care.

Network configuratinon

You will be asked which network interface you want to configure, if you are not sure, picking the offered default would likely work. Once selected, you will be asked Ip address for XXX?, you can either assign an IP address or write dhcp, which will mean take configuration from the network (the dhcp works great for home networks where you do not care about IP of your machine).

Assuming you decided to configure network yourself with IP address, you will also be asked for netmask, gateway, dns domain name and dns server IP. Correct values for there are beyond the scope of this document, please refer to your network administrator for guidance instead.

Password for root

Well this one is obvious.

Timezone

For servers, it is common to use UTC, for non-server machines, your local timezone should be likely used. Notice that you can use ? to list the timezone.

HTTP/FTP Proxy

Most likely default (none) is the correct choice.

NTP client

Which client to use for keeping the system clock in sync, default works for most people.

Mirror

Pick mirror from which to download updates, 1 is CDN backed by Fastly, so reasonable choice for most people.

SSH server

Which SSH server do you want to configure on your machine. If you know that you will not connect to your machine remotely (most laptops for example), none should be used. Otherwise, the default (openssh) is a good pick.

Disk setup

Here your can pick the device to install the system on and also the mode in which it should be installed. For overview of the modes, see this. If you are not sure or just starting up, sys is likely what you want, it is the same mode that other distributions use for installation.

All data on the chosen device will be erased!

Reboot

After the script finishes installing the system, it will tell you to reboot. Note that:

  • If the configured runtime mode was "sys", then remove the initial installation media to boot the newly installed system.
  • If the configured runtime mode was "data", then keep the installation media inserted to boot the newly installed system.

Then execute reboot and once the machine restarts and finishes booting up, you should see login prompt of your new Alpine Linux installation.

The installation script only installs the base operating system. Applications such as a web server, mail server, desktop environment, or web browser are not installed and root is the only normal user. For instructions on proceeding after installation, please see Tutorials_and_Howtos Post-Install section.

Further Documentation

More specific instructions and instructions for other architectures or machines (e.g. ARM, RPi, etc) are defined in Installation:_Use_cases. Also see the following wiki pages for more information:

External links