growroot fails for images on SD cards

Bug #1236380 reported by Juerg Haefliger
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-initramfs-tools (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

The growroot script doesn't correctly determine the root device name if the device name itself ends with a digit and partitions are named <root device>p1, <root device>p2 aso. For example, when using an SD card:

$ ls -l /dev/mmcblk0*
brw-rw---- 1 root disk 179, 0 Oct 7 16:04 /dev/mmcblk0
brw-rw---- 1 root disk 179, 1 Oct 7 16:04 /dev/mmcblk0p1

See https://bugzilla.redhat.com/show_bug.cgi?id=1009172.

Scott Moser (smoser)
Changed in cloud-initramfs-tools (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Scott Moser (smoser) wrote :

Juerg,
  Can you verify if this fixes the problem?

tags: added: patch
Revision history for this message
Juerg Haefliger (juergh) wrote :

Scott,

Looks good but could be simplified to:

+if [ "${rootdisk%[0-9]p}" != "${rootdisk}" ] ; then
+ rootdisk=${rootdisk%p}
+fi

I don't think you need to adjust $partnum.

Also, can you apply the patch to growroot/dracut/modules.d/50growroot/growroot.sh as well?

Note that the following (old) merge request also contains a (verified) fix: https://code.launchpad.net/~juergh/cloud-initramfs-tools/dracut-growroot-fixes/+merge/196272

Scott Moser (smoser)
Changed in cloud-initramfs-tools (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Juerg Haefliger (juergh) wrote :

Can we have this patch applied to growroot/dracut/modules.d/50growroot/growroot.sh as well?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-initramfs-tools - 0.22ubuntu1

---------------
cloud-initramfs-tools (0.22ubuntu1) trusty; urgency=medium

  * correctly identify partition and block device for devices named
    like devnameXpN, such as mmcblk0p1 (LP: #1236380).
  * always include aesni_intel rather than doing it if there is
    cpu support (LP: #1267225).
 -- Scott Moser <email address hidden> Mon, 03 Feb 2014 22:09:00 +0200

Changed in cloud-initramfs-tools (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Juerg, or anyone else affected,

Accepted cloud-initramfs-tools into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-initramfs-tools/0.25ubuntu1.12.04.1 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!

tags: added: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Releasing 0.25ubuntu1.12.04.1, please do verify this issue, and if it still is happening please re-open the bug so it can be addressed in a subsequent upload.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-initramfs-tools - 0.25ubuntu1.12.04.1

---------------
cloud-initramfs-tools (0.25ubuntu1.12.04.1) precise-proposed; urgency=medium

  * no change backport of 0.25ubuntu1.14.04.1 from 14.04 to 12.04
    (LP: #1515661)
    + add new binary packages: overlayroot, cloud-initramfs-copymods,
      cloud-initramfs-dyn-netconf
    + growroot: correctly identify partition and block device for devices
      named like devnameXpN, such as mmcblk0p1 (LP: #1236380).
    + growroot: support newer versions of growpart which exit 1
      for 'NOCHANGE'.

 -- Scott Moser <email address hidden> Thu, 12 Nov 2015 13:02:02 -0500

Changed in cloud-initramfs-tools (Ubuntu Precise):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.