atmark | hello, I'm unable to build a Ubuntu Focal image | 18:39 |
---|---|---|
atmark | I'm seeing this `/tmp/in_target.d/finalise.d/50-bootloader: line 49: type: grub2-mkconfig: not found` | 18:39 |
atmark | Build command: `DIB_RELEASE=focal disk-image-create -o ubuntu-focal.qcow2 vm ubuntu` | 18:40 |
clarkb | atmark: that platform may need to use grub-mkconfig instead? However, we build focal images using ubuntu-minimal (not ubuntu) and that works last I saw and the finalize code is common I thought | 18:42 |
atmark | ok, let me try ubuntu-minimal | 18:43 |
clarkb | atmark: note ubuntu-minimal builds from scratch using debootstrap so you amy need to add more packages to the total list | 18:43 |
clarkb | also you can edit the element and stick a `bash` command in there before it fails to debug. It acts like a debugger breakpoint and drops you into an interactive shell. When you exit the build will continue. Maybe you need to install extar packages or maybe the command is grub-mkconfig and we need to fix the finalize code | 18:44 |
atmark | the build still fails | 18:46 |
atmark | I used `DIB_RELEASE=focal disk-image-create -o ubuntu-focal.qcow2 vm ubuntu-minimal` | 18:46 |
atmark | let me try adding `bash` to bootloader element | 18:47 |
clarkb | atmark: that error is a result of the element trying to determine which grub command to use to make the config | 18:49 |
clarkb | I don't think it is fatal and it shows up in our focal builds too | 18:49 |
clarkb | and then our builds run grub-mkconfig later instead | 18:50 |
clarkb | maybe you can use a paste service (like https://paste.opendev.org) to share your build log? | 18:50 |
atmark | one sec | 18:50 |
atmark | clarkb: https://clbin.com/aw4fH | 18:59 |
atmark | paste.opendev.org is limited to a number of lines | 18:59 |
clarkb | I think the fatal issue may be the unknown filesystem errors. Those don't occur in our logs https://nb01.opendev.org/ubuntu-focal-d6501fe174b54f9896797cc1cc0900e4.log | 19:00 |
clarkb | are you supplying a custom disk mapping? | 19:01 |
atmark | nope | 19:01 |
atmark | DIB_RELEASE=focal disk-image-create -o ubuntu-focal.qcow2 vm ubuntu --logfile focal.log | 19:01 |
atmark | that's the command | 19:01 |
atmark | no other extra parameters | 19:01 |
clarkb | ya the mkfs calls indicate a single device being created with ext4 which is the default | 19:04 |
atmark | let me see if bionic hits same the fatal issue | 19:09 |
clarkb | I think that error indicates that grub doesn't know which device to install to? Looking at our successful log the /dev/loop1 device is supplied on the command line. Also the flow of that grub install process seems to differ with your log | 19:10 |
clarkb | are you running latest disk image builder? | 19:10 |
atmark | I'm getting fatal issue building bionic too | 19:10 |
atmark | yes | 19:10 |
atmark | (env) ➜ iaas-imagebuilder (c2site-proxmox) ✗ pip freeze | grep diskimage-builder | 19:11 |
atmark | diskimage-builder==3.31.0 | 19:11 |
atmark | y | 19:11 |
clarkb | Ithink the difference in the logs is due to us running with debug enabled. If you rerun with -x set it should enable the debug tracing and then hopefully we get a bit more info | 19:17 |
clarkb | In particular I think that will give us the exact grub commands used so that we can see if it is targetting the right device | 19:19 |
atmark | here's with -x https://clbin.com/3vdEP | 19:20 |
clarkb | ok that shows it using /dev/loop0 and mkfs makes an ext4 device on /dev/mapper/loop0p1 which lines up. Is it possible that the host system's mkfs is creating an ext4 that the chroot doesn't understand? I would try that bash trick and see if it looks off | 19:25 |
clarkb | oh though grub is also going to install content to the mbr? I don't remember how bios grub works | 19:26 |
clarkb | but possibly the partition formatting style matters here too | 19:26 |
clarkb | looks like MBR according to the log though which is what I would expect | 19:28 |
clarkb | googling around it does sound like ext4 options can do this though | 19:28 |
clarkb | so maybe grub doesn't like the ext4 filesystem that was created by the host system | 19:29 |
atmark | you are indeed correct, my hostsytem is ext4 | 19:30 |
atmark | host system* | 19:30 |
clarkb | more specifically if your host system's mkfs.ext4 tool is creating an ext4 filesystem that is too new for the focal/bionic grub version to install it | 19:30 |
clarkb | *to install into | 19:30 |
clarkb | we currently use debian bullseye mkfs | 19:31 |
clarkb | but that may explain it | 19:31 |
clarkb | atmark: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1844012 | 19:43 |
clarkb | atmark: maybe you can do the bash breakpoint trick and then check if the ext4 fs that is created has that feature enabled. If so I think that would explain it and you can modify mkfs settings to avoid that feature | 19:43 |
clarkb | and maybe dib can be updated to avoid that feature somehow | 19:43 |
atmark | clarkb: which line should I append `bash` https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/elements/bootloader/finalise.d/50-bootloader ? | 20:07 |
atmark | I'm guessing between 251 and 252 | 20:11 |
clarkb | atmark: i woudl do it before 240 | 20:38 |
clarkb | really the main think you need to do is check if the ext4 featuer in the bug above is enabled and then you can tune2fs disable it and then proceed with the build from there | 20:39 |
atmark | Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum | 20:48 |
atmark | is metadata_csum same with metadata_csum_seed ? | 20:48 |
atmark | both are different https://man7.org/linux/man-pages/man8/tune2fs.8.html | 20:49 |
clarkb | ya they are separate. metadata_csum is default since 2012 apparently so should be fine | 20:49 |
clarkb | atmark: grub-install has a --verbose flag might try adding that to see if unknown filesystem gets extra info? | 20:51 |
atmark | I'm going to workaround it for now by building the image inside a VM. I'll play with verbose option and let you know if provides more info. | 20:56 |
atmark | Thanks for the help | 20:56 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!