You are not logged in.

#1 2012-05-22 21:03:05

gogi-goji
Member
From: Canada
Registered: 2009-10-20
Posts: 73
Website

[SOLVED] Partition ends after end-of-disk

When setting up my netbook for a new Arch Linux install, I decided to move my Windows partition from the middle of the hard drive to the end of it to make more room for my extended partition.  I tried to do this with GParted using a Ubuntu live USB.  Something seems to have gone wrong somewhere. 

$ cfdisk /dev/sda

FATAL ERROR: Bad logical partition 5: Partition ends after end-of-disk
Press any key to exit cfdisk

GParted also throws up errors with that disk.

$ fdisk -l /dev/sda

Warning:ignoring extra data in partition table 5
Warning:ignoring extra data in partition table 5
Warning:ignoring extra data in partition table 5
Warning:ignoring extra data in partition table 5 will be corrected by w(rite)

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0xc12b5115

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      192779       96358+  83  Linux
/dev/sda2   *   283615232   312581807    14483288    7  HPFS/NTFS/exFAT
/dev/sda3          192780   246673415   123240318    5  Extended
/dev/sda5   ?  2768785300  4042664182   636939441+  69  Unknown

Partition table entries are not in disk order

The partition isn't mission critical (there's no data I need on it), but it would save me a lot of time if I can save the partition instead of having to recreate a Windows install.  Any ideas as to what I can do?

Last edited by gogi-goji (2012-05-25 01:02:09)


My (sporadically updated) blog
My miscellaneous dotfiles

Offline

#2 2012-05-23 07:58:32

TryA
Member
Registered: 2010-01-01
Posts: 23

Re: [SOLVED] Partition ends after end-of-disk

sda2 (which is your Windows partition) seems in the disk boundaries, but sda5 seems like complete junk, which is probably because your extended partition is screwed up. Try to remove sda3, look if there are still errors, then make a new extended partition in free space.

Offline

#3 2012-05-25 01:01:07

gogi-goji
Member
From: Canada
Registered: 2009-10-20
Posts: 73
Website

Re: [SOLVED] Partition ends after end-of-disk

You're totally right.  I thought that the partitions physically existed on the disk in the order that they were labeled numerically, but this isn't the case.  I realized that they were actually sitting in a different order after seeing your comment and trying

$ parted -l 

Error: Invalid partition table on /dev/sda -- wrong signature 3f93.

Ignore/Cancel? i
Model: ATA SAMSUNG HM160HI (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      32.3kB  98.7MB  98.7MB  primary                boot
 3      98.7MB  126GB   126GB   extended
 2      145GB   160GB   14.8GB  primary   ntfs         boot 

Of course, after I saw this, I took a closer look at the numbers in the fdisk -l output, and realized how funky things were.

You were right, everything was solved by deleting /dev/sda3.  Thank you so much for your help, TryA!


If it helps anybody in the future with this problem, I did this with fdisk.

# fdisk /dev/sda

Command: d
Partition number (1-4): 3

Command: w 

It took me an embarrassingly long time to figure out that I needed to write the change after selecting which partition to delete.  =P


My (sporadically updated) blog
My miscellaneous dotfiles

Offline

Board footer

Powered by FluxBB