the-linux-schools-project / karoshi-client

Central repository for Karoshi Client development
http://linuxschools.org.uk
5 stars 6 forks source link

grub-install failures in two-disk machines #86

Closed Eldara98 closed 9 years ago

Eldara98 commented 9 years ago

Having attempted to install a machine with two disks today, a known bug of GRUB seems to be causing quite major issues, as the grub-install command fails on every installation, even after attempting to manually install, and through the provided window. This is fixed by removing the drive you don't want to install to and then running the installation again, but this is not convenient!

RobinMcCorkell commented 9 years ago

Unable to reproduce. I installed 4.2 in a VM with two hard disks, and the installation completed successfully without any errors, and the resulting system boots up fine. Is there any more information you can provide?

Eldara98 commented 9 years ago

On the machine in question, the disk to be installed to was /dev/sdb, and grub-install was defaulting to /dev/sda. Unfortunately, there was no way to switch the disks around, as /dev/sda was an IDE drive.

RobinMcCorkell commented 9 years ago

OK, I just reproduced the error in a virtual machine. As suspected, the installer tries to install to /dev/sda no matter which drive is selected to install to. If that drive has a MSDOS partition table and has at least one partition, this will succeed and installation will complete (even though GRUB is installed to the wrong drive), but if /dev/sda has no partitions, or if the partition table is GPT (as is used to create the VirtualBox partition!).

In summary, the root cause is the broken invocation of grub-install with the wrong drive parameter. Focus should be on fixing that.

RobinMcCorkell commented 9 years ago

Bug fixed with a patched Ubiquity version on my PPA: 2.18.8.3xenopathic2~trusty1. It came down to silly default device logic that ignored what was passed to it. Point release 4.2.1 will fix this issue.