/srv/irclogs.ubuntu.com/2021/07/27/#ubuntu-server.txt

gsker@search The Switch O'Leary01:09
sarnold?01:10
lordievaderGood morning06:02
punkgeekI want to run wget to send a signal after initramfs configure network. How can I do it?11:06
lordievaderUnless required the network is only configured at a later stage, not in the initramfs.11:12
lordievaderNot really sure why you want to download something, but you can make a systemd unit which targets the network-online.target.11:12
punkgeek I've encrypted my whole disk with LUKS and I've installed Busybox with the network configuration. So when VM has been rebooted, I can connect to Busybox with SSH to enter my LUKS password.  I want to run the wget command automatically after the initramfs network is configured, to send a signal from VM to enter the LUKS password.11:16
TJ-punkgeek: why not delply mandos instead?12:27
TJ-or even, deploy 12:27
lordievaderpunkgeek: In `/etc/initramfs-tools/scripts` and `/usr/share/initramfs-tools/scripts` are a bunch of scripts which are called at certain points. I guess you can figure out (with the documentation) at which point there should be a network and inject your script there.13:39
=== genii-core is now known as genii
punkgeekTJ-: I can't use this method in my case.15:05
punkgeeklordievader: I've tried both directories but it doesn't works. and even there in't any script on the /etc/initramfs-tools/scripts or hooks15:06
TJ-punkgeek: are you using dropbear-initramfs ? if so put your looks in just after dropbear's15:07
TJ-punkgeek: hooks are used at {mk,update}initramfs time, scripts are copied into the initrd.img15:08
TJ-for example, dropbear-initramfs installs, amongst others:15:09
TJ-dropbear-initramfs: /usr/share/initramfs-tools/scripts/init-bottom/dropbear15:09
TJ-dropbear-initramfs: /usr/share/initramfs-tools/scripts/init-premount/dropbear15:09
lordievaderpunkgeek: did you verify with `lsinitramfs` if they made it into an updated intramfs?15:16
punkgeekI'm not sure it uses dropbrea-initramfs or not, but I have installed it with busybox.15:29
punkgeekI've entered the command at the end of the .../init-premount/dropbear file and then I entered update-initramfs -u, But it didn't work15:29
TJ-punkgeek: you've put wget into the initrd as well?15:30
lordievaderpunkgeek: This shows about what you try to do, but then with curl: https://serverfault.com/questions/152959/configure-initramfs-tools-to-add-curl-to-the-initramfs-and-run-curl-in-a-script15:31
punkgeekTJ-: Could you explain more?15:31
punkgeekI saw this documents, Actually it just install curl on the busybox. because it doesn't have curl15:32
TJ-punkgeek: if you want a binary, or other file, installed into the initrd you have to create a hook script that includes the hook-functions script and calls copy_file(path/to/file)15:32
TJ-punkgeek: OK, so you're relying on the busybox already installed in the initrd as a busybox applet?15:33
punkgeekalso someone asked how to run automatically a curl command and no one response on the mentioned topic15:33
TJ-the version of busybox installed is a cut-down, from /usr/lib/initramfs-tools/bin/busybox (package busybox-initramfs)15:34
TJ-punkgeek: might be worth checking the built-in wget there has the options you're relying on, with "/usr/lib/initramfs-tools/bin/busybox wget -h"15:34
punkgeekit works "/usr/lib/initramfs-tools/bin/busybox wget -h"   15:36
TJ-punkgeek: if it isn't working and you have a console on the system, then edit the kernel command-line in the boot config to have "break=premount" so it drops to the shell and you can manually test the command and explore15:36
punkgeekI'm not sure it is a good idea to do it by busybox, because maybe before the ssh login, busybox wouldn't start15:37
TJ-busybox is running the /init script!15:39
punkgeekbut in /etc/initramfs-tools/initramfs.conf seems init start the busybox15:39
punkgeekHowevre, I can change it to run automatically15:40
TJ-we don't use klibc tooling15:42
TJ-oh actually, it's /usr/bin/dash now !15:44
TJ-hahaha no it isn't it's busybox. I accidentally checked /bin/sh not bin/sh in the extracted initrd.img, oops15:46
punkgeekSo is there any suggestion to help me?15:51
rbasakpunkgeek: have you tried a keyscript?15:54
rbasakFor example I wrote https://github.com/basak/netkeyscript a long time ago.15:54
rbasakYou could use that as a model to get the behaviour you want with a different script I think.15:54
punkgeekIt's good, But I can't use this method in my case.15:59
rbasakNo, but you can implement whatever method you want in a keyscript15:59
rbasakThen update-initramfs will insert it into the initramfs automatically I think15:59
punkgeekmy literacy level can't understand that script :D16:11
=== StarHeart is now known as Edgan
=== JanC_ is now known as JanC
octav1aHello, I have two compute clusters with their own disk shares in two different geographic locations. For ease-of-use I've been prompted to consider adding some kind of file share between them (over the internet). Something like an sshfs connection on each side. Does anyone have an idea of how to do this on a system level instead of each user managing their own? I'm guessing I would need to use root in order to properly serve all users...19:04
sarnoldoctav1a: that sounds a bit like openafs19:05
bahamatHey all, I'm trying to bring up LXC instances with a custom network config. Using images:ubuntu/18.04/cloud, I can see that /var/lib/cloud/seed/nocloud-net/network-config does have the config I passed in, but /etc/netplan is empty and cloud-init never ran.19:07
octav1asarnold: to be clear, when I hear distributed file system I think of something like gluster. In this case I want both the file systems to be completely independent, but just corss mounted .19:08
octav1across*19:08
octav1a(ex on system1 there will be /data (local) and /data-system2 (remote)  ; and on system2 there will be /data and /data-system119:08
bahamatIf I run `cloud-init init` manually it does its thing, then running `netplan apply` brings up the proper network config. So my question is why isn't cloud-init running automatically like it's supposed to?19:08
rbasak^ I answered in #ubuntu19:22
rbasakSolution: use ubuntu:bionic, not images:19:22
rbasakFor support for images:, try #lxcontainers19:23
leftyfbrbasak: it's called #lxc now19:23
rbasakThanks19:23
punkgeekIsn't there any way to run a command in busybox startup automatically?20:03
=== TheRedQueen is now known as Drone
=== genii is now known as genii-core
=== franksmcb_ is now known as franksmcb

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!