[Kernel-packages] [Bug 1918427] Re: curtin: install flash-kernel in arm64 UEFI unexpected

2021-03-18 Thread Date Huang
HI Dann Thanks for your rapid reply! > I'm happy to regression test a candidate patch on the xgene/u-boot > and non-xgene/uefi platforms we have once Ryan or some other curtin > maintainer is OK with the approach. Sure thanks. > I think the kernel recommending flash-kernel if GRUB is already >

[Kernel-packages] [Bug 1918427] Re: curtin: install flash-kernel in arm64 UEFI unexpected

2021-03-17 Thread Date Huang
> In my POC patch, it is because we need to divert flash-kernel before > it is installed, *just in case* it gets installed as a dependency of > some other package (in our case it happened due to a kernel Recommends > relationship). We therefore can't use `which` to look up the path... > unless we c

[Kernel-packages] [Bug 1918427] Re: curtin: install flash-kernel in arm64 UEFI unexpected

2021-03-16 Thread Date Huang
attach patch (WIP) ** Patch removed: "0001-curthook-disable-arch-sepcific-package-in-disable_up.patch" https://bugs.launchpad.net/ubuntu/+source/curtin/+bug/1918427/+attachment/5477385/+files/0001-curthook-disable-arch-sepcific-package-in-disable_up.patch ** Patch added: "0001-curthook-disa

[Kernel-packages] [Bug 1918427] Re: curtin: install flash-kernel in arm64 UEFI unexpected

2021-03-16 Thread Date Huang
maybe we can try this patch with alternative path to disable arch- specific binaries before that package is installed. when `which` didn't get any path for system, we assume that binary isn't installed for now. and still disable it via alternative path ** Patch added: "0001-curthook-disable-arc

[Kernel-packages] [Bug 1918427] Re: curtin: install flash-kernel in arm64 UEFI unexpected

2021-03-16 Thread Date Huang
Hi Ryan > (though I don't know if dpkg-divert cares about the presence of the binary-to-be-diverted). I tried dpkg-divert with my mustang and flash-kernel (see in attachment) It's ok for dpkg-divert even that package isn't installed. ** Attachment added: "dpkg-divert.log" https://bugs.launch

[Kernel-packages] [Bug 1918427] Re: curtin: install flash-kernel in arm64 UEFI unexpected

2021-03-16 Thread Date Huang
agree with dannf we should refactor disable_update_initramfs and enable_update_initramfs. we should not use `which` to determine the executable path. and always disable update_initramfs or arch-specific package, even those pkgs are not installed. Is it a good solution that we specific absolute pa

[Kernel-packages] [Bug 1918427] Re: curtin: install flash-kernel in arm64 UEFI unexpected

2021-03-16 Thread Date Huang
Maybe this WIP patch will work fine and we don't need to refactor disable_update_initramfs. this patch also consider if there is already initramfs or flash-kernel installed. Try to guarantee order But this might override and deactivate bugfix for LP:1640519 ** Patch added: "install_bootloader_

[Kernel-packages] [Bug 1918427] Re: curtin: install flash-kernel in arm64 UEFI unexpected

2021-03-16 Thread Date Huang
There is no need to install flash-kernel here. It will install flash-kernel in "ephemeral image" which didn't have kernel installed. https://git.launchpad.net/curtin/tree/curtin/deps/__init__.py?h=21.2#n57 So that means, curtin will never install flash-kernel into real system because flash-kerne

[Kernel-packages] [Bug 1918427] Re: curtin: install flash-kernel in arm64 UEFI unexpected

2021-03-12 Thread Date Huang
After reading log in #14, and some code from cloud-init and maas I still cannot find any code that will let cloud-init try to install flash-kernel wtih zfsutils-linux. and it seems the error because squashfs didn't have any kernel installed. So `linux-version` cannot find any kernel version to pas