=== chris14_ is now known as chris14 === chris14_ is now known as chris14 === justache is now known as justache_Test === justache_Test is now known as justache === JanC is now known as Guest8325 === JanC_ is now known as JanC === kostkon_ is now known as kostkon === esv_ is now known as esv === JanC is now known as Guest1241 === xispita_ is now known as xispita === vince_ is now known as vince [16:24] dbungert: I heard a rumor that maybe you know some things about the autoinstall stuff? I still can't figure out how to make the installer grab an autoinstall file. [16:25] MTecknology: I do. Thanks for sharing your autoinstall in progress. [16:25] I'm in a meeting for the moment so my responses might be slow [16:25] the two general plans are to build the autoinstall into the ISO or to serve it over cloud-init, which one sounds better for your case? [16:26] I've been at this for a couple weeks, so slow is still faster than me. [16:27] MTecknology: I use kernel args with nocloud, e.g: `linux /casper/vmlinuz autoinstall ds=nocloud\;s=http://myhost/autoinstall.yaml ---` [16:28] if you've packaged the autoinstall file with the ISO or have a separate disk you can get it from that instead, e.g. `s=/cdrom/mypath/autoinstall.yaml` [16:29] My original goal was to bake it into the iso, but I also need to support remote re-installation so I'm trying to use those same "nocloud" arguments. I thought that the thing needed to end in a / so that it could find the user-data and meta-data files and then read the autoinstall data from the cloud-init config file [16:29] docs: https://cloudinit.readthedocs.io/en/17.2/topics/datasources/nocloud.html [16:29] I don't use separate user-/meta-data that way so can't answer that for you [16:31] That's what's shown on https://ubuntu.com/server/docs/install/autoinstall and https://canonical-subiquity.readthedocs-hosted.com/en/latest/howto/autoinstall-quickstart.html#write-your-autoinstall-configuration [16:31] question: how can I validate the autoinstall/curtin match targets for storage? trying to match by 'model', which should be ID_VENDOR but it just fails to match one [16:32] * MTecknology goes off and tries with a full path to that specific file. [16:32] debug output doesn't really help me here, so just wondering if there are any tools to validate/match that [16:34] The attempt I just tried -> kvm -no-reboot -m 2048 -drive file=image.img,format=raw,cache=none,if=virtio -kernel linux -initrd initrd.gz -append 'autoinstall ds=nocloud-net\;s=https://deb.domain.tld/ubuntu2004/autoinstall.yaml' [16:35] MTecknology: don't do it on initrd, do it on linux [16:36] "on initrd"? [16:36] (not too familiar with raw kvm parameters) [16:36] I assume `-append` appends it to `-initrd` here? [16:37] nope, it's the appended arguments in grub [16:37] well, not "in grub", but what's handed to the kernel [16:38] I can see the arguments listed in the kernel command line, but they don't appear to have any impact on the installer. [16:38] e.g. you see them in /proc/cmdline? [16:38] I also can't find any logs to suggest any web activity was attempted. [16:38] yep [16:38] show us exactly what /proc/cmdline contains please [16:40] mask your s= if you want :P [16:41] heh ... I don't know how to take a screenshot from this. It's "autoinstall ds=nocloud-net;s=https://deb.corp.tld/ubuntu2004/user-data" where "corp.tld" is a typed replacement. Everything else is char4char. [16:42] I made a mistake in my paths above, I had some part of the ISO builder that did something, I'll explain it here: [16:43] my /proc/cmdline contains "BOOT_IMAGE=/casper/vmlinuz autoinstall ds=nocloud;s=/cdrom/nocloud/foo ---" [16:43] within /cdrom/nocloud/foo directory I have two files; meta-data and user-data [16:43] user-data is the autoinstall.yaml file [16:45] in your case you should point to https://deb.domain.tld/ubuntu/2004 which contains those two files [16:45] ^ [16:45] was just about to say the same, thanks p3lim [16:45] That's what I was trying first, before you mentioned autoinstall.yaml ;) [16:45] also keep in mind that https _might_ be problematic depending on how you've signed the certificate on that domain [16:46] > I thought that the thing needed to end in a / so that it could find the user-data and meta-data files and then read the autoinstall data from the cloud-init config file [16:47] https://cloudinit.readthedocs.io/en/latest/reference/datasources/nocloud.html#nocloud - the examples are showing a trailing slash, I don't know if it matters [16:47] you might need to end your url/path with "/" indeed, I know I've done that before [16:47] There's a spot in documentation somewhere that claims the trailing slash must be there [16:47] use it to be safe :) [16:48] I have been [16:48] dbungert: do you know how I can verify/test the "match" keypair from curtin without running the entire autoinstall process? can't seem to get a match against "model" (which is supposed to be ID_VENDOR in udev according to the docs) [16:49] I guess ... I'm sharing the arguments that are absolutely definitely being passed to the installer, so the real question is why the installer seems to do nothing with that. [16:49] I'm not sure if it's trying and not being logged, but netstat suggests it's not being tried at all [16:49] tcpdump* [16:50] are you actually using this for 20.04? [16:50] yep ... I get to target 18.04, 20.04, 22.04, and there's soon to be a fourth in that list. [16:51] p3lim: I'm not sure we have a great way to verify match directives, that sounds like a nice feature improvement. I'm jotting that down as a feature request. [16:51] dbungert: you're on the curtin team? [16:52] I own the Subiquity stack, so all of Subiquity/Curtin/Probert, but I'm not the sole decision maker [16:52] ah cool [16:52] please jot down a feature request for configuring btrfs subvolumes too then :D [16:53] anyways, I cannot for the life of me tell what curtin is actually trying to match against, because it just fails whenever I supply the `match.model: foo` field [16:53] MTecknology: if you're testing newer ISOs, there will be a log line in /var/log/installer/subiquity-server-debug.log load_autoinstall_config [16:54] if subiquity sees the autoinstall, that will have useful information, or maybe just a 'None' if it didn't make it that far [16:54] to be specific, I'm using Dell EMC hardware and ID_VENDOR is "DELL " and I've set `match.model: DELL*` (tried without the glob too) and it doesn't work [16:54] there's no /var/log/installer on this one [16:54] p3lim: I actually have a branch started but it's not a committed feature at this point [16:54] cool :) [16:55] p3lim: (with respect to btrfs and subvolumes) [16:55] if there are steps I can take to test the btrfs branch let me know, would gladly help once it's kinda-ready for that [16:55] * MTecknology screams ... this is a horrible mess that is driving me absolutely bonkers. How the frick is it so dang difficult just to feed a configuration file to an installer?!! [16:56] MTecknology: try using http instead of https [16:56] certificates can pose a problem here [16:56] and ensure it can actually resolve the address (or just use IP) [16:56] It's not making a web request ... cart in front of the horse [16:56] can you wget/curl the file from the installation image? [16:57] yep, I *just* tried that, actually. [16:57] 🤷 [16:57] MTecknology: ok, so do you have /var/log/cloud-init.log ? That should have information on the attempt to process the nocloud-net datasource [16:59] heh.. there's also no /var/log/cloud-init.log. In fact, the only thing at all in /var/log is syslog [17:02] that one is beyond me, something very wrong is going on in the ephemeral install environment [17:02] MTecknology: what install ISO are you looking at? [17:03] I'm using the ubuntu-server-20.04 iso to try to install a desktop of the same version [17:03] MTecknology: which one? 20.04.6? [17:04] yep, ubuntu-20.04.6-live-server-amd64.iso / sho256: b8f31413336b9393ad5d8ef0282717b2ab19f007df2e9ed5196c13d8f9153c8b [17:04] sha* [17:06] super weird [17:07] I just tested that exact same image in libvirt just now, although using localpath, worked just fine [17:09] dbungert: has there been any thought of simplifying the build tooling for ISOs? I currently have 300+ lines mess of a bash script around xorriso, and I feel like it could break at any second :( [17:09] feel free to finish helping MT before answering that [17:09] lol ... I think canonical is trying to abstract the abstraction as much as abstractly possible [17:12] I get the impression any attempts to help me have been exhausted without having control of my keyboard. I'm back to the mercy of documentation ... and soon to be comments. [17:13] I still think it's your cmdline being incorrect :/ [17:13] considering the info provided [17:14] have you tried booting the ISO and manually typing in the cmdline in interactive grub? [17:14] I assumed the backslash was specifically for grub escaping, so by the time the system is booting, the "\;" will be escaped to a ; [17:14] If it is truly supposed to remain a \; into cmdline, then I have only accomplished this once. [17:14] it is, see the above message from me where I dumped my /proc/cmdline [17:14] it's supposed to be just ";" between ds=nocloud and s= [17:15] MTecknology: where did the kernel and initrd come from? It's best to match them to the one from the iso, and can be found at casper/{vmlinuz,initrd} [17:15] dbungert: I grabbed them from the iso, per some other instructions that I linked to but can't find again [17:16] ok. I think at this point you need to understand why the install environment seems to not be coming up normally. journalctl may have errors. [17:19] p3lim: ubuntu-image has that as a goal, but it's not supporting ISO creation yet [17:20] so the official images is also built using a messy bash script? :D [17:27] you may or may not be interested in https://pad.lv/c/livecd-rootfs, p3lim [17:28] but I think you already know the answer [17:28] * MTecknology is curious what's behind that link [17:30] I just repackage the ISO with the nocloud files [17:30] can't host anything in our prov environment [17:32] p3lim: don't worry about it if you have a working solution, I'm just pointing to some of the build software in question [17:32] it's working now, might not work tomorrow :D [17:32] that's why I'm asking :) [17:33] once it breaks I'll just see if either ubuntu-image has been improved, or look at the actual tooling ya'll use [17:34] p3lim: If you can tolerate static images, live-build is pretty nifty [17:35] MTecknology: I need to be afk, you're welcome to ping or leave comments here and I'll check later [17:40] dbungert: Thanks; It occurred to me that I'm probably trying to rely too heavily on inaccurate and missing documentation, and it appears to not exist because it's always changing [17:41] no wonder I can't get anything to work [17:42] the docs are incorrect [17:43] in the docs, disk selection extensions says model=ID_VENDOR, but it's actually ID_MODEL [17:43] https://github.com/canonical/subiquity/blob/server/jammy/subiquity/models/filesystem.py#L999-L1001 [17:44] vendor=ID_VENDOR isn't even documented [17:46] Did I just ... are rotational and ssd the only options? what about tape? :P [17:46] s/Did I just .../the answer was no and I was going to delete it [17:50] ya know ... I /do/ have ipxe readily available. I was using this earlier and it provided absolute proof of network connectivity, since that's where the two payloads came from. It just means I also have to go back inside because I don't want to make a network cable long enough for me to play with that outisde. :/ [17:51] #ITproblems :P [17:54] does ubuntu not have build-essential? [17:56] oooooh, lol ... there's no sources.list present. That must be one of the final setup things offloaded to cloud-init on the first boot. [17:57] dbungert: Is there any chance you can make this part easy for me and tell me what things cloud-init is actually responsible for on the first startup? So far it seems to be sources.list, one of the lists of package installs, and the first user [18:09] p3lim: new subiquity stable snaps are "backported" to newer ISO builds, so that jammy branch is relevant for 22.04.0 ISOs but https://github.com/canonical/subiquity/blob/ubuntu/mantic/subiquity/models/filesystem.py#L1533 would be relevant instead for 22.04.4 [18:12] good to know, but docs are incorrect regardless [18:12] I've reported the docs issue on launchpad [18:20] MTecknology: user creation does happen at first boot of the target system. the `packages` directive of autoinstall is the same. /etc/apt/sources.list really should be present. It might be interesting to add `while [ ! -f /run/finish ] ; do sleep 1 ; done` to autoinstall.late-commands, which will halt the install just before reboot to the target system and let you poke around to see before [18:20] first-boot stuff runs. [18:22] Can I provide that (autoinstall.late-commands) as a boot argument? [18:23] no, unfortunately [18:24] oh ... this isn't doing an automatic reboot. I haven't figured out the autoinstall, but I also need a mental break from it so I'm moving on to doing a manual install that does the same steps. [18:24] so "late-commands" is just what I type after it says updates are done, and early-commands is before giving the installer any input. [18:26] right, late-commands are at install time but before first boot, one of the last steps. early-commands are before anything has really started. [18:30] Oh! Is there any way to get input from the user? I'd like to prompt for a password and dump that to a text file for another late-command to pick up ... or is it possible to let the script in the late-command directly request the password? (the command invoked is gpg - https://github.com/MTecknology/teckhost/blob/master/bootstrap#L225-L226) [18:31] for debian, I use https://github.com/MTecknology/teckhost/blob/master/iso/debconf_early [18:42] MTecknology: for prompting for supported things like the first user password or the LUKS passphrase, that can be done, but for arbitrary inputs like your gpg case I have no answer. [18:43] oh ... [18:44] I guess that's something that would have to be offloaded to firstboot and written to interact with the boot process, similar to cryptsetup [18:45] I don't actually have any "firstboot" in my personal deployment. As soon as the installer shuts down at the end, it's completely configured and ready to ship (usually to family). I can even walk family members through doing a remote installation with any hardware they pick up at some cheap box store [18:56] dbungert: Oh .. how can I use "curtin" from another tty? I assumed that it would behave similar to in-target, but that doesn't seem to be the case. [18:57] I guess that's confusing since there's "curtin in-target" vs. "in-target" .. I was using the latter [18:59] on recent ISOs you can get to curtin with `subiquity.curtin`, so for example you can do `subiquity.curtin in-target -i -t /target -- /bin/bash` to get a live shell chrooted in, in exactly the same mount setup [19:06] I saw lots of warnings against using different releases for different installs. Does that mean I'm stuck without for this? [19:08] It's mostly the removal of (I think) sg3-utils that causes a problem when run inside of chroot at the end of the install, because it needs /dev to be remounted. [19:13] lol ... apparently "subiquity-shell" is not what I thought it was [19:13] that seems to be the user interface bit? [19:24] MTecknology: you can refresh the snap to the latest version if you want newer features. The subiquity snap does not refresh itself by default, or you can say `refresh-installer: { update: true }` if you do want that. [19:25] and yes subiquity-shell is internals stuff, I doubt it's very helpful when directly invoked [19:25] I had the impression that updating the snap was only an option for newer releases [19:25] like, update the snap, and get updated ubuntu [19:35] they are separate items - if you use a 22.04.x iso you are getting Ubuntu 22.04. Refreshing the snap helps if you want to get newer features or bugfixes but it doesn't change the OS version being installed. [19:36] gotcha, thanks for clarifying [19:48] "Also, please note that software in universe WILL NOT receive any review or updates from the Ubuntu security team." ... but ... isn't that enabled by default? [19:56] dbungert: Which is actually canonical; security.ubuntu.com or archive.ubuntu.com foo-security? [19:58] archive.ubuntu.com can be a different mirror, security updates hit security.ubuntu.com first. This has more details: https://wiki.ubuntu.com/SecurityTeam/FAQ#What_repositories_and_pockets_should_I_use_to_make_sure_my_systems_are_up_to_date.3F [19:58] thanks [21:26] dbungert: oh ... I'm finally getting some logs. Now it seems to be failing because vendor-data is missing. Is that a required-empty file? [21:28] https://dpaste.com/F7KUQ44MZ [21:29] AIUI vendor-data is optional, I see that also in successful cases. [21:32] That's the only thing standing out to me right now. It seems like cloud-init is finally trying to grab the "cloud-config" files, but it still seems like there's no impact to the installation [21:33] oooh ... 2024-03-11 21:21:32,837 - util.py[WARNING]: Failed loading yaml blob. Invalid format at line 33 column 49: "mapping values are not allowed here [21:34] - printf "network:\n version: 2\n renderer: NetworkManager" >/target/etc/netplan/nm.yaml [21:34] that should be wrapped entirely in quotes [21:38] oooh next fun challenge [21:40] I guess "install to largest disk" is the best strategy here [23:40] note the WARNING about "netplan apply" failing, that doesn't look good