Installation: Difference between revisions

From Alpine Linux
(The page was difficult to read. It's easier now. I'm not done yet!)
(Converting into condensed general (basic and central) install info, leaving specifics for other pages.)
Line 1: Line 1:
The following information will assist you with the installation of [http://alpinelinux.org/about Alpine Linux].
 
[[Image:hdd_mount.png|left|link=]]
[[Image:hdd_mount.png|left|link=]]
<br />
<br />


== Installation Quick-Start in 3 Easy Steps ==
These steps are meant for x86_64 builds. For ARM, see [[Alpine_on_ARM|Alpine on ARM]]
<div style="float:left; font-size:30px; font-weight:bold;">
1st
</div>
<div style="margin-left:65px; background-color:#EDF2F2; border-style:solid; border-color:#6F7C91; border-width:0px; border-left-width:5px; min-height:55px; padding:5px;">
[http://alpinelinux.org/downloads Download] one of the latest stable-release ISOs. Then compare the image's checksum to the one in the corresponding checksum file (<code>*.sha256</code>) and verify its GPG signature.
</div>
<div style="float:left; font-size:30px; font-weight:bold;">
2nd
</div>
<div style="margin-left:65px; background-color:#E0E9E9; border-style:solid; border-color:#606A82; border-width:0px; border-left-width:5px; min-height:55px; padding:5px;">
If you have a CD drive from which you can boot, then [[Burning ISOs|burn the ISO onto a blank CD]] using your favorite CD burning software. Otherwise, [[Create a Bootable USB|create a bootable USB drive]].
</div>
<div style="float:left; font-size:30px; font-weight:bold;">
3rd
</div>
<div style="margin-left:65px; background-color:#9faecc; border-style:solid; border-color:#324065; border-width:0px; border-left-width:5px; min-height:55px; padding:5px;">
Boot from the CD or USB drive, login as root with no password, and voilà! Enjoy Alpine Linux!
</div>
{{Clear}}
Now that Alpine is completely running from the media source, '''you can install it''' by running <code>[[setup-alpine]]</code>.
Before running <code>[[setup-alpine]]</code>, you may want to look at other '''use cases in the [[Alpine_newbie_install_manual#Ways_to_install_Alpine_into_machines_or_virtuals|Alpine install manual for beginners]]'''
= Installation Handbook =
Alpine can be used even when when its not the actual distribution in place. The installation is so minimal that it can be inserted within the filesystems of other Linux distributions, which can be useful for fixing a broken system. '''Alpine can even be installed without a DVD disk or a USB drive, unlike most other Linux distributions'''. However, '''the more exquisite the setup, the more complicated the installation procedure'''. Beginners probably want to look to the [[Alpine_newbie_install_manual#Ways_to_install_Alpine_into_machines_or_virtuals|Alpine install manual for beginners]] for common installation cases (A Spanish version is available at [https://mckayemu.github.io/alpineinstalls/ https://mckayemu.github.io/alpineinstalls]).


== Overview of the Alpine installation process ==
== Usual Hardware Requirements ==


# Like any Linux installation, begin by booting an "install/running medium" from an external device (CD/DVD, USB Drive, etc...). Storage devices or optical drives can also be the target medium to install into.
* At least 100 MB of RAM (A desktop system may require up to 1 GB.)
# There are '''three common setups for live Alpine systems''':
* The "sys" or "data" run modes (see below) require a storage device.
## [[Alpine_newbie_install_manual#diskless_mode|diskless mode]]: A read-only medium such as the installation CD/DVD, a [[Create a Bootable USB|USB drive]] or a [[Create a Bootable Compact Flash|Compact Flash card]] will store the system. This means that disk changes cannot be saved, and only exist in memory.
## [[Alpine_newbie_install_manual#data_mode|data mode]]: This is similar to the disk-less mode above, but a writable partition (usually on a hard disk) is used to store {{Path|/var}}.
## [[Alpine_newbie_install_manual#sys_mode|sys mode]]: This is the traditional hard-disk install; the original system and subsequent modifications are kept on a hard drive. Individual partitions for {{Path|/boot}}, {{Path|/}}, and {{Path|swap}} are automatically created.
# The installation medium is in [[Alpine_newbie_install_manual#diskless_mode|diskless mode]], and <code>[[setup-alpine]]</code> will install the new system by copying files.
# When installing in [[Alpine_newbie_install_manual#sys_mode|sys mode]], the post-installation procedure allows configuring a root password.


== Requirements for Alpine ==
== Install Procedure ==


* A machine to install onto: Alpine supports phones, laptops, desktops, embedded, Raspberry Pis, Arduinos, etc.
Similar to many other distributions, the first installation steps usually consist of
** Most architecture, such as i386, amd64, arm, ppc, and x390.
** At least 100 MB of RAM is necessary. A complete desktop system can require up to 1 GB.
** For "sys" or "data" modes, a storage device is needed.


== Media source to install and/or run ==
# [http://alpinelinux.org/downloads Downloading] one of the latest stable-release ISOs, and comparing the image's <code>sha265sum</code> checksum to the one in the corresponding <code>*.sha256</code> checksum file () and verify its GPG signature.
# Either burning the ISO onto a blank CD with your favorite CD burning software, or [[Create a Bootable USB|creating a bootable USB drive]].
# Booting from the CD or USB drive, and logging in to the command line as user <code>root</code> with its initally empty password.
(For installing on ARM systems, see [[Alpine_on_ARM|Alpine on ARM]].)


Those source "install/running" medium are downloaded from https://alpinelinux.org/downloads/; named "images", all the images will need network internet connection present and available except the image named `extended` due comes with minimal need packages but are x86/x64 based only.
However, contrary to most other distributions, this initially booted Alpinelinux (command line environment) is first copied entirely into RAM, and then runs completely independent from the (slow) initial boot media.
And then, the <code>[[Alpine_setup_scripts|setup-alpine]]</code> script, and other tools, are used to configure the initial Alpinelinux system, install further packages, and prepare the system for the next boot.


To use those media files, must be dumped in a USB or burned into a CD/DVD, are "iso hybrid" that means can be just copied as "cd media.iso /dev/sdb", please check [[Create a Bootable USB|USB drive]], or a [[Create a Bootable Compact Flash|Compact Flash card]] for details.
Alpinelinux can boot into three general run modes:


== Booting the media source ==
'''diskless mode''' This is the default boot mode of the .iso images. With the <code>[[setup-alpine]]</code> selection "disk=none" the whole system runs from RAM. Customized configuration and package selections may still be preserved on permanent storage media with <code>lbu</code>, the "local backup tool", and by using a [[Alpine_Linux_package_management#Local_Cache|local package cache]].


After flash the USB media or burn a CD-ROM media, put the media source on respective drive bay of the computer and turn on the computer.
'''data mode''' This mode also runs mostly from RAM, with the exception of a selected writable partition that gets mounted as {{Path|/var}}. It is better-suited when large amounts of data need to be preserved between reboots, e.g. for mailspools, databases or log servers, and so on.


Select proper boot media, this depends on each computer device; by example on DELL's computers almost always are the `F12` key, press at the boot screen and when menu shows select the proper media, on the VirtualBox software are same `F12` key too, by hitting that key a boot selection media will be displayed, boot screen depends on each computer.
'''sys mode''' This is a traditional hard-disk install. The <code>[[setup-alpine]]</code> script defaults to create three partitions on the selected disk, for {{Path|/boot}}, {{Path|swap}} and {{Path|/}} (filesystem root). This mode may be used for [[Desktops|desktops]], development boxes, and virtual machines.


This document makes no sense which media was used after this step, rest of the document are same for all cases.


{{Note| This document assumes you will wipe out all the hard disk of your computer to complete use Alpine as the only and the main operating system, if you want more detailed cases see the wiki page [[Alpine_newbie_install_manual]].}}
== Additional Hints ==


== Configure and run the install process ==
=== Booting from external devices ===


More easy than you think, will just run as any other Linux, and ask for a login screen, just input "root" and then a console prompt will be show. Here just type and run the following commands to fast install automatically on ALL the hard disk of your computer device:
Insert the media to the proper drive or port of the computer and turn on the computer.
But depending on the computer it may be necessary, e.g. to press the `F12` key to get a selection to choose the media to boot from.


<pre><nowiki>
=== The setup-alpine questions ===
export BOOTLOADER=grub


setup-alpine -f /root/autofile
The <code>[[setup-alpine]]</code> script will ask to configure several things, including:
</nowiki></pre>


A few questions will be asked, be care of questions and root password questions in the
* Keyboard map (e.g. ''us'' and variant of ''us-nodeadkeys'')
process due will be used later and must be mandatory.
* Hostname (The name for the computer.)
* Keyboard map, such like ''us'' and variant of ''us-nodeadkeys'' for Canada or ''es'' and variant of ''es-winkeys'' for Spanish speaking users and Latin American people.
* Network options
* Hostname: just push enter, it's the human computer name.
* DNS options: Not recommended to use 8.8.8.8 (google servers).
* Network options: will as the method to grap the internet connection in wired cases, just enter the suggested values, an network internet connection present are required in most cases.
* Timezone
* DNS options: recommended to use 8.8.8.8 and none for search domain
* Proxy ("None" to connect directly to the internet.)
* Timezone options: just use the default values suggested.
* SSH (Openssh is part of the default images.)
* Proxy options: use "none" if you connect directly to the internet; this are a special filed that permits use the "proxy service" of your network, as to your admins.
* NTP (Chrony is part of the default images.)
* SSH options: use openssh, the default that comes with media.
* Mode (Select between "diskless", "data" or "sys" as described above.)
* NTP options: use chrony, the default that comes with media.
* Mode: select "sys" to install as described previously.
* Disk options: the destination media to install, as we assumed are only one disk in the computer device, use "sda".


After a while, process starts and will format the hard disk device, this will make the disk layout as:


* `/dev/sda1` como BOOT en 500Mb en `/boot`
* `/dev/sda2` como SWAP en 4Gb
* `/dev/sda3` como ROOT en 200Gb en `/`


And then will copy files to your hard disk device, after a while the system will be installed.
=== Booting and using the new system ===


== Booting and using the new system ==
After the installation is completed, depending on the run mode, the initial installation media may be removed and the system can be booted from the newly installed device.
After booting one may read [[Alpine_newbie_apk_packages|Alpine post install packages and setup configurations for new users]] and find further areas to customize the new system.


After process of coping files is completed, the installation media must be removed from the USB/CARD reader or CD/DVD bay of the computer


Then the new system can be booted by removing the boot media where was installed; after boot you must read
[[Alpine_newbie_apk_packages|Alpine post install packages and setup configurations for new users]] where you can follow steps to customize your new system.


= Further Documentation =
= Further Documentation =

Revision as of 23:02, 5 May 2020



Usual Hardware Requirements

  • At least 100 MB of RAM (A desktop system may require up to 1 GB.)
  • The "sys" or "data" run modes (see below) require a storage device.

Install Procedure

Similar to many other distributions, the first installation steps usually consist of

  1. Downloading one of the latest stable-release ISOs, and comparing the image's sha265sum checksum to the one in the corresponding *.sha256 checksum file () and verify its GPG signature.
  2. Either burning the ISO onto a blank CD with your favorite CD burning software, or creating a bootable USB drive.
  3. Booting from the CD or USB drive, and logging in to the command line as user root with its initally empty password.

(For installing on ARM systems, see Alpine on ARM.)

However, contrary to most other distributions, this initially booted Alpinelinux (command line environment) is first copied entirely into RAM, and then runs completely independent from the (slow) initial boot media. And then, the setup-alpine script, and other tools, are used to configure the initial Alpinelinux system, install further packages, and prepare the system for the next boot.

Alpinelinux can boot into three general run modes:

diskless mode This is the default boot mode of the .iso images. With the setup-alpine selection "disk=none" the whole system runs from RAM. Customized configuration and package selections may still be preserved on permanent storage media with lbu, the "local backup tool", and by using a local package cache.

data mode This mode also runs mostly from RAM, with the exception of a selected writable partition that gets mounted as /var. It is better-suited when large amounts of data need to be preserved between reboots, e.g. for mailspools, databases or log servers, and so on.

sys mode This is a traditional hard-disk install. The setup-alpine script defaults to create three partitions on the selected disk, for /boot, swap and / (filesystem root). This mode may be used for desktops, development boxes, and virtual machines.


Additional Hints

Booting from external devices

Insert the media to the proper drive or port of the computer and turn on the computer. But depending on the computer it may be necessary, e.g. to press the `F12` key to get a selection to choose the media to boot from.

The setup-alpine questions

The setup-alpine script will ask to configure several things, including:

  • Keyboard map (e.g. us and variant of us-nodeadkeys)
  • Hostname (The name for the computer.)
  • Network options
  • DNS options: Not recommended to use 8.8.8.8 (google servers).
  • Timezone
  • Proxy ("None" to connect directly to the internet.)
  • SSH (Openssh is part of the default images.)
  • NTP (Chrony is part of the default images.)
  • Mode (Select between "diskless", "data" or "sys" as described above.)


Booting and using the new system

After the installation is completed, depending on the run mode, the initial installation media may be removed and the system can be booted from the newly installed device. After booting one may read Alpine post install packages and setup configurations for new users and find further areas to customize the new system.


Further Documentation

Post-Install

Further Help and Information

See Also

  1. Newbie_Alpine_Ecosystem
  2. Alpine newbie install manual
  3. https://mckayemu.github.io/alpineinstalls/ All informatin for Spanish users