RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1344720 - when fdisk detects gpt table, expected menu items seem to be missing in the 'm' output
Summary: when fdisk detects gpt table, expected menu items seem to be missing in the '...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: util-linux
Version: 7.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: Radka Brychtova
URL:
Whiteboard:
Depends On:
Blocks: 1380361 1385242
TreeView+ depends on / blocked
 
Reported: 2016-06-10 14:07 UTC by Dwight (Bud) Brown
Modified: 2020-09-10 09:38 UTC (History)
4 users (show)

Fixed In Version: util-linux-2.23.2-38.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:41:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2186 0 normal SHIPPED_LIVE util-linux bug fix and enhancement update 2017-08-01 18:41:36 UTC

Description Dwight (Bud) Brown 2016-06-10 14:07:15 UTC
Description of problem:
'p', 'x', and other commands aren't listed in menu when gpt partition table is detected. Going into expert mode lists a few things that can be done, but no 'r'eturn menu option.

Can't do things like (well, can if you know the 'v' option exists although its not listed as available):

Command (m for help): v
Disk does not contain a valid backup header.
Detected 1 error(s).


# fdisk -uc /dev/sde
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): m
Command action
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   w   write table to disk and exit

Command (m for help): x
Expert command (m for help): m
Command action
   d   print the raw data in the partition table
   g   create an IRIX (SGI) partition table
   m   print this menu
   q   quit without saving changes


Version-Release number of selected component (if applicable):
2.32.2-26

How reproducible:
100%

Steps to Reproduce:
1. parted /dev/sdX mklabel gpt
2. fdisk -uc /dev/sdX
3. m

Main menu:
Actual results:
Command action
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   w   write table to disk and exit


Expected results:
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table                <<< missing from above
   q   quit without saving changes
   s   create a new empty Sun disklabel
   v   verify the partition table               <<< missing from above
   w   write table to disk and exit
   x   extra functionality (experts only)       <<< missing from above


Expert menu:
Actual results:
Expert command (m for help): m
Command (m for help): x
   d   print the raw data in the partition table
   g   create an IRIX (SGI) partition table
   m   print this menu
   q   quit without saving changes


Expected results:
Expert command (m for help): m
Command action
   d   print the raw data in the partition table
   f   fix partition order                         <<< missing [A]
   g   create an IRIX (SGI) partition table
   m   print this menu
   p   print the partition table                   <<< missing
   q   quit without saving changes                 
   r   return to main menu                         <<< missing
   v   verify the partition table                  <<< missing
   w   write table to disk and exit                <<< missing



[A] to change this:
   8       65  805306356 sde1
   8       66 1610579948 sde2

Partition Table: gpt
Disk Flags: 


Number  Start   End     Size    File system  Name     Flags
 2      33.6MB  1649GB  1649GB               primary
 1      2474GB  3299GB  825GB                primary


to this:
   8       66 1610579948 sde1
   8       65  805306356 sde2

Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      33.6MB  1649GB  1649GB               primary
 2      2474GB  3299GB  825GB                primary


Additional info:
Also, "create an IRIX (SDI) partition type is listed under two different option letters.

Main menu:
Command (m for help): m
Command action
:
   G   create an IRIX (SGI) partition table

Expert menu:
Command (m for help): x

Expert command (m for help): m
Command action
:
   g   create an IRIX (SGI) partition table

At bit confusing. I know other options overload the menu characters ('d'; main=delete, expert=dump), but in this case it appears to be the same functionality just a different letter which seems confusing. Make the GPT option 'G' and leave the 'g' to mean IRIX? The code appears to leave g in expert menu for backward compatibility as in previous versions it was only available in expert mode and as 'g' option?

Comment 2 Karel Zak 2016-06-10 16:53:57 UTC
Well, this all is already fixed in Fedora/upstream tree. Don't waste time with RHEL version if you want to move things forward ;-)

The difference between current upstream and RHEL is huge -- it makes sense to fix critical bugs, but nothing else. For serial serious work with GPT on RHEL7 use parted.


The missing 'r' seems like bug, anyway the current upstream:

 Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table

and expert mode does not contain "Create a new label" items at all, but it isn't backwardly compatible (old versions use 'G' in expert mode).

Look forward to see fdisk for RHEL8 :-)

Comment 11 Radka Brychtova 2017-04-18 10:12:11 UTC
The description in fdisk menu was repaired, also some functionality changes were applied.
 => Verified

Old package:
util-linux-2.23.2-33.el7
--------------
:: [   LOG    ] :: Missing options from manual
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.dxURoHTT' should contain 'p   print the partition table' 
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.dxURoHTT' should contain 'v   verify the partition table' 
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.dxURoHTT' should contain 'x   extra functionality (experts only)' 
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.dxURoHTT' should contain 't   change a partition's system id' 
---------------
:: [   LOG    ] :: Missing options from extra manual
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.Kye9Nuf1' should contain 'p   print the partition table' 
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.Kye9Nuf1' should contain 'r   return to main menu' 
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.Kye9Nuf1' should contain 'v   verify the partition table' 
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.Kye9Nuf1' should contain 'w   write table to disk and exit' 
:: [   LOG    ] :: Changed description
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.Kye9Nuf1' should contain 'd   print the raw data in the first sector' 
---------------
:: [   LOG    ] :: Changed functionality
:: [   PASS   ] :: Test u options - shouldn't be cylinders (Expected 0, got 0)
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.FlThp1LY' should not contain 'Changing display/entry units to' 
:: [   FAIL   ] :: File '/var/tmp/rlRun_LOG.FlThp1LY' should contain 'Use cylinders for GPT is unsupported' 




New package:
util-linux-2.23.2-39.el7
:: [   PASS   ] :: Create GPT on the device (Expected 0, got 0)
:: [   PASS   ] :: See fdisk menu (Expected 0, got 0)
:: [   LOG    ] :: Missing options from manual
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.EZu7RWZA' should contain 'p   print the partition table' 
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.EZu7RWZA' should contain 'v   verify the partition table' 
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.EZu7RWZA' should contain 'x   extra functionality (experts only)' 
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.EZu7RWZA' should contain 't   change a partition's system id' 
:: [   PASS   ] :: See fdisk extra menu (Expected 0, got 0)
---------------
:: [   LOG    ] :: Missing options from extra manual
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.oBomDx5C' should contain 'p   print the partition table' 
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.oBomDx5C' should contain 'r   return to main menu' 
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.oBomDx5C' should contain 'v   verify the partition table' 
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.oBomDx5C' should contain 'w   write table to disk and exit'
--------------- 
:: [   LOG    ] :: Changed description
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.oBomDx5C' should contain 'd   print the raw data in the first sector' 
---------------
:: [   LOG    ] :: Changed functionality
:: [   PASS   ] :: Test u options - shouldn't be cylinders (Expected 0, got 0)
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.t62f9g44' should not contain 'Changing display/entry units to' 
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.t62f9g44' should contain 'Use cylinders for GPT is unsupported'

Comment 12 errata-xmlrpc 2017-08-01 21:41:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2186


Note You need to log in before you can comment on or make changes to this bug.