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.

Regards,

-- 
Raphaël Halimi

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to