[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#982591: grub-pc can't be updated non-interactively on debian/buster64



Le 26/02/2021 à 22:54, Lucas Nussbaum a écrit :
> On 26/02/21 at 20:07 +0100, Lucas Nussbaum wrote:
>> On 14/02/21 at 08:48 +0100, Evgeni Golov wrote:
>>> On Sat, Feb 13, 2021 at 11:57:52PM +0100, Thomas Lange wrote:
>>>> IMO we cannot know which device name is used  by the users virtualisation environment.
>>>> So, what is the be setting without knowing the device name?
>>>>
>>>> Or is /dev/sda used in most enviroments?
>>>
>>> For VirtualBox sda is a pretty safe bet, for libvirt it'd be either sda
>>> or vda (and I think we could set both in debconf, as that's a
>>> multiselect). AWS has another one, vxda I think? But this explicit bug
>>> is about vagrant (so virtualbox and libvirt) only anyways.
>>>
>>> The only thing to consider with this approach: it should only be done
>>> when preparing images, not installing "real" systems. So in the
>>> cloud.d.o context that's safe, but probably not as a generic default in
>>> FAI and other tools.
>>
>> Maybe a better approach (but still hackish) would be to set it at first
>> boot, in a way similar to
>> https://salsa.debian.org/cloud-team/debian-vagrant-images/-/blob/master/config_space/files/etc/systemd/system/generate-sshd-host-keys.service/VAGRANT
>>
>> Running Something like:
>> echo grub-pc grub-pc/install_devices multiselect $(awk '{ if ($2 == "/") { sub(/1$/, "", $1) ; print $1 } }' /proc/mounts) | debconf-set-selections
> 
> Tentative patch:
> https://salsa.debian.org/cloud-team/debian-vagrant-images/-/commit/b82d522f65b507767f909b2b9471c5a9ade75e05

This approach is IMHO the easier way forward.

However I think the recommended approach of grub installation is to put
the core.img on the disk between the partition table and the first
partition, see
https://www.gnu.org/software/grub/manual/grub/html_node/BIOS-installation.html#BIOS-installation

and for this we should feed debconf with the disk device (/dev/vda or
/dev/sda) instead of a partition.
This is what the debian-installer and FAI do.

https://salsa.debian.org/cloud-team/debian-vagrant-images/-/blob/master/config_space/scripts/GRUB_PC/10-setup#L9


Reply to: