Alpine Linux:FAQ: Difference between revisions

From Alpine Linux
m (changing lsusb/lspci informations)
 
(76 intermediate revisions by 30 users not shown)
Line 1: Line 1:
[[Image:filetypes.svg|64px|left|link=]]
[[Image:filetypes.svg|64px|left|link=]]
This is a list of '''frequently asked questions''' about Alpine Linux.<br>
This is a list of '''frequently asked questions''' about Alpine Linux.<br />
If your question is not answered on this page, use the search box above to find work in progress pages not linked here, or in case of no answer, edit this page and write down your question.
If your question is not answered on this page, use the search box above to find work in progress pages not linked here, or in case of no answer, edit this page and write down your question.
{{Tip| Prepare your question. Think it through. Make it simple and understandable.}}  
{{Tip| Prepare your question. Think it through. Make it simple and understandable.}}  
Line 6: Line 6:
=General=
=General=


To get oriented and learn what makes our distribution distinctive, see the [http://alpinelinux.org/about About page] or [[Alpine Linux:Overview|our more detailed overview]].
Alpine Linux is used heavily in containers (e.g. Docker images) on servers, so many of its main packages are focused on server services.
 
== Where to start? ==
 
The [[Installation]] page and the [[Installation#Post-Installation|Post Installation]] section on that page, provide a basic orientation.
 
A broader overview may be found on the official [https://alpinelinux.org/about About] page and at the [[Alpine Linux:Overview|wiki overview]].
 
Please note that testing is safer on your own virtual machine.


== I have found a bug, where can I report it? ==
== I have found a bug, where can I report it? ==
You can report it on the [http://bugs.alpinelinux.org/ bugtracker].
 
You can report it on the [https://gitlab.alpinelinux.org/groups/alpine/-/issues bugtracker], but search it first to see if the issue has already been reported.


== Are there any details about the releases available? ==
== Are there any details about the releases available? ==
Yes, please check the [[Alpine Linux:Releases|Releases]] page.
Yes, please check the [https://alpinelinux.org/releases/ releases] page.
 
== Alpine freezes during boot from Compact Flash, how can I fix? ==
Most Compact Flash card readers do not support proper DMA.<br>
You should append '''nodma''' to the ''append'' line in {{path|syslinux.cfg}}.


== How can I contribute? ==
== How can I contribute? ==
You can contribute by:
You can contribute by:
* using the software and giving feedback
* Using the software and giving [https://gitlab.alpinelinux.org/groups/alpine/-/issues feedback].
* by documenting your [http://www.alpinelinux.org Alpine Linux] experiences on this [[Main_Page|wiki]]
* Documenting your [https://www.alpinelinux.org Alpine Linux] experiences on this [[Main_Page|wiki]].
* in many other ways
* Flag packages as outdated in the [https://pkgs.alpinelinux.org/packages package database], or even better enable release monitoring in [https://release-monitoring.org/ Anitya] for them.
Please visit [[Contribute|Contribute page]] to read more about this topic.
* In many other ways.
 
Please visit the [[Contribute|Contribute page]] to read more about this topic.
Your contributions are highly appreciated.
 
== How do I remove the CDROM? ==
Since the modloop loopback device is on CDROM you cannot just run <code>eject</code>. You need to unmount the modloop first.<br>
Unmounting both the modloop and the CDROM in one step can be done by executing:
{{Cmd|/etc/init.d/modloop stop}}
 
Then it's possible to eject the CDROM:
{{Cmd|eject}}


== Why don't I have man pages or where is the 'man' command? ==
== Why don't I have man pages or where is the 'man' command? ==
The <code>man</code> command and man pages are not installed by default.


* First, install the {{pkg|man}} package:
The <code>man</code> command and {{pkg|man-pages}}, the system's ''core'' manual pages are not installed by default. Since binary packages are thinned out and split, documentation sub-packages in the format '''packagename-doc''' are not installed by default.  
: {{Cmd|apk add man}}
* Once that's done, install the documentation for the packages that you require man pages for.<br />(Keep in mind, however, it's possible that not all packages will have a corresponding documentation package.)
: {{Cmd|apk add ''package''-doc}}
: For example, say you installed {{Pkg|iptables}} and you now require its man pages:
: {{Cmd|apk add iptables-doc}}
<br />
In our example above, we installed the man pages (and other documentation) for <code>iptables</code>. We can now read it:
{{Cmd|man iptables}}


==Booting Alpine on an HP ML350 G6==
Install the <code>man</code> command:
{{Note|This 'Booting Alpine on an HP ML350 G6' section, only applies to [http://www.alpinelinux.org/ Alpine Linux] 1.9.3 and earlier.}}
{{cmd|# apk add {{pkg|mandoc}}}}
[http://bugs.alpinelinux.org/issues/228 Ticket 228] on [http://bugs.alpinelinux.org/ bugs.alpinelinux.org] includes a patch that disables the kernel module hpwdt by default.


Details: Kernel module for HP Watchdog Timer causes issues during boot.  Solution is to create an overlay (ie {{path|hpwdt.apkovl.tar.gz}}) containing {{path|/etc/modprobe.d/hpwdt}} (which contains "blacklist hpwdt"), place that on some removable media (ie USB key) and insert that during boot process.  This will insure that the offending module doesn't load and that the server will boot properly.
Optionally, install the <code>apropos</code> command to search in '''man pages''':
{{cmd|# apk add {{pkg|mandoc-apropos}}}}  


==My cron jobs don't run?==
Once {{pkg|mandoc}} is installed,add documentation for the package where you need it. For example, say you installed nftables and you now require its man pages:
{{cmd|# apk add {{pkg|nftables-doc}}}}


Start service ''crond'' and add it to runlevel:
The {{pkg|docs}} meta package installs the documentation sub-package for all the currently installed packages and {{pkg|mandoc}}, if unavailable. {{pkg|docs}} meta package ensures that documentation sub-packages are installed or removed automatically for any packages that you may add/remove in future.


: {{cmd|rc-service crond start && rc-update add crond}}
{{cmd|# apk add docs}}
 
After that the cron daemon is started automatically on system boot and executes the scripts placed in the folders under {{path|/etc/periodic}} - there's a {{path|15min}} folder, plus ones for {{path|hourly}}, {{path|daily}}, {{path|weekly}} and {{path|monthly}} scripts.
 
You can check whether your scripts are likely to run using the command:


: {{cmd|run-parts --test /etc/periodic/[foldername]}} - for example: ''run-parts --test /etc/periodic/15min''
Keep in mind not all packages have a corresponding documentation package and even when it has one it may not be in the form '''man pages'''.
 
This command will tell you what should run but will not actually execute the scripts.
 
If the results of the test are not as expected, check the following:
 
* Make sure the script is executable - if unsure, issue the command : {{cmd|chmod a+x [scriptname]}}
* Make sure the first line of your script is :<pre>#!/bin/sh</pre>
* Do not put file extensions on your script names - this stops them from working; for example: {{path|myscript}}  will run, but {{path|myscript.sh}} won't


== What is the difference between edge and stable releases? ==
== What is the difference between edge and stable releases? ==
Stable releases are just what they sound like: initially a point-in-time snapshot of the package archives, but then maintained with bugfixes only in order to keep a stable environment.
Stable releases are just what they sound like: initially a point-in-time snapshot of the package archives, but then maintained with bugfixes only in order to keep a stable environment.


[[Edge]] is more of a rolling-release, with the latest and greatest packages available in the online repositories.<br>
[[Repositories#Edge|Edge]] is more of a rolling-release, with the latest and greatest packages available in the online repositories.<br />
Occasionally, snapshot ISO images of the then-current state of [[edge]] are made and are available for download.<br>
Occasionally, snapshot ISO images of the then-current state of edge are made and are available for download.<br />
Typically these are made when there are major kernel upgrades or package upgrades that require initramfs rebuilds.
Typically these are made when there are major kernel upgrades or package upgrades that require initramfs rebuilds.


== What kind of release of Alpine Linux are available? ==
== What architectures does Alpine Linux support? ==
Please check the [[Alpine_Linux:Releases|Releases]] page for more information.
* '''aarch64''': 64-bit ARM processors (e.g. Raspberry Pi 4)
* '''armhf''': 32-bit ARMv6 processors with a floating point unit (e.g. Raspberry Pi 1) (armv6hf)
* '''armv7''': 32-bit ARMv7 processors with a floating point unit (armv7hf)
* '''s390x''': IBM mainframes using the z/Architecture (z196 minimum)
* '''ppc64le''': 64-bit little-endian POWER devices (e.g. Raptor Talos II) (POWER8 minimum)
* '''x86''': 32-bit Intel and AMD processors commonly found in older personal computers (e.g. Pentium M+). Can also run on x86_64 machines (not recommended). Requires SSE2 and CMOV.
* '''x86_64''': 64-bit Intel and AMD processors commonly found in personal computers (e.g. Core i7, Ryzen 7)
'''Please check [https://alpinelinux.org/downloads Download] page for media availability on each one''' and check [https://alpinelinux.org/releases/ Release Branches] page for latest.
 
== What kinds of release of Alpine Linux are available? ==
Please check the [https://alpinelinux.org/releases/ Release Branches] page for more information.


=Setup=
=Setup=


== What is the difference between 'sys', 'data', and 'diskless' installs when running setup-alpine (or setup-disk)? ==
== What is the difference between ''sys'', ''data'', and ''diskless'' when running <code>setup-alpine</code> or <code>setup-disk</code>? ==
'''sys:''' This mode is a traditional disk install. The following partitions will be created on the disk: /boot, / (filesystem root) and swap.<br>
 
'''sys:''' This mode is a traditional disk install. The following partitions will be created on the disk: ''/boot/'', ''/'' (filesystem root) and ''swap''.
This mode may be used for development boxes, desktops, virtual servers, etc.
This mode may be used for development boxes, desktops, virtual servers, etc.


'''data:''' This mode uses your disk(s) for data storage, not for the operating system. Only /var is created on disk.  The system itself will run from tmpfs (RAM).   
'''data:''' This mode uses your disk(s) for data storage, not for the operating system. Runs from the media and only a ''/var/'' is created on disk.  The system itself will run from a ''tmpfs'' (RAM).  Use this mode if you only want to use the disk(s) for data, like ''mailspool'', ''databases'', ''logs'', etc.


Use this mode if you only want to use the disk(s) for a mailspool, databases, logs, etc.
'''diskless:''' No disks are to be used. [[Alpine local backup]] may still be used in this mode.


'''diskless:''' No disks are to be used.  [[Alpine local backup]] may still be used in this mode.
These modes are explained further on the [[Installation#Installation_Overview|'''Installation''']] page.


These modes are explained further [[Installation#Basics|on the Installation page]].
== How do I upgrade Alpine? ==


== How can I install a custom firmware in a diskless system? ==
To upgrade to a new stable release or edge:
{{ic|apk upgrade --available}}


The modules and firmware are both special images which are mounted as read-only.<br>
==Why don't my cron jobs run?==
To fix this issue you can copy the firmware directory to your writeable media (cf/usb) and copy your custom firmware to it.<br>
After reboot Alpine should automatically use the directory on your local storage instead of the loopback device.


=Audio=
Start service ''crond'' and add it to the default runlevel:


== How do I play my .ogg/.mp3 files? ==
: {{cmd|rc-service crond start && rc-update add crond}}
First, the sound card should be recognized (you must have {{path|/dev/snd/*****}} files)


{{pkg|sox}}, {{pkg|mpg123}}, etc all use the oss sound driver, while Alpine uses ALSA drivers.<br>
After that the cron daemon is started automatically on system boot and executes the scripts placed in the folders under ''/etc/periodic/'' - there are folders for ''15min'', ''hourly'', ''daily'', ''weekly'' and ''monthly'' scripts.
So you need to load the snd-pcm-oss compatibility module.<br>
While you're at it, you might need {{pkg|aumix}} to turn up the sound volume
{{cmd|echo snd-pcm-oss >> /etc/modules
modprobe snd-pcm-oss
apk_add aumix sox
aumix (set volume settings)
play really_cool_song.mp3}}


= Time and timezones =
To check whether your scripts are likely to run, use the ''run-parts'' command, for example:
 
: {{cmd|run-parts --test /etc/periodic/15min}}


== How do I set the local timezone? ==
This command will tell you what should run but will not actually execute the scripts.


Starting in Alpine 2.2, setting the timezone can be done through the [[Setup-alpine|setup-alpine]] script, and no manual settings should be necessary.<br>
If the results of the test are not as expected, check the following:
If you wish to edit the timezone after installation, run the [[Alpine_setup_scripts|setup-timezone]] script.


However, if you are using a previous version, please use the following steps:
* Make sure the script is executable - if unsure, issue the command {{cmd|chmod +x /etc/periodic/[path/scriptname]}}
* Make sure the first line of your script is <code>#!/bin/sh</code>
* Do not use periods on your script file names - this stops them from working; for example: {{Path|/etc/periodic/daily/myscript}} will run, but {{Path|/etc/periodic/daily/myscript.sh}} won't.


/etc/timezone and the whole zoneinfo directory tree are not supported.
= Time and timezones =
To set the timezone, set the TZ environment variable as specified in
http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
or you may also create an /etc/TZ file of a single line, ending with a
newline, containing the TZ setting.  For example
echo CST6CDT > /etc/TZ
''Source: http://www.uclibc.org/downloads/Glibc_vs_uClibc_Differences.txt''


For more information, see how other uClibc-based distributions do this:
== How do I set the local timezone? ==
* http://leaf.sourceforge.net/doc/buci-tz3.html
* http://www.sonoracomm.com/index.php?option=com_content&task=view&id=107&Itemid=32


For a more complete list of timezones, please see: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
If you wish to edit the ''timezone'' (TZ) after installation, run the [[Alpine_setup_scripts#setup-timezone|setup-timezone]] script.


== OpenNTPD reports an error with "adjtime" ==
= Packages =
Your log contains something like:
reply from 85.214.86.126: offset 865033148.784255 delay 0.055466, next query 32s
reply from 202.150.212.24: offset 865033148.779314 delay 0.400771, next query 3s
adjusting local clock by 865033148.779835s                                     
adjtime failed: Invalid argument   


{{pkg|openntpd}} is supposed to make small adjustments in the time without causing time jumps.<br>
== Can you build an APK package for ...? ==
If the adjustment is too big then something is clearly wrong and ntpd gives up. (its actually adjtime(3) that has a limit on how big adjustments are allowed)
Please create an [https://gitlab.alpinelinux.org/alpine/aports/issues/new issue] in the [https://gitlab.alpinelinux.org bugtracker]. Prefix it with "package request:" in the title and include a short description (one-line), a URL for the home page, why you need it, and a URL for the source package.


You can make ntpd set the time at startup by adding ''-s'' option to ntpd. This is done by setting '''NTPD_OPTS="-s"''' in {{path|/etc/conf.d/ntpd}}.
== How can I build my own package? ==
Please see the [[Creating an Alpine package]] page.


== Using a cron job to keep the time in sync ==
== What does "required by: world[$pkgname]" mean? ==
Add the following to {{path|/etc/periodic/daily}} (or use another folder under the {{path|/etc/periodic}} heirarchy if you want to run the script more/less frequently)


Example: file called {{path|do-ntp}}
It means that the package you tried to install does not exist in the repositories you have configured.  
<pre>
#!/bin/sh
ntpd -d -q -n -p uk.pool.ntp.org</pre>


This queries the uk time server pool - you can modify this to suit your localisation, or just use ''pool.ntp.org''. More info here: [http://www.pool.ntp.org/zone/@ http://www.pool.ntp.org/zone/@]
Maybe you forgot to add community or testing to {{path|/etc/apk/repositories}}?


== Windows clients reports an error when trying to sync ==
Or is the package in a [[Alpine Package Keeper#Repository pinning|pinned repository]] and you forgot to suffix the package with the repo tag? Example:
{{pkg|openntpd}} needs to run for a while before it is satisfied it is in sync.
Until then it will set a flag "clock not synchronized" and Windows will report an error while trying to sync with your {{pkg|openntpd}} server.


Only thing to do is wait, do something else for 15-20mins and then check.
{{cmd|apk add experimental-package@testing}}


= Packages =
== How can I find out if a certain package exists in Alpine? ==
== Can you build an apk package for ...? ==
Yes, we probably can.<br>
Please create an [https://bugs.alpinelinux.org/projects/alpine/issues/new issue] in the [https://bugs.alpinelinux.org bugtracker]. Mark it as "feature" and include a short description (one-line), an url for the home page, and an url for the source package.


== How can I build my own package? ==
If you want to only search repositories you have configured in /etc/apk/repositories, then <code>apk search $pkgname</code> should get you sorted. If you want to search all repositories have a look at the [https://pkgs.alpinelinux.org/ online pkg oracle]
Please see the [[Creating an Alpine package]] page.


== WARNING: Ignoring APKINDEX.xxxx.tar.gz ==
== WARNING: Ignoring APKINDEX.xxxx.tar.gz ==
If you get <code>WARNING: Ignoring APKINDEX.xxxx.tar.gz: No such file or directory</code> while running package related tools, check your {{path|/etc/apk/repositories}} file if an entry points to {{path|.../v2.4/testing/}}. This directory is gone.
If you get <code>WARNING: Ignoring APKINDEX.xxxx.tar.gz: No such file or directory</code> while running [[Alpine_Linux_package_management|package related tools]], check your {{Path|/etc/apk/repositories}} file.


To check the content of the repositories file
To check the content of the repositories file
Line 185: Line 144:
or  
or  
{{Cmd|setup-apkrepos}}
{{Cmd|setup-apkrepos}}
== What does "required by: world[$pkgname]" mean? ==
It means that the package you try to install does not exist in the repositories you have configured in <code>/etc/apk/repositories</code>. Maybe you forgot to add community, testing or unmaintained to /etc/apk/repositories?
== How can i find out if a certain package exists in alpine? ==
If you want to only search repositories you have configured in /etc/apk/repositories, then <code>apk search $pkgname</code> should get you sorted. If you want to search all repositories have a look at the [https://pkgs.alpinelinux.org/ online pkg oracle]


= Dynamic DNS =
= Dynamic DNS =
Line 210: Line 161:


Then schedule a new cron job with this command:
Then schedule a new cron job with this command:
{{cmd|echo >> /var/log/ez-ipupdate && \<br>/bin/date >> /var/log/ez-ipupdate && \<br>ez-ipupdate --config-file /etc/ez-ipupdate.conf -f -F /var/run/ez-ipupdate.pid \<br>  --cache-file /var/cache/ez-ipupdate/ipcache --quiet >> /var/log/ez-ipupdate 2>&1}}
{{cmd|echo >> /var/log/ez-ipupdate && \<br />/bin/date >> /var/log/ez-ipupdate && \<br />ez-ipupdate --config-file /etc/ez-ipupdate.conf -f -F /var/run/ez-ipupdate.pid \<br />  --cache-file /var/cache/ez-ipupdate/ipcache --quiet >> /var/log/ez-ipupdate 2>&1}}


Don't forget to backup your settings!
Don't forget to backup your settings!
Line 225: Line 176:


{{cmd|apk add less}}
{{cmd|apk add less}}
Additionally, for colorized diff while using verbose commit (<tt>git commit -v</tt>), add this to shell init scripts (e.g.: {{Path|~/.profile}}):
{{Cat|~/.profile|<nowiki>export GIT_EDITOR=vim</nowiki>}}
== Fix lacking lsusb / lspci output ==
If you launch {{ic|lsusb}} or {{ic|lspci}} on a minimal installation, there's no device descriptions, and the latter doesn't exist.
This can be fixed by installing the '''{{pkg|usbutils}}''' and '''{{pkg|hwdata}}''' tables.
= Old questions, no longer frequently asked =
== Alpine freezes during boot from Compact Flash, how can I fix? ==
Most Compact Flash card readers do not support proper DMA.<br />
You should append '''nodma''' to the ''append'' line in {{path|syslinux.cfg}}.
== How do I remove the CD-ROM? ==
Since the modloop loopback device is on CD-ROM you cannot just run <code>eject</code>. You need to unmount the modloop first.<br />
Unmounting both the modloop and the CDROM in one step can be done by executing:
{{Cmd|/etc/init.d/modloop stop}}
Then it's possible to eject the CD-ROM:
{{Cmd|eject}}
== How can I install custom firmware in a diskless system? ==
The modules and firmware are both special images which are mounted as read-only.<br />
To fix this issue you can copy the firmware directory to your writeable media (cf/usb) and copy your custom firmware to it.<br />
After reboot Alpine should automatically use the directory on your local storage instead of the loopback device.
== OpenNTPD reports an error with "adjtime" ==
Your log contains something like:
reply from 85.214.86.126: offset 865033148.784255 delay 0.055466, next query 32s
reply from 202.150.212.24: offset 865033148.779314 delay 0.400771, next query 3s
adjusting local clock by 865033148.779835s                                     
adjtime failed: Invalid argument   
{{pkg|openntpd}} is supposed to make small adjustments in the time without causing time jumps.<br />
If the adjustment is too big then something is clearly wrong and ntpd gives up. (its actually adjtime(3) that has a limit on how big adjustments are allowed)
You can make ntpd set the time at startup by adding ''-s'' option to ntpd. This is done by setting '''NTPD_OPTS="-s"''' in {{path|/etc/conf.d/ntpd}}.
== Using a cron job to keep the time in sync ==
Add the following to {{path|/etc/periodic/daily}} (or use another folder under the {{path|/etc/periodic}} hierarchy if you want to run the script more/less frequently)
Example: file called {{path|do-ntp}}
<pre>
#!/bin/sh
ntpd -d -q -n -p uk.pool.ntp.org</pre>
This queries the uk time server pool - you can modify this to suit your localisation, or just use ''pool.ntp.org''. More info here: [https://www.pool.ntp.org/zone/@ https://www.pool.ntp.org/zone/@]
== Windows clients reports an error when trying to sync ==
{{pkg|openntpd}} needs to run for a while before it is satisfied it is in sync.
Until then it will set a flag "clock not synchronized" and Windows will report an error while trying to sync with your openntpd server.
Only thing to do is wait, do something else for 15-20mins and then check.
[[Category:Newbie]]

Latest revision as of 01:53, 9 October 2024

This is a list of frequently asked questions about Alpine Linux.
If your question is not answered on this page, use the search box above to find work in progress pages not linked here, or in case of no answer, edit this page and write down your question.

Tip: Prepare your question. Think it through. Make it simple and understandable.

General

Alpine Linux is used heavily in containers (e.g. Docker images) on servers, so many of its main packages are focused on server services.

Where to start?

The Installation page and the Post Installation section on that page, provide a basic orientation.

A broader overview may be found on the official About page and at the wiki overview.

Please note that testing is safer on your own virtual machine.

I have found a bug, where can I report it?

You can report it on the bugtracker, but search it first to see if the issue has already been reported.

Are there any details about the releases available?

Yes, please check the releases page.

How can I contribute?

You can contribute by:

Please visit the Contribute page to read more about this topic.

Why don't I have man pages or where is the 'man' command?

The man command and man-pages, the system's core manual pages are not installed by default. Since binary packages are thinned out and split, documentation sub-packages in the format packagename-doc are not installed by default.

Install the man command:

# apk add mandoc

Optionally, install the apropos command to search in man pages:

# apk add mandoc-apropos

Once mandoc is installed,add documentation for the package where you need it. For example, say you installed nftables and you now require its man pages:

# apk add nftables-doc

The docs meta package installs the documentation sub-package for all the currently installed packages and mandoc, if unavailable. docs meta package ensures that documentation sub-packages are installed or removed automatically for any packages that you may add/remove in future.

# apk add docs

Keep in mind not all packages have a corresponding documentation package and even when it has one it may not be in the form man pages.

What is the difference between edge and stable releases?

Stable releases are just what they sound like: initially a point-in-time snapshot of the package archives, but then maintained with bugfixes only in order to keep a stable environment.

Edge is more of a rolling-release, with the latest and greatest packages available in the online repositories.
Occasionally, snapshot ISO images of the then-current state of edge are made and are available for download.
Typically these are made when there are major kernel upgrades or package upgrades that require initramfs rebuilds.

What architectures does Alpine Linux support?

  • aarch64: 64-bit ARM processors (e.g. Raspberry Pi 4)
  • armhf: 32-bit ARMv6 processors with a floating point unit (e.g. Raspberry Pi 1) (armv6hf)
  • armv7: 32-bit ARMv7 processors with a floating point unit (armv7hf)
  • s390x: IBM mainframes using the z/Architecture (z196 minimum)
  • ppc64le: 64-bit little-endian POWER devices (e.g. Raptor Talos II) (POWER8 minimum)
  • x86: 32-bit Intel and AMD processors commonly found in older personal computers (e.g. Pentium M+). Can also run on x86_64 machines (not recommended). Requires SSE2 and CMOV.
  • x86_64: 64-bit Intel and AMD processors commonly found in personal computers (e.g. Core i7, Ryzen 7)

Please check Download page for media availability on each one and check Release Branches page for latest.

What kinds of release of Alpine Linux are available?

Please check the Release Branches page for more information.

Setup

What is the difference between sys, data, and diskless when running setup-alpine or setup-disk?

sys: This mode is a traditional disk install. The following partitions will be created on the disk: /boot/, / (filesystem root) and swap. This mode may be used for development boxes, desktops, virtual servers, etc.

data: This mode uses your disk(s) for data storage, not for the operating system. Runs from the media and only a /var/ is created on disk. The system itself will run from a tmpfs (RAM). Use this mode if you only want to use the disk(s) for data, like mailspool, databases, logs, etc.

diskless: No disks are to be used. Alpine local backup may still be used in this mode.

These modes are explained further on the Installation page.

How do I upgrade Alpine?

To upgrade to a new stable release or edge: apk upgrade --available

Why don't my cron jobs run?

Start service crond and add it to the default runlevel:

rc-service crond start && rc-update add crond

After that the cron daemon is started automatically on system boot and executes the scripts placed in the folders under /etc/periodic/ - there are folders for 15min, hourly, daily, weekly and monthly scripts.

To check whether your scripts are likely to run, use the run-parts command, for example:

run-parts --test /etc/periodic/15min

This command will tell you what should run but will not actually execute the scripts.

If the results of the test are not as expected, check the following:

  • Make sure the script is executable - if unsure, issue the command

    chmod +x /etc/periodic/[path/scriptname]

  • Make sure the first line of your script is #!/bin/sh
  • Do not use periods on your script file names - this stops them from working; for example: /etc/periodic/daily/myscript will run, but /etc/periodic/daily/myscript.sh won't.

Time and timezones

How do I set the local timezone?

If you wish to edit the timezone (TZ) after installation, run the setup-timezone script.

Packages

Can you build an APK package for ...?

Please create an issue in the bugtracker. Prefix it with "package request:" in the title and include a short description (one-line), a URL for the home page, why you need it, and a URL for the source package.

How can I build my own package?

Please see the Creating an Alpine package page.

What does "required by: world[$pkgname]" mean?

It means that the package you tried to install does not exist in the repositories you have configured.

Maybe you forgot to add community or testing to /etc/apk/repositories?

Or is the package in a pinned repository and you forgot to suffix the package with the repo tag? Example:

apk add experimental-package@testing

How can I find out if a certain package exists in Alpine?

If you want to only search repositories you have configured in /etc/apk/repositories, then apk search $pkgname should get you sorted. If you want to search all repositories have a look at the online pkg oracle

WARNING: Ignoring APKINDEX.xxxx.tar.gz

If you get WARNING: Ignoring APKINDEX.xxxx.tar.gz: No such file or directory while running package related tools, check your /etc/apk/repositories file.

To check the content of the repositories file

cat /etc/apk/repositories

or

setup-apkrepos

Dynamic DNS

How do I schedule a regular dynamic DNS update?

You'll want to install the ez-ipupdate package:

apk add ez-ipupdate

After that, create a new file at /etc/ez-ipupdate.conf with contents similar to:

service-type=dyndns
user=myusername:mypassword
interface=eth1
host=myhostname.dyndns.org

Make the new ip cache directory:

mkdir /var/cache/ez-ipupdate lbu add /var/cache/ez-ipupdate

Then schedule a new cron job with this command:

echo >> /var/log/ez-ipupdate && \
/bin/date >> /var/log/ez-ipupdate && \
ez-ipupdate --config-file /etc/ez-ipupdate.conf -f -F /var/run/ez-ipupdate.pid \
--cache-file /var/cache/ez-ipupdate/ipcache --quiet >> /var/log/ez-ipupdate 2>&1

Don't forget to backup your settings!

lbu ci

Terminal

How to enable/fix colors for git?

The problem is not in git itself or terminal, but in the less command. Busybox’s less doesn’t support -r (--raw-control-chars) and -R (--RAW-CONTROL-CHARS) options.

The simplest (yet not ideal) solution is to install GNU less:

apk add less

Additionally, for colorized diff while using verbose commit (git commit -v), add this to shell init scripts (e.g.: ~/.profile):

Contents of ~/.profile

export GIT_EDITOR=vim

Fix lacking lsusb / lspci output

If you launch lsusb or lspci on a minimal installation, there's no device descriptions, and the latter doesn't exist.

This can be fixed by installing the usbutils and hwdata tables.

Old questions, no longer frequently asked

Alpine freezes during boot from Compact Flash, how can I fix?

Most Compact Flash card readers do not support proper DMA.
You should append nodma to the append line in syslinux.cfg.

How do I remove the CD-ROM?

Since the modloop loopback device is on CD-ROM you cannot just run eject. You need to unmount the modloop first.
Unmounting both the modloop and the CDROM in one step can be done by executing:

/etc/init.d/modloop stop

Then it's possible to eject the CD-ROM:

eject

How can I install custom firmware in a diskless system?

The modules and firmware are both special images which are mounted as read-only.
To fix this issue you can copy the firmware directory to your writeable media (cf/usb) and copy your custom firmware to it.
After reboot Alpine should automatically use the directory on your local storage instead of the loopback device.

OpenNTPD reports an error with "adjtime"

Your log contains something like:

reply from 85.214.86.126: offset 865033148.784255 delay 0.055466, next query 32s
reply from 202.150.212.24: offset 865033148.779314 delay 0.400771, next query 3s
adjusting local clock by 865033148.779835s                                      
adjtime failed: Invalid argument    

openntpd is supposed to make small adjustments in the time without causing time jumps.
If the adjustment is too big then something is clearly wrong and ntpd gives up. (its actually adjtime(3) that has a limit on how big adjustments are allowed)

You can make ntpd set the time at startup by adding -s option to ntpd. This is done by setting NTPD_OPTS="-s" in /etc/conf.d/ntpd.

Using a cron job to keep the time in sync

Add the following to /etc/periodic/daily (or use another folder under the /etc/periodic hierarchy if you want to run the script more/less frequently)

Example: file called do-ntp

#!/bin/sh
ntpd -d -q -n -p uk.pool.ntp.org

This queries the uk time server pool - you can modify this to suit your localisation, or just use pool.ntp.org. More info here: https://www.pool.ntp.org/zone/@

Windows clients reports an error when trying to sync

openntpd needs to run for a while before it is satisfied it is in sync. Until then it will set a flag "clock not synchronized" and Windows will report an error while trying to sync with your openntpd server.

Only thing to do is wait, do something else for 15-20mins and then check.