How to fix FATAL ERROR: Bad primary partition 1: Partition ends in the final partial cylinder

This came up with the Lexar Jumpdrive that I was attempting to re-partition. According to sources round the net, the partition tables might have been overlapping.

Here is the error in its full context (if you didn’t catch the title):
FATAL ERROR: Bad primary partition 1: Partition ends in the final partial cylinder

The solution is to first blow away all the partitions, write, (reboot is advised if you’re asked to reboot to see changes to the table), then create your new partitions over it.

Update: Just to add some more detail to this process.. This was done entirely in Linux. Since cfdisk (curses fdisk program) bombs out without allowing you to edit your partitions, you’ll need to edit the usb drive’s partitions by using ol’ fdisk.

Its not that bad once you get used to it. Start it as you would with cfdisk (`fdisk /dev/usb_drive`), hit the help menu, get a printout of all the partitions, delete the partitions (using the help menu again), and then write the partition table to the usb drive.

Reboot if it asks. You should be able to re-partition normally after this.

Advertisements

10 responses to “How to fix FATAL ERROR: Bad primary partition 1: Partition ends in the final partial cylinder

  1. hey pal , thanks really .
    i was searching for this .

    but my problem is different .

    Its in my harddisk .
    actually im having a 40gb ide hdd .
    i use cfdisk to install slackware , and when i took out cfdisk , it showed an empty 4mb partition in my primary partition , where my windows c drv is avail .
    if i make the 4mb into a fat partition , then i get this bad partition error .

    though i can install slackware , i couldnt get lilo or grub to work .
    so , cant boot into slackware .

    lilo returns some #1 error .

  2. gregf

    Just hit this problem on a usb drive that had been formated as hfs, when i needed to go back to ext3 i had the problem. Thanks for the solution.

  3. Thanks a lot mate, I ran into this today when trying to create a removable drive bootable for my Asus Eee PC. Cheers!

  4. HMP

    I’m working on my asus eee as well, and this definitely helped. trying to put zeee on it!

  5. Grumbel

    You can do the partition killing with cfdisk too, just add -z argument:

    % cfdisk -z /dev/…

  6. Hi, just use gparted. It works better than cfdisk. If you need a boot disk/USB with it, just use the Systemrescuecd (Google it, it’s free).

  7. Excuse my response, maybe I am incorrect, however this solution is not a solution if you did not back up all data to begin with. Also if cfdisk did not run because of this you could have easily launchedc fdisk ‘device’ and it would have read the partitions. Also, as stated by one of the replies gparted would have most likely work if a gui interface was needed. Also I believe on modern disks it is perfectly ok to end in one partition and start on another – if my ‘readings’ (articles I have read).

  8. Yes, it is perfectly OK to have partitions in this form, but this post applies to people who encountered a fatal error in their (in my case, cfdisk) partitioner while attempting to re-partition their drive.

    There are several other alternatives, like plain `parted`, but if you look again, plain ‘fdisk’ was explained at the top in an addendum, which is not all that much different from the curses-based cfdisk. It is also easy to find, due to it being a part of many installation packages.

    With gparted, you will find that some people do not, or cannot install gparted. It is fairly heavyweight, and there are many scenarios where it is not a viable alternative (serial connection, KVM, bad/slow ILO connections, etc).

    In any case, all of this is generally ‘overkill’, as someone above usefully commented that the -z flag could be passed to cfdisk to accomplish the zeroing out of partitions.

  9. Zubair

    I can’t under stand that you have provide solution. actually i am using windows 8 and try to make dual boot of android…i have 500 gb sata hard drive.. of Toshiba company.. i am try to make dual of android and windows 8.. but i am facing this error… when i hit the option of (create/modify partions) … before this ihave 60 gb hard of an other company.. there was successfully instal.. if any one under stand my problem.. then please provide me solution…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: