NETBOOT Alpine Linux using Alpine Linux! PXE Boot Server Setup

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 57

  • @joshpatten
    @joshpatten 2 года назад +5

    Really cool to see you taking this to the next level, I'll definitely be looking out for your next video to get all the details for getting this set up!

    • @apalrdsadventures
      @apalrdsadventures  2 года назад +2

      Thanks! Your client program has certainly been very useful for this

  • @Mikesco3
    @Mikesco3 2 года назад +8

    This channel is so underrated

  • @jeffbrl
    @jeffbrl 6 месяцев назад

    Great video. Alpine's APK overlay seems like an interesting alternative to NFS root for persistence.

    • @apalrdsadventures
      @apalrdsadventures  6 месяцев назад

      It's a way to initialize the system to a known and configurable state, but doesn't have long-term persistence. Every reboot goes back to the overlay.

  • @blevenzon
    @blevenzon 2 года назад +1

    Did I mention I love this channel

  • @przemek831
    @przemek831 6 месяцев назад

    Love it. I am planning to set something similar to what you did with RPi and different usernames. I need to figure out first how to boot the system with home directories on NAS so nothing is stored on a local system or possibly boot RPi thin client without SD card.

  • @gearboxworks
    @gearboxworks Год назад +1

    Watching your videos is like taking a sip from a fire hydrant! I am in awe of your knowledge.
    But keep em' coming, if I watch enough of them I'm sure I will eventually be able to follow it all!!! 😮

  • @W1ldTangent
    @W1ldTangent 2 года назад

    Noice, now we're talking 😎 I look forward to further adventuring into the world of network-booted appliances and infrastructure.

    • @apalrdsadventures
      @apalrdsadventures  2 года назад +1

      Well up next in this series is the PVE VDI Client, and I'm thinking Remmina seems like a popular thin client appliance as well (for RDP).

    • @W1ldTangent
      @W1ldTangent 2 года назад

      @@apalrdsadventures and I am absolutely here for it. Keep it up, I like where this is going, Remina is one I've not used very much but I have colleagues that swear by it. It is extremely flexible and configurable.

    • @apalrdsadventures
      @apalrdsadventures  2 года назад

      I've used it a bit, but normally I just use ssh for Linux management anyway. It would pair well with my terminal server though, less resources than a VM per user.

  • @ruijieyu9035
    @ruijieyu9035 Год назад +2

    14:23 you said that tftp is running as root and chroot’d under /var/tftpboot. I haven’t tested this, but if it can mount /proc, I believe it can also do something like “chroot /proc/1/root” to escape the chroot?

  • @jfairplane8520
    @jfairplane8520 Год назад

    This is quite great. I wonder if you may also share the proxmox backup of this lxc ? That can be quite handy and fully working directly ;)

  • @Cynyr
    @Cynyr Год назад

    riny nitpick here, but i'm pretty sure that alpine install came with Vi out of the box. no "need" to install nano. I found alpine a few months back and it feels a lot like gentoo from the mid 00's, super small, super fast, nice and small and customizable.

    • @apalrdsadventures
      @apalrdsadventures  Год назад

      I didn't even try vi, just went to nano expecting it to be smaller and more Alpine's style

  • @callisoncaffrey
    @callisoncaffrey Год назад +2

    You confuse me. You do the git hub and the scripting, but then you use nano and opensense.

  • @leschi1112
    @leschi1112 8 месяцев назад

    Hi, great tutorial. but i have sadly one problem, if i boot from a vm i get the error "/sbin/init not found in new root". Do you have any idea about this?

  • @DiyintheGhetto
    @DiyintheGhetto 2 года назад +1

    My question is are you installing the OS on the disks that are on each thin client, or running a diskless boot?

    • @apalrdsadventures
      @apalrdsadventures  2 года назад +4

      Purely diskless. Kernel + initrd + modloop + apkovl all get downloaded into RAM over HTTP, then Alpine re-installs any packages that should be installed by going out to the repository. So the entire system is in RAM, there isn't even an NFS mount backend.
      Alpine has a boot mode where it does the same thing off disk, it loads the kernel and initrd and then only var and home are actually mounted from disk. Changes made to the system have to be committed back manually. The program that does this commit (lbu) can also generate a .tar.gz of the system, which is the APK Overlay I'm using here and will walk through the creation of in the next video.

  • @singaravelanpalani3713
    @singaravelanpalani3713 4 месяца назад

    Dear apalrd's adventures,
    thanks for sharing your Knowledge Here..
    I also followed your videos , i setup dhcp in same server itself, client system also booted.
    after boot i got a only CLI.
    I am looking for GUI open Firefox browser with Kiosk Mode. How to achieve.
    I tried multiple way not up after boot its crash..

    • @apalrdsadventures
      @apalrdsadventures  4 месяца назад

      This video only shows the server setup, so you get a default Alpine system. I have another video which shows how I setup a client to use an 'apk overlay' file to pre-configure the client when it boots up. In that video, I set it up as a remote desktop client, but you could install and launch Firefox instead by changing the script.

  • @Konrad_Adenauer
    @Konrad_Adenauer Год назад

    Hello, I have a question:
    Can I rent a dedicated server and boot the alpine Linux OS from home, using netboot?

    • @apalrdsadventures
      @apalrdsadventures  Год назад +1

      In general TFTP (which is needed in the early boot process) doesn't do well over the internet. That said, if you can host the TFTP part on your local network, the rest of it could be booted over HTTP over the internet.

  • @navedwaris2363
    @navedwaris2363 Год назад

    Hello brother,u did a very good job,but got stuck in making pxe boot over http in clonezilla as it supports both tftp & http,As of now in ubuntu i made pxe boot on tftp but it takes a lot of time i want to make it over http please respond & help me

  • @ultronzeon1759
    @ultronzeon1759 2 года назад

    Sir i would like to create a remmina kiosk..
    I searched a lot but reached any where.
    Please can you help me?

    • @apalrdsadventures
      @apalrdsadventures  2 года назад

      Part 2 of this video is setting up the thin client using Alpine, and generating the aplovl file. So I finish producing / editing that, it'll include more of the information you need to get an Alpine system setup and running as a kiosk (but for PVE-VDIClient instead of Remmina). From there I can help you substitute the VDI client for Remmina.

    • @ultronzeon1759
      @ultronzeon1759 2 года назад

      @@apalrdsadventures thank you sir!

  • @tcovos
    @tcovos 2 года назад +2

    Eu tenho um sistema assim utilizando o LTSP com debian e os terminais com raspberry’s

    • @apalrdsadventures
      @apalrdsadventures  2 года назад +1

      LTSP works well if you need network storage, but for appliances where there should be no change to the filesystem this method is simpler and avoids NFS entirely. Alpine also uses less RAM in general, vs Debian.

  • @62AliCan
    @62AliCan Год назад

    How would I go about, instead of downloading the image everytime I start the machine from the defined repo, I would make it available on the netboot server and get it from there - 18:55 is what Im talking about

    • @apalrdsadventures
      @apalrdsadventures  Год назад

      If you have a local copy of the repo you can change the repo to point to your own HTTP server. The entire Alpine repo isn't small, so you might be better using an HTTP caching server.

    • @62AliCan
      @62AliCan Год назад

      @@apalrdsadventures i have yet to figure out how to do it correctly, first how can I get an copy of the whole 3.17 repo, maybe you give me a bit of an guidance of where to look. thank you in advance

    • @apalrdsadventures
      @apalrdsadventures  Год назад

      You can setup a basic http cache to point to their repo, and it will cache on demand. The whole repo is over 100G, so you probably don't want the whole thing, just what you are using.

  • @sukardiLayarda
    @sukardiLayarda 2 года назад

    it a good video tutorial but i got problem.. when netbooting i got error message wget: server returned error http/1.1 404 not found how to solve this problem thank you...

    • @apalrdsadventures
      @apalrdsadventures  2 года назад

      Not finding the apkovl file? There's a whole video on how to generate that file

    • @sukardiLayarda
      @sukardiLayarda 2 года назад

      @@apalrdsadventures I will more specific,
      Apkovl://192.xxx.xx /thinclient.opkovl.tar.gz
      Http;//192.xx.xx/boot/vmlinux-lts.. ok
      Http:/192.XXX/inittramfs-lts.. ok
      Udhcpc: started
      .
      .
      Wget: server returned error
      This the problem
      grep: /sysroot/etc/inittab: no such file or directory
      /sbin/init not found in new root
      I searched in internet n not found the solution..
      maybe u can help.. thank you..

  • @IBITZEE
    @IBITZEE 2 года назад

    wouldn't be more performant if we install all the stuff we need in a thin vm...
    then collect all the installed stuff into a initrd/initramfs file (makecpio/dracut)...
    in the ipxe boot process push this into memory (from the ipxe script,,,)
    and launch vmlinuz against this memory image...

    • @apalrdsadventures
      @apalrdsadventures  2 года назад

      It depends on what your goals are. If you want to run the system entirely out of RAM, then it will have to be loaded at some stage. Alpine specifically has some additional tools (apkovl namely) to make this easier, which I relied on here.
      So in this setup, we are loading vmlinuz and a basic initrd over http (which is fast), then Alpine is loading the apkovl over http (which is fast), then it's installing all of the packages to rebuild the system using apk (going out to the mirror). It would boot faster if the mirror was faster, so caching the mirror locally would speed up the process without adding any extra steps, and a local Alpine mirror would mean we can use multiple apkovl's to configure multiple systems with their own tiny images and they would all share the same mirror.
      If you don't want to run entirely from RAM, then mounting a root filesystem over nfs would make more sense.

  • @maka5955
    @maka5955 2 года назад

    Some 64bit system have 32bit efi. Example Linx7 tablet.

    • @apalrdsadventures
      @apalrdsadventures  2 года назад

      Can you force them into legacy BIOS boot? AFAIK legacy BIOS always loads as 32-bit protected mode (or even 16-bit real mode) and then it's up to the OS to switch into long mode, whereas EFI will already be in long mode if the OS is 64 bit

    • @W1ldTangent
      @W1ldTangent 2 года назад

      Those are thankfully rare beasts, but found more often in thin-client or other low-end hardware. I had an Asus Transformer with the same issue, and it wouldn't even do BIOS fallback.

    • @maka5955
      @maka5955 2 года назад

      On those Linx7 tablets, the only option was to add bootia32.efi to 64-bit Linux. But as mentioned, these are thankfully not very many.

  • @AdrianuX1985
    @AdrianuX1985 2 года назад

    +1

  • @idjdbrvvskambvvv9007
    @idjdbrvvskambvvv9007 Год назад

    im on alpine now apk is ffin fasst

  • @SkiTuMTuM
    @SkiTuMTuM Год назад

    hi im getting stuck at building ipxe. this the error im getting
    " [BUILD] bin-i386-pcbios/gdbserial.o
    [BUILD] bin-i386-pcbios/gdbstub.o
    [BUILD] bin-i386-pcbios/gdbudp.o
    In file included from include/string.h:23,
    from core/gdbudp.c:27:
    In function '__constant_memcpy',
    inlined from 'memcpy' at arch/x86/include/bits/string.h:168:10,
    inlined from 'gdbudp_send' at core/gdbudp.c:206:2,
    inlined from 'gdbudp_send' at core/gdbudp.c:163:13:
    arch/x86/include/bits/string.h:94:44: error: array subscript 'const union [0]' is partly outside array bounds of 'uint8_t[6]' {aka 'unsigned char[6]'} [-Werror=array-bounds]
    94 | dest_u->u32[0] = src_u->u32[0];
    | ~~~~~~~~~~^~~
    core/gdbudp.c: In function 'gdbudp_send':
    core/gdbudp.c:53:16: note: object 'dest_eth' of size 6
    53 | static uint8_t dest_eth[ETH_ALEN];
    | ^~~~~~~~
    In function '__constant_memcpy',
    inlined from 'memcpy' at arch/x86/include/bits/string.h:168:10,
    inlined from 'gdbudp_send' at core/gdbudp.c:206:2,
    inlined from 'gdbudp_send' at core/gdbudp.c:163:13:
    arch/x86/include/bits/string.h:95:44: error: array subscript 'const union [0]' is partly outside array bounds of 'uint8_t[6]' {aka 'unsigned char[6]'} [-Werror=array-bounds]
    95 | dest_u->u16[2] = src_u->u16[2];
    | ~~~~~~~~~~^~~
    core/gdbudp.c: In function 'gdbudp_send':
    core/gdbudp.c:53:16: note: object 'dest_eth' of size 6
    53 | static uint8_t dest_eth[ETH_ALEN];
    | ^~~~~~~~
    In function '__constant_memcpy',
    inlined from 'memcpy' at arch/x86/include/bits/string.h:168:10,
    inlined from 'gdbudp_recv' at core/gdbudp.c:137:4:
    arch/x86/include/bits/string.h:94:32: error: array subscript 'union [0]' is partly outside array bounds of 'uint8_t[6]' {aka 'unsigned char[6]'} [-Werror=array-bounds]
    94 | dest_u->u32[0] = src_u->u32[0];
    | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
    core/gdbudp.c: In function 'gdbudp_recv':
    core/gdbudp.c:53:16: note: object 'dest_eth' of size 6
    53 | static uint8_t dest_eth[ETH_ALEN];
    | ^~~~~~~~
    In function '__constant_memcpy',
    inlined from 'memcpy' at arch/x86/include/bits/string.h:168:10,
    inlined from 'gdbudp_recv' at core/gdbudp.c:137:4:
    arch/x86/include/bits/string.h:95:32: error: array subscript 'union [0]' is partly outside array bounds of 'uint8_t[6]' {aka 'unsigned char[6]'} [-Werror=array-bounds]
    95 | dest_u->u16[2] = src_u->u16[2];
    | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
    core/gdbudp.c: In function 'gdbudp_recv':
    core/gdbudp.c:53:16: note: object 'dest_eth' of size 6
    53 | static uint8_t dest_eth[ETH_ALEN];
    | ^~~~~~~~
    cc1: all warnings being treated as errors
    make: *** [Makefile.housekeeping:952: bin-i386-pcbios/gdbudp.o] Error 1"
    any help is appreciated

    • @apalrdsadventures
      @apalrdsadventures  Год назад

      Does it build the 64-bit EFI binaries if you try just that one? I wonder if it's an issue with a newer version of GCC having better error checking. It looks like that particular file (gdbudp.c) hasn't been modified in 8 years, so it's definitely not a code issue.

    • @SkiTuMTuM
      @SkiTuMTuM Год назад

      @@apalrdsadventures returning an error
      netboot:/srv/ipxe/src# make bin-x86_64-efi/ipxe.efi EMBED=netboot.ipxe
      [BUILD] bin-x86_64-efi/gdbudp.o
      In file included from include/string.h:23,
      from core/gdbudp.c:27:
      In function '__constant_memcpy',
      inlined from 'memcpy' at arch/x86/include/bits/string.h:168:10,
      inlined from 'gdbudp_send' at core/gdbudp.c:206:2,
      inlined from 'gdbudp_send' at core/gdbudp.c:163:13:
      arch/x86/include/bits/string.h:94:44: error: array subscript 'const union [0]' is partly outside array bounds of 'uint8_t[6]' {aka 'unsigned char[6]'} [-Werror=array-bounds]
      94 | dest_u->u32[0] = src_u->u32[0];
      | ~~~~~~~~~~^~~
      core/gdbudp.c: In function 'gdbudp_send':
      core/gdbudp.c:53:16: note: object 'dest_eth' of size 6
      53 | static uint8_t dest_eth[ETH_ALEN];
      | ^~~~~~~~
      In function '__constant_memcpy',
      inlined from 'memcpy' at arch/x86/include/bits/string.h:168:10,
      inlined from 'gdbudp_send' at core/gdbudp.c:206:2,
      inlined from 'gdbudp_send' at core/gdbudp.c:163:13:
      arch/x86/include/bits/string.h:95:44: error: array subscript 'const union [0]' is partly outside array bounds of 'uint8_t[6]' {aka 'unsigned char[6]'} [-Werror=array-bounds]
      95 | dest_u->u16[2] = src_u->u16[2];
      | ~~~~~~~~~~^~~
      core/gdbudp.c: In function 'gdbudp_send':
      core/gdbudp.c:53:16: note: object 'dest_eth' of size 6
      53 | static uint8_t dest_eth[ETH_ALEN];
      | ^~~~~~~~
      In function '__constant_memcpy',
      inlined from 'memcpy' at arch/x86/include/bits/string.h:168:10,
      inlined from 'gdbudp_recv' at core/gdbudp.c:137:4:
      arch/x86/include/bits/string.h:94:32: error: array subscript 'union [0]' is partly outside array bounds of 'uint8_t[6]' {aka 'unsigned char[6]'} [-Werror=array-bounds]
      94 | dest_u->u32[0] = src_u->u32[0];
      | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
      core/gdbudp.c: In function 'gdbudp_recv':
      core/gdbudp.c:53:16: note: object 'dest_eth' of size 6
      53 | static uint8_t dest_eth[ETH_ALEN];
      | ^~~~~~~~
      In function '__constant_memcpy',
      inlined from 'memcpy' at arch/x86/include/bits/string.h:168:10,
      inlined from 'gdbudp_recv' at core/gdbudp.c:137:4:
      arch/x86/include/bits/string.h:95:32: error: array subscript 'union [0]' is partly outside array bounds of 'uint8_t[6]' {aka 'unsigned char[6]'} [-Werror=array-bounds]
      95 | dest_u->u16[2] = src_u->u16[2];
      | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
      core/gdbudp.c: In function 'gdbudp_recv':
      core/gdbudp.c:53:16: note: object 'dest_eth' of size 6
      53 | static uint8_t dest_eth[ETH_ALEN];
      | ^~~~~~~~
      cc1: all warnings being treated as errors
      make: *** [Makefile.housekeeping:952: bin-x86_64-efi/gdbudp.o] Error 1
      netboot:/srv/ipxe/src#

    • @apalrdsadventures
      @apalrdsadventures  Год назад

      For the benefit of everyone who might find this in the future: GCC 12 (released with Alpine 3.17 and later) is triggering errors with iPXE. The iPXE devs consider these errors to be false positives (thus a bug in GCC) and haven't pushed any changes on their end yet.
      The workaround with GCC 12 is to add NO_WERROR=1 before make - I've added a node to the blog post with the new commands.
      See ipxe's issue here: github.com/ipxe/ipxe/issues/620

    • @ihatemicrosoftsobadly3188
      @ihatemicrosoftsobadly3188 Год назад

      @@apalrdsadventuresfirst of all thank you very much for creating this tutorial. i tried following this tutorial myself for booting the nodes of my home cluster and it unfortunately didn't work for me... probably a stupid mistake on my part but still i can't seem to figure it out so any help would be greatly appreciated! Firstly i am getting an error when attempting to build iPXE for efi. this error is not fixed through the means decribed in your comment unfortunately. specifically the error is:
      [LD] bin-x86_64-efi/ipxi.efi.tmp
      ld:--defsym:2: undefined symbol ''obj_ipxi" referenced in expression
      make: *** [Makefile.housekeeping: 1233: bin-x86_64-efi/ipxi.efi.tmp] Error: 1
      also even when i try to boot a BIOS device(compilation for pcbios worked) from the server i still get an error on the client: PXE E53.
      running tcpdump on the server whilst trying to boot a client from it shows a total of 113 packets captured from the exact output it is fair to assume that the basic DHCP is working.i checked everything i did and even tried redoing the entire thing but after that i am still stuck with this problem. Any hekp would be greatly appreciated! Thanks in advance!

  • @paulmaydaynight9925
    @paulmaydaynight9925 2 года назад

    a 'net booted' Pi 4 with PiMox images/openwrt/21.02/arm64/default/20220427_11:58 lxd files for a fun tutorial

    • @apalrdsadventures
      @apalrdsadventures  2 года назад

      I'm going to expand this to handle multiple client architectures in a future video, aarch64 / Pi 4 is definitely going to be a tutorial eventually