Bug 123323 - fdisk gets confused
fdisk gets confused
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-05-17 00:30 EDT by Nuno Tavares
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-31 19:03:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nuno Tavares 2004-05-17 00:30:03 EDT
Description of problem:
I accidentally found a bug in fdisk. Fdisk automatically selects the 
fourth (last) partition if we attempt to "a" the (unexistent) third 

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

How reproducible:

Steps to Reproduce:
# fdisk /dev/hdb


Command (m for help): p

Disk /dev/hdb: 10.2 GB, 10239860736 bytes
  Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1       123    987966   83  Linux
/dev/hdb2           124       246    987997+  83  Linux

Command (m for help): a
Partition number (1-4): 3
Warning: partition 3 has empty type

Command (m for help): n
Command action
  e   extended
  p   primary partition (1-4)
Selected partition 4
First cylinder (247-1244, default 247):

Actual Results:  It automatically selected partition 4, as if 
partition 3 existed. If I skip the "a" command, it will ask which 
partition I want for command "n" (from 3,4), which is the correct 

Additional info:
Comment 1 Elliot Lee 2004-05-26 18:47:31 EDT
Please try the util-linux in Fedora Core 2 and let me know if this bug
is still present.
Comment 2 Nuno Tavares 2004-05-26 19:54:15 EDT
It is still present in FC2, same procedure. I've updated the record to
reflect this.
Comment 3 Elliot Lee 2004-05-27 13:07:36 EDT
Doing 'a' on a non-existent partition creates that partition (that's
the real "bug" if any), and then when you go to do the 'n', it sees
that the only unused primary partition is #4 and automatically chooses
that. I've just confirmed this on a system here...

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