[16:29] <realtime-neil> I'm following along with https://ubuntu.com/server/docs/install/autoinstall-quickstart and it's working for me, but I want to adapt it such that preseed (or something) retrieves all things from the web server (as opposed to the iso). How would I go about doing this?
[17:39] <CarlFK> realtime-neil: huge guess here, but try url=hostname
[17:39] <CarlFK> as a kernel parameter
[17:40] <CarlFK> that guess is based on how d-i does it, maybe it is the same
[17:40] <realtime-neil> CarlFK: you mean, in addition to the `s=http://_gateway:3003/` ?
[17:41] <realtime-neil> also, does anyone know if that `s=` variable is a shortened alias for something?
[17:41] <CarlFK> so.. I am aware there is a new installer, and looked at it a while ago... that's about all I know
[17:42] <realtime-neil> CarlFK: I tried to build the new installer (https://code.launchpad.net/ubuntu-cdimage) and got nowhere. What I could understand looked heavily dependent on running from a Ubuntu Production machine.
[17:50] <realtime-neil> CarlFK: the `url=` trick didn't work... qemu prints `/init: line 49: can't open /dev/sr0: No medium found`
[17:52] <realtime-neil> which makes sense, but I can't find that init script anywhere; the initrd inside the *.iso is literally empty except for an AMD blob.
[18:25] <CarlFK> realtime-neil: /dev/sr0 sounds like it is looking for a scsi (emulated) cdrom.. I forget what the R in SR stands for
[18:25] <CarlFK> but I am guessing it isn't related to the url=
[18:26] <realtime-neil> CarlFK: agreed --- but which script is reporting that error?
[18:26] <CarlFK> no idea - I have not done iso building in  over 5 years...
[18:26] <CarlFK> I do mostly pxe and a bit of usb with a RW fs
[18:27] <CarlFK> and I think I did 1 run with the new ubuntu installer in ... Feb maybe.    I liked that the yml file was much smaller, and netplan stuff was nice too
[18:27] <CarlFK> that is about all I can remember
[18:33] <realtime-neil> I do mostly pxe also, hence my motivation with this --- I don't want the installer to use local media, only the server I tell it to.
[18:35] <CarlFK> it sounds like you are working with an iso image?
[18:38] <CarlFK> heh - the only thing in current is legacy : http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/current/
[18:41] <CarlFK> welp... I poked around and found http://archive.ubuntu.com/ubuntu/dists/focal/main/uefi/linux-amd64/4.15.0-15.16/
[18:42] <CarlFK> maybe vmlinuz-4.15.0-15-generic.efi is what you want to pxe boot, but thats only because I can't find anyone else
[19:45] <realtime-neil> Okay, so here's something: the iso contains a 76 MiB initramfs
[19:47] <realtime-neil> But when I extract it, I only see a 30KiB kernel/x86/microcode/AuthenticAMD.bin
[19:48] <realtime-neil> Something created this cpio archive, but it wasn't cpio.
[22:10] <xnox> realtime-neil: what do you want to retrieve ove the network? just the preseeds user-metadata? or do a network boot, fetch iso from internet, but also fetch user-metadata from the internet?
[22:10] <xnox> realtime-neil:  our initrd have two early initrds, with microcode, and one late one. Use unmkinitramfs to unpack it.
[22:11] <xnox> realtime-neil:  unfortunately there is no easy way to repack all three back together (uncompressed cpio, uncompressed cpil, lz4 linux legacy compatible cpio), but you can just repack the main one if you don't care about microcode vulnerabilities during installation.
[22:12] <realtime-neil> xnox: I want to do a network boot, fetching both the iso and the user-metadata from a specific host; i.e., namely one I control.
[22:13] <realtime-neil> xnox: I think I've got a handle on the concatenated initrds (with a little help from `skipcpio`)
[22:13] <xnox> Cool
[22:14] <realtime-neil> xnox: I can just extract each initrd and create a new cpio archive from all the extracted contents, yes?
[22:17] <xnox> ip=dhcp iso=http://trahtahtah/urlto/server.iso ds=nocloud-net;s=http://URL/to/metadata-service
[22:18] <xnox> So if you can extract stock initrd & kernel, and boot them with above it will configure network, download / mount / boot iso, hit your network datasource, and use autoinstall user-data from there.
[22:18] <xnox> realtime-neil: why are you trying to repack initrd? Does it not do everything you need anyway?
[22:19] <xnox> When I say "extract initrd/kernel" I mean like mount .iso and copy them out from casper/ sir.
[22:19] <xnox> *dir
[22:19] <realtime-neil> xnox: at first I was trying to figure out where the init script was coming from ... that's how I went down the rabbit hole with skipcpio and unmkinitramfs
[22:21] <realtime-neil> If, on the off chance I couldn't get that kernel command line working (the one you just showed me), then I was resigned to changing scripts in the the initrd
[22:21] <xnox> But we divert boot to boot=Casper by default, hence most interesting stuff is in the scripts/Casper or some such
[22:21] <xnox> Man Casper is helpful too
[22:22] <xnox> http://manpages.ubuntu.com/manpages/focal/en/man7/casper.7.html
[22:22] <xnox> However some pieces of that are incomplete and out of date. I really should fix it.
[22:23] <xnox> realtime-neil: it would help if you could check the autoinstall guide, and at the bottom there should be a forum link. It would be nice to hear which page you followed, and what pointers you needed to get "network boot done done"
[22:23] <xnox> realtime-neil: cause what you say, should be easy, and it feels like our documentation might be incomplete
[22:23] <realtime-neil> xnox: will do; aside: what do the `ds=` and `s=` vars stand for?
[22:23] <xnox> Or like not guiding the user to the quickest easiest way.
[22:23] <xnox> Ds is datasource, s is for seedfrom.
[22:24] <xnox> Some bootloader a have character limits hence it tries to support "short forms"
[22:24] <xnox> All of datasources are documented in cloud init.
[22:24] <realtime-neil> well, today is definitely the first time I've seen the `iso` kernel param used with `ds=` and/or `s=`.... maybe that deserves a mention?
[22:24] <xnox> https://cloudinit.readthedocs.io/en/latest/topics/datasources.html
[22:24] <xnox> Rea
[22:25] <xnox> realtime-neil: ack please comment in forum linked from bottom of the relevant autoinstall page!
[22:25] <xnox> I have to go, will get to it later.
[22:25] <realtime-neil> understood