Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: [SOLVED] Partition Table problem

  1. #11
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: [SOLVED] Partition Table problem

    Yes, unfortunately it does look like your extended partition runs off the end of your HDD. But to correct it, please post the sfdisk command, but note that it uses "-d":
    Code:
    sudo sfdisk -d /dev/sda
    I would rather not have to do the math to create what sfdisk will give us with that above command, and we will need that to fix your partition table.
    Last edited by caljohnsmith; February 3rd, 2009 at 04:17 PM.

  2. #12
    Join Date
    Dec 2007
    Location
    Louvain-la-Neuve
    Beans
    175
    Distro
    Xubuntu 13.10 Saucy Salamander

    Re: [SOLVED] Partition Table problem

    Oups! it seems like i wasn't paying much attention, and i thought they were the same commands. Up to now i've used only the fdisk command for data concerning the partitions. The others are new to me, so i wouldn't know the difference. Sorry about that!

    here is the output i get

    sudo sfdisk -d /dev/sda:

    Code:
    unit: sectors
    
    /dev/sda1 : start=     2048, size= 24582144, Id= 7
    /dev/sda2 : start= 24595515, size=177759217, Id= 7, bootable
    /dev/sda3 : start=202354740, size=422798670, Id= f
    /dev/sda4 : start=        0, size=        0, Id= 0
    /dev/sda5 : start=202354866, size=249328672, Id=83
    /dev/sda6 : start=451683603, size= 63906504, Id=83
    /dev/sda7 : start=515590173, size=101096976, Id=83
    hm... i see where this is going... so i guess now we have to correct that table, and then use it as input back to the sfdisk command, like so

    % sfdisk /dev/hda < hda.out

    as stated at the sfdisk man page... but what is it that has to be corrected...? all these different units (the cylinders, the sectors, etc) seem to confuse me still

  3. #13
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: [SOLVED] Partition Table problem

    Code:
    unit: sectors
    
    /dev/sda1 : start=     2048, size= 24582144, Id= 7
    /dev/sda2 : start= 24595515, size=177759217, Id= 7, bootable
    /dev/sda3 : start=202354740, size=414332409, Id= f
    /dev/sda4 : start=        0, size=        0, Id= 0
    /dev/sda5 : start=202354866, size=249328672, Id=83
    /dev/sda6 : start=451683603, size= 63906504, Id=83
    /dev/sda7 : start=515590173, size=101096976, Id=83
    OK, the partition table above should correct your extended partition problem; I modified your partition table as shown above so that the extended partition will end at the end of sda7, and not end on a sector that is beyond the end of the HDD. How about downloading the attached "partition_table.txt" to your desktop and do:
    Code:
    sudo sfdisk --force /dev/sda < ~/Desktop/partition_table.txt
    And then I think you should be all set. It would be a good idea to reboot and then post the new output of "sudo fdisk -lu" so we can make sure everything went OK. Let me know how it goes.
    Attached Files Attached Files

  4. #14
    Join Date
    Dec 2007
    Location
    Louvain-la-Neuve
    Beans
    175
    Distro
    Xubuntu 13.10 Saucy Salamander

    Re: [SOLVED] Partition Table problem

    actually i took the liberty to alter this a little bit, so that the extended partition reaches to the end of the hard disk (i need the swap part...). To do this i used the number of the total sectors as shown at the result of the sudo fdisk -lu command (at the top)

    now, my partition table looks like this:
    Code:
    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x438c7787
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048    24584191    12291072    7  HPFS/NTFS
    /dev/sda2   *    24595515   202354731    88879608+   7  HPFS/NTFS
    /dev/sda3       202354740   625142447   211393854    f  W95 Ext'd (LBA)
    /dev/sda5       202354866   451683537   124664336   83  Linux
    /dev/sda6       451683603   515590106    31953252   83  Linux
    /dev/sda7       515590173   616687148    50548488   83  Linux
    and gparted shows everything as is should be. All i need to do now is to add the swap partition.

    Case closed!

    Thank you very very much once again my friend. I have to say that you are a member of the ubuntu community to look up to.

  5. #15
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: [SOLVED] Partition Table problem

    I'm really glad that worked, and also having the extended partition end at the end of the drive is certainly a good idea since you are planning on adding a swap partition. I learned that sfdisk trick of manually writing the partition table from forum member meierfra, so you can give him credit for that. Anyway, cheers and have fun with your OSes.

  6. #16
    Join Date
    Aug 2010
    Beans
    2

    Re: [SOLVED] Partition Table problem

    Hi I am trying to fix my windows vista partition. I dont know which partition should be primary, logical and which should be the bootable. I have only 2 NTFS partition one is C: which is approx 245 GB big and one is D: (Data) which is 217 GB big. One is PQService which is a hidden Acer Partition. and 27 GB are not allocated. Now which partition should I set Primary and bootable in testdisk.

    Here are my fdisk and sfdisk outputs before doing anything with testdisk:

    PHP Code:
    ubuntu@ubuntu:~$ sudo parted /dev/sda print
    ModelATA WDC WD5000AAJS-(scsi)
    Disk /dev/sda500GB
    Sector size 
    (logical/physical): 512B/512B
    Partition Table
    msdos

    Number  Start   End     Size    Type     File system  Flags
     1      32.3kB  10.5GB  10.5GB  primary  ntfs
     2      10.5GB  255GB   245GB   primary  ntfs         boot
     3      282GB   500GB   218GB   primary  ntfs

    ubuntu
    @ubuntu:~$ sudo sfdisk -l

    Disk 
    /dev/sda60801 cylinders255 heads63 sectors/track
    Units 
    cylinders of 8225280 bytesblocks of 1024 bytescounting from 0

       Device Boot Start     End   
    #cyls    #blocks   Id  System
    /dev/sda1          0+   1273    1274-  10233373+   7  HPFS/NTFS
    /dev/sda2   *   1274   31005   29732  238822290    7  HPFS/NTFS
    /dev/sda3      34322+  60801-  26479212691968    7  HPFS/NTFS
    /dev/sda4          0       -       0          0    0  Empty
    ubuntu@ubuntu:~$ sudo fdisk -l

    Disk 
    /dev/sda500.1 GB500107862016 bytes
    255 heads
    63 sectors/track60801 cylinders
    Units 
    cylinders of 16065 512 8225280 bytes
    Sector size 
    (logical/physical): 512 bytes 512 bytes
    I
    /O size (minimum/optimal): 512 bytes 512 bytes
    Disk identifier
    0xa0af63ee

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1        1274    10233373+   7  HPFS/NTFS
    /dev/sda2   *        1275       31006   238822290    7  HPFS/NTFS
    /dev/sda3           34323       60802   212691968    7  HPFS/NTFS
    ubuntu
    @ubuntu:~$ 
    And here is my testdisk after depth search:

    PHP Code:
    TestDisk 6.11Data Recovery UtilityApril 2009
    Christophe GRENIER 
    <grenier@cgsecurity.org>
    http://www.cgsecurity.org

    Disk /dev/sda 500 GB 465 GiB CHS 60802 255 63
         Partition               Start        End    Size in sectors
    HPFS NTFS              0   1  1  1273 254 63   20466747 [PQSERVICE]
    D HPFS NTFS           1274   0  1 31005 254 63  477644580
    D HPFS 
    NTFS           1274  14 21 34322  34  8  530917368
    D HPFS 
    NTFS           1274  14 21 60801  47 46  956303360
    D HPFS 
    NTFS          34322  34 17 60801  15 14  425383936 [Data]
    D Linux Swap           59666   1  1 60800 254 47   18233696
    D HPFS 
    NTFS          60738   0  1 60800 254 63    1012095 [ACER_SERVIC]



    StructureOk.  Use Up/Down Arrow keys to select partition.
    Use 
    Left/Right Arrow keys to CHANGE partition characteristics:
    *=
    Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
    Keys A
    add partitionLload backupTchange typeP: list files,
         
    Enterto continue
    NTFS10478 MB 9993 MiB 
    I hope somebody can help me.

  7. #17
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: [SOLVED] Partition Table problem

    Quote Originally Posted by blade2008 View Post
    Hi I am trying to fix my windows vista partition.
    First, it's usually best to start a new thread for your own problem rather than hijack an existing one (even one that's marked as "solved" and no longer being posted to).

    Second, what's wrong with your Vista partition? You don't specify, and I don't see anything obviously wrong in your current partition table, except that there's a bit of unused space between /dev/sda2 and /dev/sda3. Have you lost or accidentally deleted a partition?

    Third and finally, I see no evidence of any Ubuntu installation on this disc. It appears that this is a Windows-only setup. If so, you're more likely to get helpful responses on a Windows forum.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •