[Pkg-libvirt-maintainers] Bug#895898: Bug#895898: virt-install adds "method=" boot parameter, which is copied to Grub config

Guido Günther agx at sigxcpu.org
Wed Apr 18 07:45:30 BST 2018


Hi,
On Tue, Apr 17, 2018 at 01:55:33PM +0200, Raphaël Halimi wrote:
> Package: virtinst
> Version: 1:1.4.0-5
> Severity: minor
> 
> Hi,
> 
> I'm trying to fully automatically install virtual machines by means of a
> preseed file. I set "--location" to the desired URL and add some
> parameters to "--extra-args" to ask debian-installer to run an automated
> installation, tell it where to fetch the preseed file, and add some
> parameters that I want copied to the installed system's boot
> configuration (for example "elevator=noop").
> 
> This works almost perfectly, but there one slight problem: for a reason
> I don't understand, virt-install adds "method=<contents of --location
> option>" to the kernel parameters (qemu's "-append" option), *after* the
> contents of "--extra-args".
> 
> As stated in its documentation, debian-installer will copy most kernel
> parameters found after "--" or "---" to the installed system's boot
> configuration (eg. in /etc/default/grub), filtering the ones it thinks
> are destined to itself; so if the "--extra-args" option contains "--" or
> "---", the "method=..." argument ends up being copied in
> /etc/default/grub, which of course is not desired. Obviously,
> debian-installer filter doesn't catch it.
> 
> Now, I'm not sure what would be the correct fix for this. I see two
> possibilities:
> 
> - the conservative (and simple) one: modify virt-install to add
> "method=..." *before* the contents of "--extra-args", so that if the
> latter contains "--" or "---", "method=..." will be positioned before
> those, and won't be copied to the installed system's boot configuration.
> 
> - the risky one: modify virt-install to not add "method=..." at all;
> after re-reading debian-installer's documentation, I didn't see this
> parameter mentioned anywhere. Come to think of it, this shouldn't be
> needed: virt-install already fetches the kernel and initrd, and passes
> them to the VM, so I can't see why debian-installer should need to know
> how they were fetched.
> 
> If the second suggestion is totally wrong, and debian-installer does
> know (and thus, sometimes need) "method=..." (it should be documented,
> then !), maybe the bug should be reassigned to debian-installer, and ask
> to add "method=..." to the list of filtered parameters, to prevent it to
> be passed to Grub.
> 
> I tried to find by myself where the "-append" option is constructed, to
> provide a patch for the first fix, but I don't know much python and
> couldn't understand the scripts. If you give me a hint about this, I'll
> be glad to (try to) help.
> 

Check _kernelFetchHelper where it adds the method arg. I doubt this is
needed at all on Debian but rather a leftover of other distros.
 -- Guido

> Regards,
> 
> -- 
> Raphaël Halimi
> 




> _______________________________________________
> Pkg-libvirt-maintainers mailing list
> Pkg-libvirt-maintainers at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-libvirt-maintainers



More information about the Pkg-libvirt-maintainers mailing list