Bug 123323 - fdisk gets confused
Summary: fdisk gets confused
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 2
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-17 04:30 UTC by Nuno Tavares
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-08-31 23:03:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nuno Tavares 2004-05-17 04:30:03 UTC
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 
before.



Version-Release number of selected component (if applicable):
util-linux-2.11y-29

How reproducible:
Always

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)
p
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 
behaviour.


Additional info:

Comment 1 Elliot Lee 2004-05-26 22:47:31 UTC
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 23:54:15 UTC
It is still present in FC2, same procedure. I've updated the record to
reflect this.

Comment 3 Elliot Lee 2004-05-27 17:07:36 UTC
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.