ubiquity targets invalid device name with nvme disks, fails to install grub

Bug #1600308 reported by David Jordan on 2016-07-08
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Medium
Mathieu Trudel-Lapierre
Trusty
Medium
Mathieu Trudel-Lapierre
Xenial
Medium
Unassigned

Bug Description

[Impact]
Users with NVMe disks.

[Test case]
- Install system with NVMe disks; expect to pick the boot device.
Install should complete succesfully.

[Regression Potential]
This only adds matching for NVMe devices; any such devices will now be matched based on the partition numbers rather than risking to match a character device for NVMe formatting. This does not match regular block devices and partitions.

---

On Ubuntu 16.04, when installing Ubuntu to an nvme drive, Ubiquity fails to install grub. In ubiquity/misc.py the function default_grub targets /dev/nvme0 instead of /dev/nvme0n1, which is the real name of the device.

For single drive scenarios, this can be fixed by filtering out nvme devices from the regex line:
old:
target = re.sub(r'(/dev/(cciss|ida)/c[0-9]d[0-9]|/dev/[a-z]+).*',
                            r'\1', target)
fixed:
target = re.sub(r'(/dev/(cciss|ida)/c[0-9]d[0-9]|/dev/(?!nvme)[a-z]+).*',
                            r'\1', target)

David Jordan (dmj726) on 2016-07-08
summary: - ubiquity targets wrong drive, fails to install grub with nvme disks
+ ubiquity targets invalid device name with nvme disks, fails to install
+ grub
description: updated
Changed in ubiquity (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 16.10.5

---------------
ubiquity (16.10.5) yakkety; urgency=medium

  [ Kai-Heng Feng ]
  * ubiquity-dm: Wait until u-s-d xsettings plugin is activated. (LP: #1560162)

  [ David Jordan ]
  * ubiquity/misc.py: set correct target device name for nvme drives.
    (LP: #1600308)

  [ Mathieu Trudel-Lapierre ]
  * ubi-prepare.py: default to Secure Boot disabled if we install third-party
    drivers.

 -- Mathieu Trudel-Lapierre <email address hidden> Mon, 25 Jul 2016 15:37:04 -0400

Changed in ubiquity (Ubuntu):
status: In Progress → Fix Released
David Jordan (dmj726) wrote :

I just tested the new code, and your updated regex still breaks the installation in exactly the same way as before.
The portion of the regex that reads '/dev/[a-z]+' truncates the target to '/dev/nvme' before it gets to the bit you added. You should be able to use the following:

            target = re.sub(r'(/dev/(cciss|ida)/c[0-9]d[0-9]|/dev/nvme[0-9]+n[0-9]+\
                            |/dev/[a-z]+).*', r'\1', target)

Changed in ubiquity (Ubuntu):
status: Fix Released → Confirmed
Changed in ubiquity (Ubuntu):
status: Confirmed → Fix Released
Changed in ubiquity (Ubuntu Trusty):
importance: Undecided → Medium
Changed in ubiquity (Ubuntu Xenial):
importance: Undecided → Medium
Changed in ubiquity (Ubuntu Trusty):
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Changed in ubiquity (Ubuntu Xenial):
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
Changed in ubiquity (Ubuntu Trusty):
status: New → In Progress
Changed in ubiquity (Ubuntu Xenial):
status: New → In Progress
description: updated
description: updated

Hello David, or anyone else affected,

Accepted ubiquity into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubiquity/2.18.8.13 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubiquity (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.18.8.13

---------------
ubiquity (2.18.8.13) trusty; urgency=medium

  * ubiquity/misc.py: fix regex to match against nvme disks. (LP: #1600308)
  * Automatic update of included source packages: grub-installer
    1.78ubuntu20.4.

 -- Mathieu Trudel-Lapierre <email address hidden> Mon, 01 Aug 2016 14:58:28 -0400

Changed in ubiquity (Ubuntu Trusty):
status: Fix Committed → Fix Released
Changed in ubiquity (Ubuntu Xenial):
assignee: Mathieu Trudel-Lapierre (cyphermox) → nobody
status: In Progress → Triaged

Setting back to Triaged; I'm not currently working on this. The benefits are limited at this time too: AFAIK there won't be new point-releases for Xenial.

Furthermore, NVMe installs work quite well in later releases; I've done many in the past few weeks. I don't recall if I've tested Xenial recently though.

tags: added: rls-x-notfixing
removed: verification-needed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers