/r/AlpineLinux

Photograph via snooOG

Unofficial community devoted to Alpine Linux, a security-oriented, lightweight Linux distribution based on musl libc and busybox.

/r/AlpineLinux

3,370 Subscribers

1

Mounting VMWare shared folder via /etc/fstab

I am a newbie here; and I would like to get some advice on how to mount a VMware shared folder during booting before docker service runs (the container will use the shared folder as its volume)

Things that I have tried:

  1. install open-vm-tools & open-vm-tools-hgfs
  2. add open-vm-tools to default runlevel
  3. add netmount to boot runlevel
  4. add fuse to /etc/modules

Mounting the folder manually works fine so far, however adding this line in the /etc/fstab results in error message "no such device" during booting

.host:/temp    /mnt/hgfs        /usr/bin/vmhgfs-fuse    subtype=vmhgfs-fuse,allow_other    0    0

Is there something that I miss in the configuration?

Thanks.

0 Comments
2024/05/13
18:59 UTC

2

Unprivileged User Namespaces and Flatpak

Hey folks,

Flatpak appears to be mostly broken for me now :( I apologize in advance for mixing multiple probably unrelated issues, but oh well.

I'm running Alpine Linux 3.20 on Edge with Kernel 6.6.29-0-lts on x86_64 and Flatpak 1.14.6. My window manager is Sway.

I'm trying to run the stable Flatpak versions of Chromium, Steam and Discord. I can run VLC in Flatpak just fine.

I just freshly installed the stable version of all Flatpaks I'm referring to in this post, so their version definitely is current.

I first noticed the problem when trying to run Steam. It prints out the following messages:

INFO:root:https://github.com/flathub/com.valvesoftware.Steam/wiki
INFO:root:Will set XDG dirs prefix to /home/anonymous/.var/app/com.valvesoftware.Steam
DEBUG:root:Checking input devices permissions
INFO:root:Overriding TZ to Europe/Berlin
steam.sh[2]: Running Steam on org.freedesktop.platform 23.08 64-bit
steam.sh[2]: STEAM_RUNTIME is enabled automatically
setup.sh[75]: Steam runtime environment up-to-date!
steam.sh[2]: Error: The unofficial Steam Flatpak app now requires user namespaces to be
enabled.

Check that the bubblewrap executable used by Flatpak, usually
/usr/bin/bwrap or /usr/libexec/flatpak-bwrap, is not setuid root.

If the file /proc/sys/kernel/unprivileged_userns_clone exists, check that
it contains value 1.

If the file /proc/sys/user/max_user_namespaces exists, check that its
value is at least 100.

For more details, please see:
https://github.com/flatpak/flatpak/wiki/User-namespace-requirements

Now my issue is that

  • User namespaces are enabled (CONFIG_USER_NS and CONFIG_PID_NS are set to y)
  • Suid bit for /usr/bin/bwrap is not set (and the other bwrap binary does not exist)
  • /proc/sys/kernel/unprivileged_userns_clone doesn't exist
  • /proc/sys/user/max_user_namespaces is 63183

After spending more time on research than I'd like to admit, I added the suid bit to /usr/bin/bwrap.

Now Steam prints out these messages:

INFO:root:https://github.com/flathub/com.valvesoftware.Steam/wiki
INFO:root:Will set XDG dirs prefix to /home/anonymous/.var/app/com.valvesoftware.Steam
DEBUG:root:Checking input devices permissions
INFO:root:Overriding TZ to Europe/Berlin
steam.sh[3]: Running Steam on org.freedesktop.platform 23.08 64-bit
steam.sh[3]: STEAM_RUNTIME is enabled automatically
setup.sh[76]: Steam runtime environment up-to-date!
steam.sh[3]: Error: The unofficial Steam Flatpak app requires a working D-Bus session bus
and flatpak-portal service.

Running this command might provide more diagnostic information:

    flatpak run --command=bash com.valvesoftware.Steam -c 'flatpak-spawn -vv true'

Executing this command, I get

Portal call failed: Authorization error: Can't find peer app id

I can see errors using dbus-monitor while executing the above command.

Starting Discord or Chromium fails with a similar error, VLC works fine.

At some point, I got Chromium to print a similar message to Steam complaining about unprivileged user namespaces and the suid bit on the bwrap binary, I can't reproduce this, though.

After removing the suid bit again, the error messages now are

com.discordapp.Discord
2024/05/12 17:46:28 socat[3] E "/run/user/1000/app/com.discordapp.Discord/discord-ipc-0" exists
Disabling updates already done
[5 preload-host-spawn-strategy] Failed to call Spawn: org.freedesktop.DBus.Error.InvalidArgs: Could not find requesting pid

and

org.chromium.Chromium                                                                                                                                                 
[2:15:0512/174634.823483:ERROR:flatpak_sandbox.cc(574)] Error calling Spawn(): org.freedesktop.DBus.Error.InvalidArgs: Could not find requesting pid
[0512/174634.823774:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
[14:14:0100/000000.852516:ERROR:zygote_linux.cc(676)] write: Broken pipe (32)

I have asked around and it doesn't seem to affect everyone. Searching online for my error messages, I didn't come up with much.

For now, contenders for possible issues might be: My Kernel, Flatpak, Flatpak-Portal, Dbus. But I'm at a total loss on how to start debugging this.

Does anyone have an idea what I might try?

0 Comments
2024/05/12
15:53 UTC

2

Why isnt there a FULL offline installer !!!

Ugh trying to install Alpine offline 100% sucks, Anyone know if someone has done a build script or another solution to pull "ver" main/community repo for offline installer? I just dont understand why there isn't one already flash drives 32gb and under are cheap in any county...

2 Comments
2024/05/12
14:27 UTC

1

Boot parameter list

Do any of you have a list with relative descriptions of boot parameters that can be used with alpine linux?

I haven't found a reference source yet.

0 Comments
2024/05/12
11:54 UTC

4

Any tips for making Alpine 3.19 more secure?

I currently use Arch with a suckless configuration (dwm, slstatus, and dmenu).

I play to be more secure by switching to alpine and using wayland with dwl.

Please provide tips to maximize my security and also feel free to provide tips and stuff for my Alpine suckless configuration :)

Do note that I prefer security over convenience.

29 Comments
2024/05/10
00:18 UTC

1

Issue with setting ownership in FSTAB

I suppose that the following line in FSTAB should set the user/group to 1000/1000?
//BigBlack/Media /mnt/media cifs username=Administrator,password=*******,vers=3.0, uid=1000, gid=1000,iocharset=utf8,sec=ntlmssp 0 0

Instead the folder is mounted with the root as owner.

I'm note a very experienced Linux user and is currently only using Linux to run Docker.

7 Comments
2024/05/09
05:41 UTC

2

is it possible to install alpine with tarball and chroot?

is it possible to install alpine with tarball and chroot? (~gentoo way)

4 Comments
2024/05/07
22:00 UTC

1

modprobe errors with pci passthrough

1 Comment
2024/05/07
18:08 UTC

3

Options for Declarative Management

What options are there for managing Alpine Linux declaratively? :)

3 Comments
2024/05/03
21:20 UTC

2

Fix vulnerability in alpine image 3.19

I am using a docker image created from base node:22-alpine3.19.

It shows vulnerability for the following packages :

3.19:ssl_client     1.36.1-r15 , fixed in 1.36.1-r25 [CVE-2023-42366]

3.19:busybox        1.36.1-r15 , fixed in 1.36.1-r25 [CVE-2023-42366]

3.19:busybox-binsh  1.36.1-r15 , fixed in1.36.1-r25  [CVE-2023-42366]

 Seems these are fixed in 3.19.1 .I tried to update & upgrade the alpine packages in my Dockerfile. The created docker image still shows these vulnerability.

How can I patch these.

Dockerfile :

FROM node:${RUNTIME_VERSION}-alpine${DISTRO_VERSION} AS builder

ARG FUNCTION_DIR

WORKDIR ${FUNCTION_DIR}

RUN apk add --no-cache \   

libstdc++ \

:   

libcurl \   

python3

RUN apk update  #Tried update/upgrade in build stage

RUN apk upgrade --no-cache

<Install my dependencies>

#  Production Stage

FROM node:${RUNTIME_VERSION}-alpine${DISTRO_VERSION}RUN

apk update    #Tried update/upgrade in production stage

RUN apk upgrade --no-cache

ARG FUNCTION_DIR

WORKDIR ${FUNCTION_DIR}

COPY --from=builder ${FUNCTION_DIR}/node_modules ${FUNCTION_DIR}/node_modules

I tried adding apk update/upgrade both in builder and production stages but I am unable to affect the final docker image which still shows the vulnerability. How can I patch my image to fix these vulnerabilities /upgrade to 3.19.1 alpine.

Thanks 

1 Comment
2024/05/03
16:34 UTC

2

Looking for some help on setting up AD

So long story short, I need a small OS like alpine to do some linux-y things but allow Active Directory users to SSH in to run these linux jobs, along with the potential of samba file shares. Ive done ubuntu in the past with realmd / sssd / and winbind, but it appears that realmd is not a thing on alpine. Is there a tutorial or guide out there for doing this on alpine?

0 Comments
2024/05/02
14:59 UTC

1

Any way to track and uninstall packages installed from source?

Is there any nifty tool that can monitor when an install from make install happens and also make it easy to uninstall without having to keep the source around?

The only way I can think off is to create an APK of every source package I want to install, but that seems a little cumbersome and something I'd prefer to avoid if I can.

I was hoping for a tool like checkinstall or similar. Does any similar tool or approach exist?

2 Comments
2024/05/02
09:47 UTC

2

Problem installing Burpsuite!!

Hi everyone, i'm new using alpine and i'm having this problem installing burpsuite, i would really love if somebody can give me a hand with this, i'm adding the problem and my version of java, i already tried to change the ambient variable, but nothing.

~/Downloads # ./burpsuite_community_linux_v2024_3_1_3.sh

Unpacking JRE ...

Starting Installer ...

/root/Downloads/burpsuite_community_linux_v2024_3_1_3.sh.2197.dir/jre/bin/java: line 1: syntax error: unexpected "("

~/Downloads # java -version

openjdk version "1.8.0_402"

OpenJDK Runtime Environment (IcedTea 3.30.0) (Alpine 8.402.06-r0)

OpenJDK Server VM (build 25.402-b06, mixed mode)

Thanks in advanced for any kind of help (sorry for my english too, i'm trying to don't use the traslator)

0 Comments
2024/05/02
07:40 UTC

1

No Audio via HDMI Speakers but Bluetooth Headphones work

So I am running into an intermittent audio issue: sometimes after boot, there is no audio out of the HDMI speakers (which are built into the monitor) but when I connect my bluetooth headphones, the sound works fine. This is trying different apps and the only way I get the sound back is on reboot (sometimes) or cold boot (sometimes).

I followed the wiki for installing pipewire/wireplumber a few weeks ago and it had worked great until recently - there are no package updates I can pinpoint as being the issue. I ran dmesg | grep audio > audio_dmesg.txt when the sound worked and when it didn't and the output was identical. My DE is XFCE and I have pavucontrol installed where I can see the sound bar moving with HDMI/Display Port (plugged in) listed under output devices but hear no sound.

What other advanced troubleshooting can I do?

1 Comment
2024/04/29
17:21 UTC

2

Is there a way to list every manually installed packages similarly to a pacman -Qqe

I've been messing with apk by installing a bunch of stuff to test out, and i want to "debloat" my system. On Arch with pacman i would do a pacman -Qqe which would list only explicitly installed packages, however i dont know if there's a way to reproduce this behaviour in Alpine with apk.

3 Comments
2024/04/29
10:45 UTC

1

Podman without Systemd and Quadlet

Was though to try Alpine for my raspberry... but how podman will start containers without systemd if i set them with Quadlets?

2 Comments
2024/04/28
10:21 UTC

3

Connecting Android device

Hi all,

I've been struggling to connect Android device with Alpine. I installed libmtp and gvfs/gvfs-mtp, added /etc/udev/rules.d/51-android.rules, restarted udev and what not, but lsusb doesn't return anything when I connect the phone via usb (tried multiple usb ports/cables). Also adb doesn't return any device. Did anyone had any luck with this?

2 Comments
2024/04/23
09:14 UTC

13

Alpine is impressive

Hi for context i needed a distro for my shitty school laptop (4gb of RAM + a 30gb linux partition because win11 takes 90gb). I originally used artix ( arch without systemd ) it served me well however, it was taking some space on the disk, so i thought i might try alpine as desktop distro. After some caveiats with Grub it ran fine. After setting up my GUIs (my window manager + firefox) i looked at my disk usage, IT WAS UNDER 2GB HOW ? I am seriously impressed by alpine, i know it uses busybox, musl, open-rc and multiple alternatives but i wouldnt thought it would use so little space. While writing this i just saw that my boot partition used only 34.6M. I am blown away by Alpine.

18 Comments
2024/04/23
05:46 UTC

1

init service dont start

I make a init service for Alpine but it is not working.

Could you give me an advice:

#!/sbin/openrc-run
depend() {
    need net
}

command="/usr/local/bin/filebrowser -r /root/filebrowser.db"
command_background="yes"
pidfile="/run/${RC_SVCNAME}.pid"

i try to run this like this:

rc-update add filebrowser default
filebrowser:~# rc-service filebrowser start
 * Caching service dependencies ... [ ok ]
 * Starting filebrowser ... * start-stop-daemon: /root/filebrowser.db//usr/local/bin/filebrowser does not exist
 * Failed to start filebrowser
                                                                                                                [ !! ]
 * ERROR: filebrowser failed to start

of course the file exist:

filebrowser:/usr/local/bin# ls
filebrowser

Thanks.

4 Comments
2024/04/22
03:29 UTC

2

Remote Desktop using Wayland/KDE

So i tried getting xrdp to work following the Alpine wiki and other resources on the internet, but to no avail :(

Does anyone has a decent recommendation other then TeamViewer and the likes?

5 Comments
2024/04/21
15:17 UTC

1

Why do you need init system for using openrc services?

I wanted to install lighttp server in chroot'ed alpine linux

i've read an followed these instructions here:

https://wiki.alpinelinux.org/wiki/Alpine_Linux_in_a_chroot

after installing alphine linux in a directory, and chrooting into it,

I've noticed that openrc services does not work / dont get started.

Also i did get this message:

 * You are attempting to run an openrc service on a
 * system which openrc did not boot.
 * You may be inside a chroot or you may have used
 * another initialization system to boot this system.
 * In this situation, you will get unpredictable results!
 * If you really want to do this, issue the following command:
 * touch /run/openrc/softlevel

To be fair, the instructions also noted:

If you plan to use your chroot with a init system or setup a new system on another device you should add these services:

But is there a way around it? for example if i want to run lighttpd progress, i imagine i can just execute it directly without openrc.

or is it the case that i need to have openrc installed on my host/root linux (i'm using systemd init system)

7 Comments
2024/04/21
07:05 UTC

1

Why is podman-compose not available in stable

Trying out Podman on AlpineLinux and followed the instruction on the Wiki , https://wiki.alpinelinux.org/wiki/Podman , which works fine.

The only thing I am missing is the equivalent of Docker's docker-compose, which is podman-compose.

My question is why is podman-compose not available on the stable release of Alpine Linux. It is only available on testing branch.

Is there any way I can install podman-compose on my latest STABLE installation without breaking dependencies?

0 Comments
2024/04/21
04:04 UTC

2

create and run a init script?

HI.

EDIT: SOLVED!!!!

where are saved the files to run?

for example in systemd is /etc/systemd/service/here.service

But in Alpine... where?

also i want to make a init service to run this program "cps" that dont need any argument.

This will be good?

#!/sbin/openrc-run

depend() {
    need net
}

command="/usr/bin/cps"
command_user="root:root"
pidfile="/run/${RC_SVCNAME}/pid"

which is the extension of the file?

i cant try because... i dont know where to save...

Thanks

4 Comments
2024/04/19
21:21 UTC

1

Trying to install a pip package on Alpine lxc proxmox

HI.

im trying to install calibre-web (https://github.com/janeczku/calibre-web)

pip3 install calibreweb

But im getting this error:

building 'netifaces' extension
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DNETIFACES_VERSION=0.11.0 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_LL=1 -I/usr/include/python3.11 -c netifaces.c -o build/temp.linux-x86_64-cpython-311/netifaces.o
      netifaces.c:131:14: fatal error: linux/tipc.h: No such file or directory
        131 | #    include <linux/tipc.h>
            |              ^~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for netifaces
Failed to build netifaces
ERROR: Could not build wheels for netifaces, which is required to install pyproject.toml-based projects

It is possible to fix?

Thanks!

4 Comments
2024/04/19
05:39 UTC

1

Resolving DNS issues with 3.18

This has probably been asked here a million times.. Or maybe my issue is new and unique.

The problem is Alpine seems to resolve domains only "When it feels like it":

type "nslookup <a duckdns domain>"

It works.

Type it again.

It fails.

It seems to fail more than it succeeds.

Anyone care to help me troubleshoot this?

0 Comments
2024/04/18
17:09 UTC

1

Termux, sockets, QEMU, and the Linux operating system: "-device virtio-serial", "-chardev socket", "-device virtserialport", and Alpine Linux [QEMU is also configured for USB redirection with "termux-usb", "device_add usb-redir", "chardev-add socket".]

0 Comments
2024/04/17
03:43 UTC

2

issues with multiple diskless installs recently not loading apks from the cache at boot

I have 3 different diskless/headless Alpine v3.19.1 installs (a couple on x86_64 and a Pi 3b+) that have been running fine for years, but all three have suddenly developed an issue in the last few weeks where they aren't loading the installed packages from the cache during boot.

After boot if I run apk -U upgrade, the packages all load and the system runs fine till the next reboot or power cycle (even if I run lbu ci). I've tried removing the apkovl file and letting lbu recreate it, but no joy.

EDIT: I've got the Pi working correctly again, had too many packages installed for the root ramdisk, so removed some less essential ones, and it's back to normal - still issues with the x86_64, and it has plenty of free space in the root ramdisk.

UPDATE: seems to be related to doing an apk cache sync/clean - after doing so the system seems to need an apk update and/or apk upgrade to function normally again.

6 Comments
2024/04/16
11:17 UTC

2

Could not boot into my machine due to Seg Fault (?) during boot

I have Alpine Linux edge installed on my metal and have been using as daily driver for many months now.

Today, when I turned on my laptop, it threw a Segmentation Fault error after Checking local filesystems ... And after that, three more lines of error:

Filesystems couldn't be fixed
rc: Aborting!
fsck: caught SIGTERM, aborting

Then, from what I understand, it tried again for 2 more times (total of 3 attempts), each time producing the same lines of errors.

After that, it just prompted me to log in via tty. None of the users could log in, not even root (??), so I'm lost here.

Other details about my set up:

  • Alpine Linux 3.20.0_alpha20240329 (edge)
  • OpenRC 0.54
  • Kernel 6.6.26-0-lts
  • x86_64
  • I have encrypted my SSD
  • Laptop (if it matters) is Thinkpad X230

Let me know if you need more details, and thanks for any help/input.

5 Comments
2024/04/15
09:11 UTC

1

Add compile flag to package

Hello, I run Alpine on an Intel-based firewall appliance. It does DNS/DHCP/IPv6 as well as Strongswan remote access. I recently learned that the Unbound DNS server needs to have a compile flag added to enable the "ipsec" module, which is evidently required or the server will not respond to requests coming in over IPSec. Is there a recommended way to do this? Kind of like makepkg.conf CFLAGS in Arch. I tried looking up the maintainer for the Alpine Unbound package but it only shows a name, no contact.

1 Comment
2024/04/14
03:21 UTC

3

Old Alpine Versions

Hello All,

Where can I find a very old release of Alpine? Particularly I'm interested in release 1.7.20, due to the particular kernel version it had.

I've tried here [1] , but they go as far back as release 3.0.

Thanks!

[1] https://dl-cdn.alpinelinux.org/alpine/

1 Comment
2024/04/13
22:08 UTC

Back To Top