Alpine Linux:FAQ: Difference between revisions

From Alpine Linux
(racrac)
(move links to About and Overview)
(48 intermediate revisions by 15 users not shown)
Line 1: Line 1:
oloelt
[[Image:filetypes.svg|64px|left|link=]]
=Fequently Asked Questions=
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.
{{Tip| Prepare your question. Think it through. Make it simple and understandable.}}


==General==
=General=


=== I have found a bug, where can I report it? ===
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]].
Before reporting any bugs, please search the [http://bugs.alpinelinux.org bug database] to make sure that the bug is not already reported.


Preferred way to send bug reportes is via the ''sendbug'' application shipped with alpine. Run ''setup-sendbug'' to configure your default sender email address and your outgoing SMTP server.
== I have found a bug, where can I report it? ==
You can report it on the [http://bugs.alpinelinux.org/ bugtracker].


Once that is done, run
== Are there any details about the releases available? ==
sendbug
Yes, please check the [[Alpine Linux:Releases|Releases]] page.


If your alpine box is unable to send emails for some reason it is also possible to just to send an email to bugs [at] alpinelinux.org. Please make the bug report as specific as possible.
== 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}}.


For general tips how to write a good bug reports, see [http://www.chiark.greenend.org.uk/~sgtatham/bugs.html this article].
== How can I contribute? ==
You can contribute by:
* using the software and giving feedback
* by documenting your [http://www.alpinelinux.org Alpine Linux] experiences on this [[Main_Page|wiki]]
* in many other ways
Please visit [[Contribute|Contribute page]] to read more about this topic.


'''NOTE:''' On alpine releases prior 1.7.5 you will need to use ''send-pr'' instead of 'sendbug''. Use ''setup-problem-reporting'' to configure your email adress and outgoing SMTP server.
Your contributions are highly appreciated.
 
== How do I remove the CDROM? ==
Since the modloop loopback device is on CDROM you cannot just run ''eject''. 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? ==
The {{pkg|man}} command and man pages are not installed by default.
 
* First, install the {{pkg|man}} package:
: {{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 <pkg>-doc}}
: For example, say you installed {{pkg|iptables}} and you now require its {{pkg|man}} pages:
: {{Cmd|apk add iptables-doc}}
<br />
In our example above, we installed the man pages (and other documentation) for iptables. We can now read it:
{{Cmd|man iptables}}
 
==Booting Alpine on an HP ML350 G6==
{{Note|This 'Booting Alpine on an HP ML350 G6' section, only applies to [http://www.alpinelinux.org/ Alpine Linux] 1.9.3 and earlier.}}
[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.
 
==My cron jobs don't run?==
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 -t /etc/periodic/[foldername]}} - for example: ''run-parts -t /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 : {{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? ==
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>
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.
 
== What kind of release of Alpine Linux are available? ==
Please check the [[Alpine_Linux:Releases|Releases]] page for more information.
 
=Setup=
 
== What is the difference between 'sys', 'data', and 'diskless' installs 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.<br>
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.  The system itself will run from tmpfs (RAM). 
 
Use this mode if you only want to use the disk(s) for a mailspool, databases, logs, etc.


'''TIP:''' If you have problems with the vi editor, try installing nano. Set the environment variable ''EDITOR'' to make send-pr use nano.
'''diskless:''' No disks are to be used[[Alpine local backup]] may still be used in this mode.
  apk_add nano
echo "EDITOR=nano" >> /etc/profile
export EDITOR=nano
sendbug


=== Can I track the progress of my bug report ? ===
== How can I install a custom firmware in a diskless system? ==


The bug reporting database is currently at
The modules and firmware are both special images which are mounted as read-only.<br>
http://bugs.alpinelinux.org/cgi-bin/gnats.lsp
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.


Note this is a ''read only'' view of the database - you still have to send updates in via email, as described above.
=Audio=


=== How can I contribute? ===
== How do I play my .ogg/.mp3 files? ==
You can contribute by using the software and give feedback.
First, the sound card should be recognized (you must have {{path|/dev/snd/*****}} files)
You can contribute by helping with the documenting your experiences using this wiki.


Your contributions are highly appreciated.
{{pkg|sox}}, {{pkg|mpg123}}, etc all use the oss sound driver, while Alpine uses ALSA drivers.<br>
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}}


==Audio==
= Time and timezones =


=== How do I play my .ogg/.mp3 files? ===
== How do I set the local timezone? ==
First, the sound card should be recognized (you must have /dev/snd/***** files)


sox, mpg321, mpg123, oggplay, etc all use the oss sound driver, while Alpine uses ALSA drivers. So you need to load the snd-pcm-oss compatibility module. While you're at it, you might need aumix to turn up the sound volume
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 you wish to edit the timezone after installation, run the [[Alpine_setup_scripts|setup-timezone]] script.


echo snd-pcm-oss >> /etc/modules
However, if you are using a previous version, please use the following steps:
modprobe snd-pcm-oss
apk_add aumix sox
aumix (set volume settings)
play really_cool_song.mp3


== Time and timezones ==
/etc/timezone and the whole zoneinfo directory tree are not supported.
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''


=== How do I set local timezone? ===
For more information, see how other uClibc-based distributions do this:
Timezone if set in the file /etc/TZ. If this is not set time will displayed in UTC. Set how other uClibc based distros does this:
* http://leaf.sourceforge.net/doc/buci-tz3.html
http://leaf.sourceforge.net/doc/buci-tz3.html
* http://www.sonoracomm.com/index.php?option=com_content&task=view&id=107&Itemid=32
http://www.sonoracomm.com/index.php?option=com_content&task=view&id=107&Itemid=32


For a more complete list over timezones see http://astronomy.physics.tamu.edu/Java/Tools/Misc/Clock/zones.html
For a more complete list of timezones, please see: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones


=== OpenNTPD reports an error with "adjtime" ===
== OpenNTPD reports an error with "adjtime" ==
Your log display something like:
Your log contains something like:
  reply from 85.214.86.126: offset 865033148.784255 delay 0.055466, next query 32s
  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
  reply from 202.150.212.24: offset 865033148.779314 delay 0.400771, next query 3s
Line 66: Line 141:
  adjtime failed: Invalid argument     
  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)
{{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}} heirarchy 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: [http://www.pool.ntp.org/zone/@ http://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 {{pkg|openntpd}} server.
 
Only thing to do is wait, do something else for 15-20mins and then check.
 
= Packages =
== Can you build an apk package for ...? ==
Yes, we probably can.<br>
Please create an [http://redmine.alpinelinux.org/projects/alpine/issues/new issue] in the [http://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? ==
Please see the [[Creating an Alpine package]] page.
 
== 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.


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''.
To check the content of the repositories file
{{Cmd|cat /etc/apk/repositories}}


or
{{Cmd|setup-apkrepos}}


== Packages ==
= Dynamic DNS =
=== Can you build an apk package for ...? ===
== How do I schedule a regular dynamic DNS update? ==
Yes, I probably can. Please check if your wanted package exist in gentoo portage by searching in http://packages.gentoo.org. Please post a package request on [http://lists.alpinelinux.org/mailman/listinfo/alpine-devel alpine-devel] mailing list and we will look at it.
You'll want to install the {{pkg|ez-ipupdate}} package:
{{cmd|apk add ez-ipupdate}}


If there is no Gentoo package, then the best would be to create and ebuild and submit it to http://bugs.gentoo.org. Once your package is in gentoo its very easy to create and maintain the package in Alpine. During special conditions, we might create and maintain this package in the Alpine portage overlay, but its best if it could be officially included in Gentoo.
After that, create a new file at {{path|/etc/ezipupdate.conf}} with the contents similar to:
service-type=dyndns
user=myusername:mypassword
interface=eth1
host=myhostname.dyndns.org


Currently, packages that require gettext, iconv, java or mono will be rejected for technical reasons. Packages requiring xorg, ruby, python perl, php or will most likely also be rejected but not for technical reasons.
Make the new ip cache directory:
{{cmd|mkdir /var/cache/ez-ipupdate
lbu add /var/cache/ez-ipupdate}}


=== How can i build my own package? ===
Then schedule a new cron job with this command:
If you need compile you will need a toolchain to do it for you. Use the [http://dl.alpinelinux.org/alpine/v1.7/buildroot/ alpine-buildroot] as base and set up a Gentoo hardened uclibc [http://www.bulah.com/embeddedgentoo.html chroot].
{{cmd|echo >> /var/log/ez-ipupdate && /bin/date >> /var/log/ez-ipupdate && ez-ipupdate --config /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}}


If you want to create a package that just containins scripts, then you can simply create a tar.gz package and give it a proper name. There is a utlity, [http://apk-tools.sourceforge.net/apk_create.html apk_create], to assist you in creating packages. The [http://apk-tools.sourceforge.net/apk_create.html man page] has details on internals.
Don't forget to backup your settings!
{{cmd|lbu ci}}

Revision as of 09:36, 9 November 2012

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

To get oriented and learn what makes our distribution distinctive, see the About page or our more detailed overview.

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

You can report it on the bugtracker.

Are there any details about the releases available?

Yes, please check the Releases page.

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 can I contribute?

You can contribute by:

  • using the software and giving feedback
  • by documenting your Alpine Linux experiences on this wiki
  • in many other ways

Please visit 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 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 cdrom:

eject

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

The man command and man pages are not installed by default.

  • First, install the man package:

apk add man

  • Once that's done, install the documentation for the packages that you require man pages for:
    (Keep in mind, however, it's possible that not all packages will have a corresponding documentation package.)

apk add <pkg>-doc

For example, say you installed iptables and you now require its man pages:

apk add iptables-doc


In our example above, we installed the man pages (and other documentation) for iptables. We can now read it:

man iptables

Booting Alpine on an HP ML350 G6

Note: This 'Booting Alpine on an HP ML350 G6' section, only applies to Alpine Linux 1.9.3 and earlier.

Ticket 228 on 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 hpwdt.apkovl.tar.gz) containing /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.

My cron jobs don't run?

The cron daemon is started automatically on system boot and executes the scripts placed in the folders under /etc/periodic - there's a 15min folder, plus ones for hourly, daily, weekly and monthly scripts.

You can check whether your scripts are likely to run using the command:

run-parts -t /etc/periodic/[foldername]

- for example: run-parts -t /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 a+x [scriptname]

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

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 kind of release of Alpine Linux are available?

Please check the Releases page for more information.

Setup

What is the difference between 'sys', 'data', and 'diskless' installs 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. The system itself will run from tmpfs (RAM).

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.

How can I install a 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.

Audio

How do I play my .ogg/.mp3 files?

First, the sound card should be recognized (you must have /dev/snd/***** files)

sox, mpg123, etc all use the oss sound driver, while Alpine uses ALSA drivers.
So you need to load the snd-pcm-oss compatibility module.
While you're at it, you might need aumix to turn up the sound volume

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

How do I set the local timezone?

Starting in Alpine 2.2, setting the timezone can be done through the setup-alpine script, and no manual settings should be necessary.
If you wish to edit the timezone after installation, run the setup-timezone script.

However, if you are using a previous version, please use the following steps:

/etc/timezone and the whole zoneinfo directory tree are not supported.
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:

For a more complete list of timezones, please see: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones

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 heirarchy 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: http://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.

Packages

Can you build an apk package for ...?

Yes, we probably can.
Please create an issue in the 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?

Please see the Creating an Alpine package page.

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 if an entry points to .../v2.4/testing/. This directory is gone.

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/ezipupdate.conf with the 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 /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