Here is fdisk printout of my second disk and the cfdisk printout of the same.
[root@BigBee barry]# fdisk -l /dev/sdb
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 63 976773167 488386552+ 83 Linux
/dev/sdb2 * 0 0 0 0 Empty
/dev/sdb3 * 0 0 0 0 Empty
/dev/sdb4 * 0 0 0 0 Empty
[root@BigBee barry]# cfdisk -P s /dev/sdb
FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylinder
1. first, there is no * shown for sdb1 (I think this indicates if partition is bootable)
2. second, sdb2, sdb3 and sdb4 have not been configured or formatted. Why are they listed? The
disk has only one large partition and is being used for data only.
3. When running cfdisk -P s /dev/sdb I get the FATAL ERROR below:
FATAL ERROR: Bad primary partition 2: Partition ends in the final partial cylinder
Current fdisk program is v 2.1.8
What's the problem? And, ahem, what's the solution?
O-P, you knew I'd be back.
I don't know what application did the partitioning, but it obviously screwed up. Not having a boot flag is not a problem for Linux, and having a boot flag may be the cause of the problem with the nonexistent /dev/sdb2 - /dev/sdb4.
Something to try, and use caution with this, use fdisk /dev/sdb
to open the drive for editing the partition table. From the menu, a toggle a bootable flag
, use the a command
on each of the partitions, /dev/sdb2 - /dev/sdb4
then use the p command
to get a printout of the partition table, as it then appears. The ghost partitions may, or may not, be deleted by this action.
The biggest problem with using the current fdisk
version is that it cannot
build a partition table starting at sector 63
. Since the rewrite to enable partitioning drives larger than 2 TB
, and the use of 4096 byte
physical sectors, the default starting point for the first partition of any drive is sector 2048
If you have an older PCLinuxOS liveCD with the older version of fdisk, (prior to the rewrite) you could use that with the o command
, to create a new partition table, then use the n command
to create just one partition starting at sector 63
and ending at sector 976773167
. The w command
would then write the corrected partition table to the hard drive MBR
, without disturbing the data contained in the existing filesystem.
If you don't have an older version of fdisk, you would definitely need to back up any data on the drive before repartitioning with the current fdisk version, and formatting the new partition.
You could, with the new fdisk, try the d command
to delete partitions 2 - 4
, then use the p command
to see what you would get if
you used the w command
. If it shows the one single partition you want, without any sign of the current ghost partitions, then enter the w command
. If it shows anything undesirable, use the q command
to quit fdisk without making any changes.