/srv/irclogs.ubuntu.com/2020/08/05/#ubuntu-installer.txt

xnoxrealtime-neil:  because it uses launchpad builders to schedule building livefs via launchpad api, which is a priviledged operation.15:26
xnoxrealtime-neil:  and expects +livefs objects to be available in launchpad.15:27
xnoxrealtime-neil:  see for example https://launchpad.net/~ubuntu-cdimage/+livefs15:27
xnoxrealtime-neil: you might want to search for "ubuntu-image classic" or "ubuntu old fashioned builder" if you want to figure out a way to run livecd-rootfs builder locally without launchpad.15:27
xnoxrealtime-neil:  there are etc/ config settings as well to "ssh into a builder" and build there. But that has not been used for years and years now, not sure if those "manual" builders still work.15:28
xnoxrealtime-neil:  it's best to monkey patch existing iso / squashfs, instead of trying to rebuild them from scratch. Because for example, you might be able to replicate the official build. But will not be able to correctly sign the pool with keys that are trusted => rending the .iso non-installable.15:29
realtime-neilxnox: okay, I understood; I recently discovered the `simple-cdd` way of building Debian installation media --- any overlap there? Anything I can use for Ubuntu?15:29
xnoxrealtime-neil:  the plan was to have "ubuntu-image" snap do it all by now. Both in our infrastructure and locally. Alas, those grand plans have not been done yet.15:30
xnoxrealtime-neil:  if you don't need to change squashfs, you can run cron.daily without '--live' it means it will simply download the currently built squashfs, without rebuilding them.15:30
xnoxbut that still will only produce half-baked thing.15:31
realtime-neilxnox: Using the http://cdimage.ubuntu.com/releases/bionic/release/ubuntu-18.04.4-server-amd64.iso, I did try to put my proprietary debs in the filesystem.squashfs, and it mostly worked. I then attempted to _also_ install ubuntu-desktop in there, which did not play nice with the subsequent `pkgsel` operations.15:33
xnoxrealtime-neil:  why are you trying to shoe-horn two different products?15:33
realtime-neilxnox: because there's no desktop image on that index page15:34
xnoxrealtime-neil:  because they are on releases.ubuntu.com..... (obviously)15:35
xnoxrealtime-neil:  http://releases.ubuntu.com/15:35
xnoxhttp://releases.ubuntu.com/bionic/ & http://releases.ubuntu.com/focal/15:36
xnoxnote that desktop does not use neither pure d-i, nor pure subiquity.15:36
xnoxit uses casper + ubiquity (which wraps portions of d-i)15:36
realtime-neilxnox: Yep, there it is --- the reason I discarded that image.15:36
xnoxhence for example, ubiquity preseed looks like d-i one, but supports a different subset of keys, and/or slightly simplified config15:36
xnoxbut one can use ubiquity to automatically preseed installation, which works across all releases15:37
xnoxtogether with nfsroot network boot15:37
xnoxrealtime-neil:  are you after customized desktop? server? or both? in the end?15:37
xnoxhttps://wiki.ubuntu.com/UbiquityAutomation15:38
realtime-neilxnox: this implies I can translate every d-i directive I have into ubiquity-speak --- a process you mentioned was not strictly possible15:38
xnoxnetwork, partitioning, etc all works.15:38
xnoxw.r.t. package selections things are a lot easier, as ubiquity simply copies all of the filesystem.squashfs. Simply modify filesystem.squashfs and install anything you like into it, and ensure it is marked as installed.15:39
xnoxand that's it.15:39
xnoxno need to make a pool, sign it, etc.15:39
realtime-neilxnox: I'm after a customized desktop with private debs; are you saying this can be made to work via ubiquity and the ubuntu-18.04.4-desktop-amd64.iso image?15:40
xnoxrealtime-neil:  i do not expect you to have that complicated d-i preseed15:40
xnoxrealtime-neil:  yeah. trivially, and in the same manner acroos bionic/focal/groovy.15:40
xnoxxenial too.15:40
xnoxunpack desktop iso, chroot into filesystem.squashfs, (bind mount dev proc, bring etc/resolv.conf), add any repositories you need, install any packages you need), update iso with the new bigger filesystem.sqaushfs => nfsroot boot that, complete install.15:41
realtime-neilxnox: Okay, and this works because --- using ubiquity --- we fundamentally do NOT `pkgsel` after the filesystem.squashfs is extracted to the rootfs filesystem?15:41
xnoxif you are after desktop, you do want to start from the desktop iso.15:41
xnoxrealtime-neil:  ubiquity does NOT use pkgsel at _all_, and why should you?15:42
realtime-neilxnox: force of habit, I guess. Okay; I understood everything except the NFS bit. Why do I need that?15:42
xnoxit copies filesystem.squashfs verbantim to target, and then like adds/removes a few things to make it look nicer.15:42
xnoxrealtime-neil:  because currently xenial/bionic/focal/groovy casper in desktop iso do not quite support url=http:///path-to.iso ip=dhcp network boot with the desktop iso.15:43
xnoxi think url= boot should now work on focal in desktop.iso but i did not test that.15:43
xnoxbut the NETBOOT=nfs nfsroot= should work across all releases with ubiquity desktop iso15:43
realtime-neilxnox: this assumes I want to boot via network, but If I'm okay losing that functionality, I can boot the resquashed iso directly, yes?15:44
xnoxrealtime-neil: there is toram option too. I.e. if you can place installer onto disk somehow, it can be copied to ram, and then running from ram, it can isntall back onto the drive one is booted from.15:44
xnoxrealtime-neil:  if you repack it, in a similar way we packed => yeah it should be fine to boot in uefi/bios cd/usb like regular iso.15:44
xnoxif you update md5sums.txt it will be indistinguishable from regular isos15:45
realtime-neilxnox: okay, cool; what kind of kernel params should I be changing in the /boot/grub/grub.cfg, if at all?15:45
xnoxrealtime-neil:  if you rebuild .iso with updated md5sums.txt & filesystem.squashfs, for local boot, you will not need to change grub.cfg at all.15:46
realtime-neilxnox: excellent; where is this checksum file to which you refer?15:46
xnoxrealtime-neil:  it's on the top level of the .iso you can either rebuild/update it, or you can just remove it.15:47
xnoxrealtime-neil:  all our build logs are public15:47
xnoxso if you navigate to https://people.canonical.com/~ubuntu-archive/cd-build-logs/ubuntu/groovy/daily-live-20200805.log15:47
xnoxyou will see ubuntu (which desktop), groovy build for today with full xorriso command used to recreate the iso15:48
xnox/srv/cdimage.ubuntu.com/scratch/ubuntu/groovy/daily-live/debian-cd/amd64/groovy-desktop-amd64.raw -J -joliet-long -l -b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info --grub2-mbr cd-boot-images/usr/share/cd-boot-images-amd64/tree/boot/grub/i386-pc/boot_hybrid.img -append_partition 2 0xef15:48
xnoxcd-boot-images/usr/share/cd-boot-images-amd64/tree/boot/grub/efi.img -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -partition_offset 16 cd-boot-images/usr/share/cd-boot-images-amd64/tree CD115:48
xnoxyou might need to adjust the paths to things, if you unpack things into different places.15:48
xnoxrealtime-neil:  or, if you have the cdimage setup already, you will have tmp/scratch directory.15:48
xnoxrealtime-neil:  if you run the build without --live everything should be there.15:48
realtime-neilOh, i've become quite the xorriso user since we last spoke; I'm fine executing it directly with the proper bootloader paths15:49
xnoxrealtime-neil:  then it's trivial to unpack actually daily iso in those direcotreis, unpack/chroot/customize filesystem.squashfs/mksquashfs/replace, rerun xorriso => done.15:49
xnoxrealtime-neil:  cool. Just direct xorriso is best.15:49
realtime-neilxnox: agreed; I've got some scripts that probably duplicate most of what's in the ubuntu-cdimage python scripts, but my python is bad, so...15:50
xnoxrealtime-neil:  also if you have some generic script, that does this.... i wouldn't mind like shipping it in the cd-boot-images package directly which effectively will be "rebuild .iso with ` apt install path/to/debs/*.deb` in filesystem.squashfs"15:50
xnoxrealtime-neil:  or yeah stuff for ubuntu-cdimage. There are some remains of "update iso" but we probably ship something like "update squashfs" script there. as it would be very useful for customizations.15:51
xnoxrealtime-neil:  it's trivial for me to talk about these things, as i do work on improving things15:52
realtime-neilxnox: heh. I call it `edsquashfs` and it uses docker to mutate the filesystem.squashfs15:52
xnoxbut for the production builds; rather than the "down the line, tweak/customize"15:52
xnoxrealtime-neil:  hahhahahhahahhhhaa cute.15:52
realtime-neilxnox: hey it saves me mount/umount mistakes, so that's something15:53
xnoxyeah, probably docker / lxd / multipass is nice for this to "isolate it" and still have "i want network access, and please repeat this"15:53
realtime-neilIf I can adapt this it to use raw lxd (maybe?), then I might have something worth sharing15:53
xnoxrealtime-neil:  if there are secrets you can share it privately, and i can work on cleaning it up.15:55
realtime-neilno secrets; lemme polish what I have and paste it15:56
xnoxrealtime-neil:  i am mostly after desires & requirements, and rough implementation. Because i really don't know, what issues people face, who are in your position.15:56
realtime-neilxnox: https://paste.ubuntu.com/p/smgdTNrwPY/16:00
realtime-neilxnox: why do all ubuntu-18.04.4-server-amd64.iso  `/boot/grub/grub.cfg` menu entries that have a `file=` parameter point to /cdrom/preseed/ubuntu.seed --- a file which definitely looks like a d-i preseed? I thought you said it was using ubiquity?16:04
realtime-neilalso, it's doing `tasksel/first multiselect ubuntu-desktop`. Am I using the wrong image? What am I misunderstanding?16:05
xnoxrealtime-neil: in bionic; server uses just d-i; desktop uses just ubiquity16:07
xnoxrealtime-neil:  in bionic; server.iso "becomes a full-server iso" because of that file= parameter, that customizes the behaviour of d-i to be like 'Ubuntu Server'.16:08
realtime-neilwhoops, this is in the ubuntu-18.04.4-desktop-amd64.iso also16:08
xnoxrealtime-neil:  because d-i is flexible, and we used to build "desktop alternative images" that also used d-i / console installer, yet installed desktops like ubuntu/lubuntu/xubuntu/etc => but all of those got discountinued over the years.16:08
xnoxrealtime-neil:  so desktop16:08
xnoxrealtime-neil:  yes desktop iso also have file= parameter to slightly configure ubiquity too..... despite most of it16:10
xnoxbeing actually redundant16:10
xnoxi've tried to clean up / remove file= in groovy16:11
xnoxbecause yeah, it's sad and pointless.16:11
xnoxbut also16:11
realtime-neilxnox: Okay, and there's spooky ubiquity magic that will pick up, what, a `seedfrom=` directive?16:11
xnoxa good place for you to hook in ;-)16:11
xnoxrealtime-neil:  there is no cloud-init on desktop isos16:11
xnoxrealtime-neil: .... unless you do install cloud-init in your customized filesystems.squashfs.... because then it will use that directive.16:12
xnoxrealtime-neil:  but note, ubuntu-desktop do not use autoinstall/cloud-init16:12
* xnox realizes what a mess all of this is16:12
* xnox sighs a lot16:12
* xnox feels like i should document all of our conversations16:13
realtime-neilxnox: I'm so confused; I thought I was avoiding the pkgsel for good by using the ubuntu-18.04.4-desktop-amd64.iso ; are you now saying that the pkgsel is inevitable, no matter what?16:13
xnoxrealtime-neil:  it feels like "take stock iso, and have hello.deb preinstalled" is like a usecase which is painfully hard across all series server & desktop16:14
xnoxrealtime-neil:  desktop iso, mounts filesystem.squashfs and does cp -r of it.16:15
xnoxrealtime-neil:  live-server, mount .squashfs and uses autoinstall/curtin, to cp -r them16:16
xnoxrealtime-neil:  "old/classic" server, uses pkgsel to apt install all the things.16:16
xnoxrealtime-neil:  i'm saying that no modern images use pkgsel anymore.16:18
xnox(specifically live-server & desktop, in any series)16:18
realtime-neilxnox: the bionic desktop does: https://paste.ubuntu.com/p/XRxKXzqJDq/16:18
xnoxrealtime-neil:  which is actually has no effect at all.16:25
xnoxrealtime-neil:  it's obsolete remains form the old "d-i ubuntu-desktop alternate iso" which we no longer produce.16:26
xnoxrealtime-neil:  it's literary missleading =) sorry about that.16:26
realtime-neilxnox: okay, okay; I'm starting to thing we should be documenting, like, all of this.16:26
xnoxextras.ubuntu.com is dead for decade now16:26
xnoxtasksel is unused16:26
xnoxkeep-installed => yes, it is used, but those packages listed there do not exist in ubuntu for decades now16:27
xnoxand altmeta should be use, but actually doesn't actually (because i found bugs in it this year, which were there from the begineeing of time)16:27
realtime-neilxnox: I believe all of this, but I do want to know the mechanism that's preventing these very-much-extant files from having any effect.16:27
xnoxhahahhaha right16:30
xnoxthey are kind of noops16:30
xnoxrealtime-neil:  and i guess they do get in the way when _you_ try to use preseed16:30
xnoxrealtime-neil: horum.16:30
xnoxrealtime-neil:  also i'm in meetings at the moment, so sorry for slow responses16:31
realtime-neilxnox: no problem answer as your schedule dictates.16:32
realtime-neilxnox: So, if i have a custom filesystem.squashfs ready to go into custom ubuntu-18.04.4-desktop-amd64.iso, _AND_ I want to quash all the debconf prompts, then my only recourse is to, what, a bunch of kernel params?16:34
xnoxrealtime-neil:  if you want to make it auto installable one has to do a few things.16:35
xnox1) change grub.cfg to do auto | noninteractive boot 2) supply preseed with more answers.16:35
xnoxto acheive those things i would steal the preseeds from ubuntu-qa automated test cases16:36
xnoxand either pack the preseed into the initramfs + customize grub.cfg16:36
xnoxor customze that file=ubuntu.cfg thing in place with my pressed, and append auto to the kernel cmdline16:36
xnoxlet me try to find all of that16:37
realtime-neilxnox: Okay, I'll try that; got a link to something that shows me the "ubuntu-qa automated test cases"?16:37
xnoxyeah trying to find that.16:37
xnoxit does all sorts of things like connect to libvirt, create vms, take iso, make it auto pressedable, boot it.16:38
realtime-neilI need all this goodness in my life16:38
xnoxi would not call it goodness16:38
xnoxnobody likes touching it, even in full PPE and barge poll16:38
realtime-neilxnox: I have some rather uncommon interests, if you haven't noticed already :D16:39
xnoxhar har har17:36
xnoxrealtime-neil:  sorry i'm running out of time. i will be back later and/or tomorrow with pointers to qa-tests17:37
realtime-neilxnox: okay, see you then17:37
xnoxrealtime-neil:  so21:45
xnoxwe have jenkins, which is configured using jenkins job builder, using yaml syntax.21:45
xnoxwhich uses "utah" which downloads isos, statically validates isos, create preseeds to autoinstall them, uses libvirt/virsh to boot things, install them, ssh into them, test them, shutdown, collect test results21:46
xnoxthe test results are public. I.e. focal, desktop, default "smoke-test" install is at https://platform-qa-jenkins.ubuntu.com/view/Focal/job/ubuntu-focal-desktop-amd64-smoke-default/21:46
xnoxwhich is defined from https://git.launchpad.net/qa-jenkins-jobs/tree/jobs/iso-testing/jobs.yaml21:46
xnoxwhich uses a lot of "utah" which is21:47
xnoxhttps://git.launchpad.net/utah/tree/21:47
xnoxwhich has this little gem21:47
xnoxhttps://git.launchpad.net/utah/tree/conf/utah/default-preseed.cfg21:47
xnoxwhich is enough to autoinstall ubiquity21:48
xnoxbased images21:48
xnoxand like you can drop that on the iso, and change grub.cfg to point at that file21:48
xnoxor like utah does, you can append it to the initrd21:48
xnoxnote i think that preseed might be slightly incomplete21:48
xnoxas i think utah injects some ephemeral things - i.e. unique hostname or some cuhs.21:48
realtime-neilxnox: dear lord21:49
xnoxhttps://git.launchpad.net/utah/tree/conf/utah/default-vm.xml i think is the default virsh template for the smoke-test VM21:49
xnoxwhich again i think is a bit incomplete as it dynamically insers the right iso21:49
xnoxalso setting up utah is a nightmare https://git.launchpad.net/utah/tree/utah_howto.txt and i don't think you need or want it.21:49
xnoxit's literary an acient hacked up thing to do iso testing21:49
xnoxhttps://git.launchpad.net/utah/tree/utah/preseed.py => is some of the hackery that it does on per-run basis21:50
xnoxhttps://git.launchpad.net/utah/tree/utah/provisioning/provisioning.py is a nightmare and deals with "funny" powerpc, and "funny" s390x etc.21:51
xnoxrealtime-neil:  so when you said "i want all of these goodness" i did giggle.21:51
realtime-neilxnox: this is probably going to take me a while to get through, but the preseed.cfg is already helping21:52
xnoxbecause like even looking at this now, i'm not sure where it repacks the preseed!21:52
xnoxlet me see if i can actually pull the "final full" preseed.cfg that it embed for the install21:52
xnoxas that might be more helpful21:52
xnoxand like cmdline args to boot it unattended21:52
xnoxdo you see21:53
xnoxrealtime-neil:  https://platform-qa-jenkins.ubuntu.com/view/Focal/job/ubuntu-focal-desktop-amd64-smoke-default/165/artifact/log/utah-99555-focal-amd64-preseed.cfg/*view*/ ?21:53
xnoxthis looks like the full preseed with hostname, user password, user and success/fail commands.21:53
xnoxrealtime-neil:  in success/failure commands, one normally "calls home" or executes extra stuff "at the end of the install", the system to install is mounted in /target21:54
xnoxand one can do things like "in-target apt install -y hello"21:54
realtime-neilyep, that's how I was writing my late_command scripts21:54
xnoxin https://platform-qa-jenkins.ubuntu.com/view/Focal/job/ubuntu-focal-desktop-amd64-smoke-default/165/artifact/log/utah-99555-focal-amd64/installer/21:55
xnoxyou see collected logs from installation21:55
xnoxfrom https://platform-qa-jenkins.ubuntu.com/view/Focal/job/ubuntu-focal-desktop-amd64-smoke-default/165/artifact/log/utah-99555-focal-amd64/installer/syslog/*view*/ you can see that "to boot unattended" it did21:55
xnoxKernel command line: automatic-ubiquity noprompt netcfg/get_hostname=utah-99555-focal-amd64 log_host=192.168.124.1 log_port=0 boot=casper keyboard-configuration/layoutcode=us21:55
realtime-neilI can't even ping that jenkins host21:55
xnoxand i think it embedded the preseed.cfg inside the initrd.21:55
xnoxhm21:56
xnoxmaybe i am on vpn21:56
xnoxthere must be these publically too21:56
xnox=(((((((21:56
xnoxthey used to be21:56
xnoxyeap without vpn it's dead21:56
xnoxnone of this is secret though i wonder if i can repastebini it21:56
realtime-neilokay, those command line params looks awfully similar to the one that finally worked for me21:56
xnoxbut like log_host is for remote syslog? so optional.21:57
realtime-neilyep; didn't need it, so it's not part of my tweaks21:57
xnoxand instead of appending preseed.cfg to the initrd, i guess it is best to just modify the exisitng one pointed with file= thing, or like make your own on the top level of thecd, and do file=/cdrom/realtime-neail-preseed.cfg21:58
xnoxrealtime-neil:  https://paste.ubuntu.com/p/BBH3FpVYV7/21:59
realtime-neilwow; all of this is definitely similar to my `preseedify` script21:59
xnoxso that's the full preseed for default "all in one disk, the only one, plain ext4, no crypto, no lvm, no raid"22:00
xnoxwithout even picking a disk, cause only one internal one.22:00
xnoxand it uses serial console for logging22:01
xnoxbut it does show things like automated reboot, and stuff22:01
xnoxbut note, this preseed is "universal" for desktop & d-i old server22:01
xnoxi.e.22:01
xnoxd-i pkgsel/include string openssh-server python-yaml bzr git gdebi-core => i'm not sure that does anything22:01
xnoxmaybe it does? who knows22:01
xnoxso use that as a guide, with a pinch of salt, and adjust to taste.22:02
xnoxrealtime-neil:  is any of above useful at all? and or need time to process?22:02
realtime-neilit's immediately useful as a sanity check; with time to examine, I'm sure it will be directly useful with my own work; thank you very much22:04

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