Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i have got a new hp g6 laptop and when trying to install ubuntu , i face this problem

Gparted sees the whole hard drive as unallocated disk space and the output of fdisk -lu is

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xc13cbdc4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      409599      203776    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2          409600   159584255    79587328    7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3      1208201216  1241939967    16869376    7  HPFS/NTFS
/dev/sda4       159584256  1250260991   545338368    f  W95 Ext'd (LBA)
Partition 4 does not end on cylinder boundary.
/dev/sda5       159586304   683874303   262144000    7  HPFS/NTFS
/dev/sda6       683876352  1208201215   262162432    7  HPFS/NTFS
/dev/sda7      1241942016  1250260991     4159488    b  W95 FAT32

Partition table entries are not in disk order

so is there an easy way to fix the overlapping partitions problem ?

only the disk utility can view the partition layout enter image description here

i also tried the following command

sudo sfdisk -uS -l /dev/sda

and it gives the following

Disk /dev/sda: 77825 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sda1   *      2048    409599     407552   7  HPFS/NTFS
/dev/sda2        409600 159584255  159174656   7  HPFS/NTFS
        end: (c,h,s) expected (1023,254,63) found (717,232,27)
/dev/sda3     1208201216 1241939967   33738752   7  HPFS/NTFS
/dev/sda4     159584256 1250260991 1090676736   f  W95 Ext'd (LBA)
        start: (c,h,s) expected (1023,254,63) found (717,232,28)
        end: (c,h,s) expected (1023,254,63) found (1,37,36)
/dev/sda5     159586304 683874303  524288000   7  HPFS/NTFS
        start: (c,h,s) expected (1023,254,63) found (717,200,60)
        end: (c,h,s) expected (1023,254,63) found (585,116,43)
/dev/sda6     683876352 1208201215  524324864   7  HPFS/NTFS
        start: (c,h,s) expected (1023,254,63) found (585,85,13)
        end: (c,h,s) expected (1023,254,63) found (455,76,5)
/dev/sda7     1241942016 1250260991    8318976   b  W95 FAT32
        start: (c,h,s) expected (1023,254,63) found (507,208,22)
        end: (c,h,s) expected (1023,254,63) found (1,37,36)

so how can i fix those boundaries ?

share|improve this question
    
Please note that the "Disk Utility" screenshot isn't showing the real partition layout. –  bseibold Nov 26 '11 at 1:34
add comment

1 Answer

In order to understand the problem here it is necessary to know how disk partitioning works. A classic DOS partition table can only contain four entries. To circumvent this restriction while staying compatible, one partition type was defined to be a so-called extended partition which can itself contain additional "logical partitions".

On your drive, there is a "hole" in the extended partition where no logical partition is defined. Instead a primary partition overlaps the extended partition and fills that hole exactly. So no data is really overlapping, and there is no immediate danger of data loss.

The easiest solution is to delete the offending partition (/dev/sda3) if you don't need it. Afterwards you can try to create a new logical partition at the same position. I recommend using fdisk for this as it doesn't try to format anything, so if you made a backup of your partition table you can simple restore it and try again.

WARNING

This is dangerous, and you should have a full backup of your drive before doing it.

share|improve this answer
    
if you could provide me with a tutorial about doing this , i will really be grateful.. –  Ahmed Kotb Nov 25 '11 at 21:02
    
To delete the partition, just press d in fdisk and select the right one, then write your changes to disk with w. However if you need a detailed step-by-step tutorial, that's a strong indicator that you're perhaps better off with making a backup and wiping the disk clean. –  bseibold Nov 26 '11 at 1:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.