home.social

#alpine — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #alpine, aggregated by home.social.

fetched live
  1. Ubuntu 26.04 как маршрутизатор для GNS3: настраиваем NAT, DHCP и DNS в Hyper-V

    Как дать узлам внутри GNS3 доступ в интернет, не используя встроенный NAT Hyper-V? В этой статье превратим Ubuntu 26.04 в маршрутизатор лабораторного стенда. Настроим NAT, DHCP и DNS только средствами Linux. В результате Alpine получит сетевые параметры по DHCP, выйдет в интернет и мы установим на него клиент OpenSSH. Заодно разберем неочевидную проблему с маршрутом по умолчанию в Windows, из-за которой трафик физического хоста может попасть в петлю. Настраиваем стенд

    habr.com/ru/articles/1058702/

    #dnsmasq #dhcp #ubuntu #gns3 #gns3_vm #alpine #openssh #hyperv #nftables #powershell

  2. My Alpine Linux Bootloader project is a success! I can now boot any Linux rootfs such as Debian over VPN + NFS via Alpine. The entire bootloader creation uses 200 lines of shell scripts.

    Update: the full tutorial has been published, see
    AlpineBL: Using Alpine Linux as a General-Purpose kexec Bootloader.

    The advantage is that the target OS needs not to be pre-configured for PXE, VPN or NFS. In a regular netboot setup, each target OS's initramfs must know how to do networking / mount rootfs. WireGuard is used here, so each needs customization. Using the AlpineBL approach, the bootloader takes care of everything. I used a boot disk in my setup, not PXE, but they're not exclusive, PXE can deliver that boot disk if you want.

    I'll publish a full tutorial on Alpine Wiki, but here's a quick review. Update: published, see
    link.

    First, create an Alpine rootfs at ./mnt with
    alpine-make-rootfs, with only 4 packages preinstalled: alpine-base, linux-lts, wireguard-tools, kexec-tools. You need another DHCP client for IPv4, I use IPv6 SLAAC so I skipped it. Enable some OpenRC services such as "devfs", "modules", and "local" in that chroot. Extract the kernel from rootfs. Create an initramfs with cpio at ./mnt. Base image done.

    Next, create another rootfs overlay at ./rootfs_extra, with
    /etc/wireguard/wg0.conf and /etc/local.d/99-alpinebl.start. Chain two initramfs binaries with cat. Linux unpacks them sequentially (feature+bug: ./rootfs_extra can overwrite existing files). Overlay image done. Warning: this image contains private keys.

    Boot your machine with that Alpine kernel, and your custom initramfs, with rdinit=/sbin/init (force the kernel to use the real userspace init as the "init script"), retain_initrd (don't release compressed initramfs), kexec_load_disabled=0 (bypass Alpine hardening), alpinebl.stage=1 (custom flag).

    Alpine userspace starts in a normal runlevel. OpenRC's "local" service executes our custom boot script
    99-alpinebl.start. In the custom boot script, load network card kmod, enable networking, enable WireGuard, mount NFSv4 to /mnt. In theory we can switch root now, but we're still using the Alpine kernel, not the target kernel which can be arbitrary. We need to "swap" to the target kernel, and overlay more target kmods in initramfs on the fly.

    To do this, create another initramfs using files in
    /mnt/lib/modules and /mnt/lib/firmware via cpio + gzip. Chain the original initramfs (accessing via /sys/firmware/initrd with retain_initrd) and the new overlay to /dev/shm/initrd Run kexec with the /mnt/vmlinuz symlink as kernel, and /dev/shm/initrd as initramfs. Use new boot cmdline with alpinebl.stage=2, strip retain_initrd.

    A small warning here: at the end of Stage 1, there are 4 copies of initramfs in RAM: /, /sys/firmware/initrd, /dev/shm/initrd, and kexec buffer, each is 1 GiB+, if you don't have RAM, you need to delete blobs under /lib/firmware before cpio / kexec but after modprobe. If RAM is still not enough, you need to stop using retain_initrd, instead, find your own boot drive under /dev, mount it, and find the initramfs - tedious work.

    The system starts again, and all the procedures described above is repeated again: enable network, enable WireGuard, mount NFSv4. Now the startup script sees
    alpinebl.stage=2 in /proc/cmdline, so it knows to switch_root instead of kexec.

    But remember, we're in an initramfs, but the boot script is not executed by /bin/sh with PID 1. This is a full system with Busybox init + OpenRC, we're a normal userspace process, so we can't kill or replace init unless we're init already... We're stuck here. Should we use a PID namespace to work around it? No!

    Busybox init supports hot update via the "restart" target after receiving a SIGQUIT (an arcane feature), it's a replacement binary path. We create a
    /init file (to bypass switch_root's safety check), write ::restart:/sbin/switch_root /mnt /sbin/init to /etc/inittab, send SIGHUP to PID 1 to reload config, then send SIGQUIT to PID 1. So init shuts userspace daemons down, call execvp(), and switch_root takes over.

    Alpine userspace is gone. Debian userspace starts up with systemd like a regular boot. Existing Ethernet, WireGuard interfaces, and the NFS mount are auto-inherited by systemd. You get a login shell. Mission complete.
    #alpine #alpinelinux #NFS #WireGuard

  3. My Alpine Linux Bootloader project is a success! I can now boot any Linux rootfs such as Debian over VPN + NFS via Alpine. The entire bootloader creation uses 200 lines of shell scripts.

    Update: the full tutorial has been published, see
    AlpineBL: Using Alpine Linux as a General-Purpose kexec Bootloader.

    The advantage is that the target OS needs not to be pre-configured for PXE, VPN or NFS. In a regular netboot setup, each target OS's initramfs must know how to do networking / mount rootfs. WireGuard is used here, so each needs customization. Using the AlpineBL approach, the bootloader takes care of everything. I used a boot disk in my setup, not PXE, but they're not exclusive, PXE can deliver that boot disk if you want.

    I'll publish a full tutorial on Alpine Wiki, but here's a quick review. Update: published, see
    link.

    First, create an Alpine rootfs at ./mnt with
    alpine-make-rootfs, with only 4 packages preinstalled: alpine-base, linux-lts, wireguard-tools, kexec-tools. You need another DHCP client for IPv4, I use IPv6 SLAAC so I skipped it. Enable some OpenRC services such as "devfs", "modules", and "local" in that chroot. Extract the kernel from rootfs. Create an initramfs with cpio at ./mnt. Base image done.

    Next, create another rootfs overlay at ./rootfs_extra, with
    /etc/wireguard/wg0.conf and /etc/local.d/99-alpinebl.start. Chain two initramfs binaries with cat. Linux unpacks them sequentially (feature+bug: ./rootfs_extra can overwrite existing files). Overlay image done. Warning: this image contains private keys.

    Boot your machine with that Alpine kernel, and your custom initramfs, with rdinit=/sbin/init (force the kernel to use the real userspace init as the "init script"), retain_initrd (don't release compressed initramfs), kexec_load_disabled=0 (bypass Alpine hardening), alpinebl.stage=1 (custom flag).

    Alpine userspace starts in a normal runlevel. OpenRC's "local" service executes our custom boot script
    99-alpinebl.start. In the custom boot script, load network card kmod, enable networking, enable WireGuard, mount NFSv4 to /mnt. In theory we can switch root now, but we're still using the Alpine kernel, not the target kernel which can be arbitrary. We need to "swap" to the target kernel, and overlay more target kmods in initramfs on the fly.

    To do this, create another initramfs using files in
    /mnt/lib/modules and /mnt/lib/firmware via cpio + gzip. Chain the original initramfs (accessing via /sys/firmware/initrd with retain_initrd) and the new overlay to /dev/shm/initrd Run kexec with the /mnt/vmlinuz symlink as kernel, and /dev/shm/initrd as initramfs. Use new boot cmdline with alpinebl.stage=2, strip retain_initrd.

    A small warning here: at the end of Stage 1, there are 4 copies of initramfs in RAM: /, /sys/firmware/initrd, /dev/shm/initrd, and kexec buffer, each is 1 GiB+, if you don't have RAM, you need to delete blobs under /lib/firmware before cpio / kexec but after modprobe. If RAM is still not enough, you need to stop using retain_initrd, instead, find your own boot drive under /dev, mount it, and find the initramfs - tedious work.

    The system starts again, and all the procedures described above is repeated again: enable network, enable WireGuard, mount NFSv4. Now the startup script sees
    alpinebl.stage=2 in /proc/cmdline, so it knows to switch_root instead of kexec.

    But remember, we're in an initramfs, but the boot script is not executed by /bin/sh with PID 1. This is a full system with Busybox init + OpenRC, we're a normal userspace process, so we can't kill or replace init unless we're init already... We're stuck here. Should we use a PID namespace to work around it? No!

    Busybox init supports hot update via the "restart" target after receiving a SIGQUIT (an arcane feature), it's a replacement binary path. We create a
    /init file (to bypass switch_root's safety check), write ::restart:/sbin/switch_root /mnt /sbin/init to /etc/inittab, send SIGHUP to PID 1 to reload config, then send SIGQUIT to PID 1. So init shuts userspace daemons down, call execvp(), and switch_root takes over.

    Alpine userspace is gone. Debian userspace starts up with systemd like a regular boot. Existing Ethernet, WireGuard interfaces, and the NFS mount are auto-inherited by systemd. You get a login shell. Mission complete.
    #alpine #alpinelinux #NFS #WireGuard

  4. A National-Scale Database Of Groundwater Level Data For Switzerland
    --
    doi.org/10.1038/s41597-026-073 <-- shared paper
    --
    H/T @RaoulCollenteur | Groundwater Hydrologist at Collenteur HydroConsult GmbH
    “Looking for a ready-to-use FAIR dataset with groundwater levels, signatures, and meteorological drivers to test new models and analysis methods to learn from groundwater level data? Why not try [the authors’] new Swiss Groundwater Database with almost 1,000 piezometers in diverse climatological and hydrogeological settings within Switzerland? 💡
    💧 Long groundwater level time series with frequent measurements
    💧 Meteorological drivers included
    💧Unique dataset in terms of hydrogeological data in an alpine setting
    … [They] hope [that they] can develop the database in the future with other variables (i.e., groundwater temperature, spring discharge, etc.) and welcome additions and collaborations to make this happen. 🌊…”
    --
    “Groundwater is a vital component of the global supply of freshwater, playing a critical role for human populations, agriculture, and ecosystems. Due to the complex interactions between groundwater, surface water, climate, and human activity, these systems are frequently studied using advanced data analysis and modeling techniques. The effectiveness of these methods is generally enhanced by the availability and quality of data. In Switzerland, the focus area of this study, groundwater data is fragmented and lacks a standardized nationwide compilation. Consequently, the process of conducting nationwide studies with substantial sample sizes is both resource-intensive and time-consuming. In this paper, [they] introduce the Swiss Groundwater Database, a comprehensive compilation of groundwater time series and associated metadata throughout Switzerland. The current database consists of groundwater level data from 985 monitoring wells, which were completed with additional static and time-varying variables. The environmental characteristics and climate indices were compiled and determined for each monitoring well. The database is designed to facilitate and support large-sample hydrological research related to groundwater in Switzerland and beyond…”
    #water #hydrography #database #GIS #spatial #mapping #groundwater #Switzerland #FAIR #SwissGroundwaterDatabase #opendata #hydrogeology #meteorology #weather #climate #alpine #waterresources #agriculture #ecosystems #humanimpacts #spatialanalysis #spatiotemporal #model #modeling #dataanalysis #nationwide #metadata #monitoring #wells
    @Federal Office for the Environment FOEN | @Federal Office of Meteorology and Climatology MeteoSwiss

  5. A National-Scale Database Of Groundwater Level Data For Switzerland
    --
    doi.org/10.1038/s41597-026-073 <-- shared paper
    --
    H/T @RaoulCollenteur | Groundwater Hydrologist at Collenteur HydroConsult GmbH
    “Looking for a ready-to-use FAIR dataset with groundwater levels, signatures, and meteorological drivers to test new models and analysis methods to learn from groundwater level data? Why not try [the authors’] new Swiss Groundwater Database with almost 1,000 piezometers in diverse climatological and hydrogeological settings within Switzerland? 💡
    💧 Long groundwater level time series with frequent measurements
    💧 Meteorological drivers included
    💧Unique dataset in terms of hydrogeological data in an alpine setting
    … [They] hope [that they] can develop the database in the future with other variables (i.e., groundwater temperature, spring discharge, etc.) and welcome additions and collaborations to make this happen. 🌊…”
    --
    “Groundwater is a vital component of the global supply of freshwater, playing a critical role for human populations, agriculture, and ecosystems. Due to the complex interactions between groundwater, surface water, climate, and human activity, these systems are frequently studied using advanced data analysis and modeling techniques. The effectiveness of these methods is generally enhanced by the availability and quality of data. In Switzerland, the focus area of this study, groundwater data is fragmented and lacks a standardized nationwide compilation. Consequently, the process of conducting nationwide studies with substantial sample sizes is both resource-intensive and time-consuming. In this paper, [they] introduce the Swiss Groundwater Database, a comprehensive compilation of groundwater time series and associated metadata throughout Switzerland. The current database consists of groundwater level data from 985 monitoring wells, which were completed with additional static and time-varying variables. The environmental characteristics and climate indices were compiled and determined for each monitoring well. The database is designed to facilitate and support large-sample hydrological research related to groundwater in Switzerland and beyond…”

    @Federal Office for the Environment FOEN | @Federal Office of Meteorology and Climatology MeteoSwiss

  6. oh great… prob found a kernel regression on my dell latitude e6420

    on , the integrated sd card:
    - linux-stable: doesnt work at all. plugged in at boot time and any disks writes hang the system. can’t even poweroff the device unless u hold the powerbutton. plugged in after boot and its like it doesnt exist even if lsblk shows its there
    - linux-lts: works fine

    edit: nvm… lts is also exhibiting similar issues… so it’s starting to look like another hw failure :(

  7. oh great… prob found a #linux kernel regression on my dell latitude e6420

    on #alpine, the integrated sd card:
    - linux-stable: doesnt work at all. plugged in at boot time and any disks writes hang the system. can’t even poweroff the device unless u hold the powerbutton. plugged in after boot and its like it doesnt exist even if lsblk shows its there
    - linux-lts: works fine

    edit: nvm… lts is also exhibiting similar issues… so it’s starting to look like another hw failure :(

  8. Dear all - I'm starting to bundle up my work on porting mainline linux to the Kindle Paperwhite3 - I've got most of the major features but the install process is complicated.

    I'm going to put together a custom linux distro for it - no other ones really fit. I've run into a roadblock as I am struggling with a name. It's going to be based on alpine linux, I want to avoid anything that a*mazon can get grumpy about.

    Any ideas for names?
    #kindle #linux #alpine

  9. Dear all - I'm starting to bundle up my work on porting mainline linux to the Kindle Paperwhite3 - I've got most of the major features but the install process is complicated.

    I'm going to put together a custom linux distro for it - no other ones really fit. I've run into a roadblock as I am struggling with a name. It's going to be based on alpine linux, I want to avoid anything that a*mazon can get grumpy about.

    Any ideas for names?

  10. Alpine A390: cinco razones para convertir cada viaje de verano en parte de las vacaciones gironanoticies.com/noticia/301

    El primer Alpine de cinco plazas y cinco puertas combina hasta 557 kilómetros de autonomía, un maletero de 532 litros, tecnología avanzada y confort premium #Alpine

  11. Alpine A390: cinco razones para convertir cada viaje de verano en parte de las vacaciones gironanoticies.com/noticia/301

    El primer Alpine de cinco plazas y cinco puertas combina hasta 557 kilómetros de autonomía, un maletero de 532 litros, tecnología avanzada y confort premium #Alpine

  12. Alpine Linux mit KDE Plasma ist so schön! Und es funktioniert einfach und hat keinen KI-Müll und eine legendäre Bootime und die Systemtools sind klein und elegant und halten sich zurück.
    #alpine #alpinelinux #kde #plasma

  13. Alpine Linux mit KDE Plasma ist so schön! Und es funktioniert einfach und hat keinen KI-Müll und eine legendäre Bootime und die Systemtools sind klein und elegant und halten sich zurück.
    #alpine #alpinelinux #kde #plasma

  14. #ALPINE #A290 in 6,4 Sek von 0 auf 100 🧐 Taugt der #E_Flitzer?⚡| #GRIP #677

    Auch die Zukunft von ALPINE wird elektrisch sein: Mit der A290 präsentiert der französische Hersteller, der sonst mit Leichtbau-Sportwagen für Furore sorgt, auf Basis des ebenfalls neuen Renault 5 E-Tech eine Sportvariante mit satten 220 #Elektro-PS. Damit geht es in 6,4 Sekunden von 0 auf 100, maximal 380 Kilometer weit soll der Flitzer kommen. E

    youtube.com/watch?v=Y_bEU1bbSNw

  15. #ALPINE #A290 in 6,4 Sek von 0 auf 100 🧐 Taugt der #E_Flitzer?⚡| #GRIP #677

    Auch die Zukunft von ALPINE wird elektrisch sein: Mit der A290 präsentiert der französische Hersteller, der sonst mit Leichtbau-Sportwagen für Furore sorgt, auf Basis des ebenfalls neuen Renault 5 E-Tech eine Sportvariante mit satten 220 #Elektro-PS. Damit geht es in 6,4 Sekunden von 0 auf 100, maximal 380 Kilometer weit soll der Flitzer kommen. E

    youtube.com/watch?v=Y_bEU1bbSNw

  16. Building #smolBSD on #Alpine is an adventure: one first needs to edit Makefile and replace --quiet with -s (Busybox's sha256sum doesn't recognize the former option), then edit mkimg.sh and remove --show from losetup options (again, a Busybox quirk). Even then, the build is only mostly successful, and my attempt of running a full live setup... makes me think I should have RTFM for #NetBSD first.