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

grub-installer and mini.iso: wrong default boot device



grub-installer fails to get the right default boot device when I install from mini.iso.
Are the checks at grub-installer lines 613:615 correct?
http://anonscm.debian.org/cgit/d-i/grub-installer.git/tree/grub-installer#n613

When I install from mini.iso [1] /dev/sda is my USB stick and /dev/sdb is the installation target and only other disk (the internal hard disk).
After line 587 $default_bootdev is "/dev/sda"
After line 601 $cdsrc, $cdfs and $hdsrc are all ""
$ARCH is "amd64/generic" and $grub_package is "grub-pc" (line 607)
partmap /dev/sda is falsy (line 614)
but chroot /target grub-probe -t fs -d /dev/sda is truthy (line 615)

If grub-probe were falsy it would evaluate lines 618:622:
$(findfs /boot) is "/dev/sdb1" (line 618)
and $(device_to_disk "$bootfs") is "/dev/sdb" (line 620)
which is the *right* default boot device.

But since they aren't evaluated, the default boot device remains /dev/sda which is my USB stick (not right).

What are lines 613:615 meant to check? From the comment (line 592) I guess they're meant to check if $default_bootdev seems to be a USB stick. In my case it is a USB stick, but grub-probe (line 615) is truthy (it prints "iso9660") so the check fails.
Is all this as intended?

[1] http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/mini.iso


Reply to: