Grub2 fails to install to non-standard device path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub-installer (Ubuntu) |
Fix Released
|
High
|
Colin Watson | ||
Precise |
Fix Released
|
High
|
Colin Watson | ||
grub2 (Ubuntu) |
Fix Released
|
High
|
Colin Watson | ||
Precise |
Fix Released
|
High
|
Colin Watson |
Bug Description
SRU justification:
[Impact] Installation impossible on FusionIO disks; furthermore the method used to identify partitions in GRUB relies on an obsolete ioctl which doesn't properly handle large disks.
[Test Case] We have a remotely-accessible server on which we can do straight-through installation tests on the hardware in question.
[Regression Potential] The device handling changes are boring and straightforward. The work to avoid the obsolete ioctl should be regression-tested on some other hardware (it doesn't matter too much which) to make sure it still works there; although I've already done this on my laptop.
Original report follows:
Running the Ubuntu Server installer in UEFI mode fails to install the Grub bootloader. Attached is the syslog output that shows grub-installer failed with error code 1. I have seen this on Ubuntu 12.04, 12.10, and 13.04. I believe the problem is that Grub is looking for device paths that match something like '/dev/sdX' or '/dev/hdX' but the device I am installing to does not follow that convention.
The reason I believe it is looking for specific devices paths is if, during installation after my device has been partitioned, I escape into the shell (using alt+f2) and create a hard link from my device name and its partitions, to a device name that matches 'sdX', then Grub begins to install. For example, if my device name is /dev/fioa and has partitions /dev/fioa1, /dev/fioa2, and /dev/fioa3, I map those partitions to something like /dev/sdc, /dev/sdc1, /dev/sdc2, and /dev/sdc3 and continue with the installation onto /dev/sdc. By doing this, Grub will begin to install on the device.
Possibly useful background information:
- The operating system and all files install just fine without problem, it is the last step of installing the bootloader that fails.
- In order to have the device recognized during installation, I either need to run 'insmod' from a terminal or we have to manually modify initrd to include our .ko file because it is not a standard disk driver. Using either method does not affect the outcome of Grub2 failing to install.
- Even though grub begins to install after creating the hard links mentioned above, it does not finish successfully due to the linked paths (e.g. /dev/sdc) not being in the device map. That is a separate issue, but may be expected behavior and would likely need a separate ticket if it needed to be reported at all.
Related branches
Changed in grub-installer (Ubuntu): | |
status: | New → Triaged |
Changed in grub2 (Ubuntu): | |
status: | Incomplete → Triaged |
Changed in grub-installer (Ubuntu): | |
assignee: | nobody → Colin Watson (cjwatson) |
importance: | Undecided → High |
description: | updated |
Changed in grub2 (Ubuntu Precise): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Colin Watson (cjwatson) |
milestone: | none → ubuntu-12.04.4 |
Changed in grub-installer (Ubuntu Precise): | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Colin Watson (cjwatson) |
milestone: | none → ubuntu-12.04.4 |
I wrote e-mail to Colin Watson who maintains "grub-installer". Below are my message to Colin and his replay. He suggest to me to open a bug ticket but for unknown for me reasons I failed to do this. However I send to him a syslog file to Colin. He may already did some work.
"
> I am writing this e-mail because you are an owner of Ubuntu
> grub-installer.
> I work in FusionIO. Our company develops PCI SSDs. We tries to use
> Ubuntu 12.04 x64 server on our device. We want to install Ubuntu on
> FusionIO devices and boot. We have a problem during installing Ubuntu.
> The installer recognizes our disk as /dev/fioa device, which is non
> standard name but it works fine on non-boot disk, installs almost
> everything but failed in the end of installation. The error is
> following
> "main-menu[402]: WARNING **: Configuring 'grub-installer' failed with
> error code 1
> "main-menu[402]: WARNING **: menu item 'grub-installer' failed.
If you're happy for this to be public (which is best - it means there's an audit trail for any change), could you file a bug and attach the full installer syslog to it, and then give me a reference to the bug number?
Otherwise, I'll at least need the syslog.
> The installer creates a EFI system partition, but there is nothing in this partition. grub-installer file but there is not success yet.
> I believe the problem is in our name "/de/fioa" which grub-installer doesn't like.
> I analyzed the code and tried to add "/dev/fioa" in grub-installer/
It's quite possible that GRUB itself needs some adjustment. I'd be happy to have a look given a full log.
"