Received: from forward102b.mail.yandex.net (forward102b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d102]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 1811D225E46 for <~alpine/users@lists.alpinelinux.org>; Thu, 9 Nov 2023 13:34:07 +0000 (UTC) Received: from mail-nwsmtp-smtp-production-main-63.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-63.sas.yp-c.yandex.net [IPv6:2a02:6b8:c14:6e01:0:640:627f:0]) by forward102b.mail.yandex.net (Yandex) with ESMTP id A6D5C60A0E for <~alpine/users@lists.alpinelinux.org>; Thu, 9 Nov 2023 16:34:04 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-63.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 3YeXYPGBdW20-SaIRoqHZ; Thu, 09 Nov 2023 16:34:04 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1699536844; bh=QoWORSdKsQPp99Yemd12TD/XLqX4B88qeLdnX1hObIs=; h=Date:Message-ID:Subject:From:To; b=serp8X+On7QIUCqaMOkdhy0Frr7mY38zaivwEawO3si324Ou+6ouRQeD6CWhC8SSc w1eItftgr/iv+NdEo3iD1ZBCW7udz3o7YeSYzIvtrQ48GpdFtfVpxbqxv/WhylLoWk YqtV4BjmQfw0zggvbYwoVBgs+qsWJgKgwz86frMc= Authentication-Results: mail-nwsmtp-smtp-production-main-63.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru To: ~alpine/users@lists.alpinelinux.org From: don Rumata Subject: alpine linux v3.18 + pxe (ram live) + cloud-init (tiny-cloud) = install Message-ID: <882df88f-5d10-9e6f-a3e5-d529d9b99eec@yandex.ru> Date: Thu, 9 Nov 2023 16:34:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Hi! How can I make it so that cloud-init is executed on pxe boot? Here is my file structure and settings: pxe config: ``` label alpine-with-scipt     menu label Alpine with my script     kernel alpine-installer/boot/vmlinuz-lts     initrd alpine-installer/boot/initramfs-lts     append modules=loop,squashfs,sd-mod,usb-storage modloop=http://10.10.10.10/alpine-installer/boot/modloop-lts alpine_repo=alpine_repo=http://dl-cdn.alpinelinux.org/alpine/latest-stable/main ssh_key=http://10.10.10.10/soft/authorized_keys ip=dhcp apkovl=http://10.10.10.10/cloud-init/tmp/alpine-test-01.tar.gz ``` I added ds=nocloud-net;s=http://10.10.10.10/cloud-init/tmp/var/lib/cloud, but it didn't work `alpine-test-01.tar.gz`: tree structure: ``` . ├── etc │   ├── apk │   │   └── world │   ├── cloud │   │   └── cloud.cfg │   ├── init.d │   │   └── local.stop │   ├── network │   │   └── interfaces │   ├── runlevels │   │   └── default │   │       └── local.stop -> /etc/init.d/local.stop │   └── tiny-cloud.conf └── var     └── lib         └── cloud             └── user-data ``` `./etc/apk/world`: ``` tiny-cloud tiny-cloud-alpine tiny-cloud-openrc tiny-cloud-nocloud tiny-cloud-network nano htop # https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud#requirements e2fsprogs-extra openssh-server partx sfdisk yx ``` `./etc/init.d/local.stop`: ``` #!/sbin/openrc-run start () { tiny-cloud --enable } ``` `./etc/network/interfaces`: ``` iface eth0 inet dhcp     udhcpc_opts -O search ``` `./etc/tiny-cloud.conf`: ``` # Tiny Cloud configuration # /etc/tiny-cloud.conf # REQUIRED: The instance's cloud provider # valid: aws, azure, gcp, oci, nocloud CLOUD=nocloud TINY_CLOUD_LOGS=/var/log ``` `./var/lib/cloud/user-data`: ``` #cloud-config cloud_final_modules:   - rightscale_userdata   - scripts-per-once   - scripts-per-boot   - scripts-per-instance   - scripts-user   - keys-to-console   - phone-home   - final-message   - always packages:   install:   - mc #autoinstall: # user-data: write_files:       - path: /etc/22222222222         content: |           qweasdzxcqweasdzxc runcmd:   - touch /etc/runcmd_$(date) chpasswd:   list: |      root:myrootpassword      cloud-user:mypassword   expire: False ```