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:
Please try the util-linux in Fedora Core 2 and let me know if this bug is still present.
It is still present in FC2, same procedure. I've updated the record to reflect this.
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...