0

After some partition table problems I finally ran up my Ubuntu and GParted to see my partitions. Then some window appeared.

It sounds really bad...

I clicked Cancel and then second one appeared.

...

I clicked Cancel once again - finally GParted started.

This is how it looks now...

I don't know what to do! GParted says this about my swap:

It sounds bad... At least for me.

/dev/sda4 is my extended partition - this is were my Ubuntu is. Here you can read about my previous problems with partition table. I simply rewrited old partition table - It's not my fault! (I hope)

Also, here's my fdisk -l output:

Disk /dev/sda: 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: 0xa118d672

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   286719999   143256576    7  HPFS/NTFS/exFAT
/dev/sda3       286720000   811972349   262626175    7  HPFS/NTFS/exFAT
/dev/sda4       915726335   976771071    30522368+   f  W95 Ext'd (LBA)
/dev/sda5       915726336   968652799    26463232   83  Linux
/dev/sda6       968652801   976771071     4059135+  82  Linux swap / Solaris

And here's how was it before:

Disk /dev/sda: 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: 0xa118d672

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   286719999   143256576    7  HPFS/NTFS/exFAT
/dev/sda3       286720000   811972349   262626175    7  HPFS/NTFS/exFAT
/dev/sda4       915726335   976771071    30522368+   f  W95 Ext'd (LBA)
/dev/sda5       915726336   968652799    26463232   83  Linux
/dev/sda6       968652800   976771071     4059136   82  Linux swap / Solaris

Thanks for help!

23
  • 1
    @michd I've already added image with information about my 'unallocated partition'. It says: "Unable to satisfy all constraints on the partition'
    – Jacajack
    Dec 3, 2014 at 14:11
  • my bad, there's usually more info to work with
    – mchid
    Dec 3, 2014 at 14:12
  • Well... It is weird... That's why I'm asking question here. :) Is there any way to simply check filesystem or partition table in Linux?
    – Jacajack
    Dec 3, 2014 at 14:15
  • Normally gparted does that... So yes, but for you that method seems broken... askubuntu.com/questions/182446/…
    – Tim
    Dec 3, 2014 at 14:27
  • 1
    It looks like the start of logical partition sda5 is only one sector away from extended partition sda4. For the libparted library, which GParted uses, at least 2 sectors are required. This is to leave space for Linux LILO if I recall correctly. Hence the message "Unable to satisfy all constraints". 1 sector is the bare minimum space needed to store only the Extended Boot Record. Dec 5, 2014 at 20:23

1 Answer 1

0

It is pretty weird but I solved problem (like 75% of it exactly). Here's what I did:

  1. I backuped my partiton table by sudo sfdisk -d /dev/sda > sda-backup.txt
  2. I created file to edit partition table by sudo sfdisk -d /dev/sda > sda-new.txt
  3. I edited my "sda-new.txt" to change partition table and saved it.
  4. I swapped off my /dev/sda6 by swapoff /dev/sda6
  5. I tried writing partition table by sudo sfdisk /dev/sda < sda-new.txt, but I got error bad input or something like that
  6. I decided to restore old partiton table by sudo sfdisk /dev/sda < sda-backup.txt
  7. I opened GParted and I saw my partiions.

I don't know what exactly happened, but I think It works.

Not the answer you're looking for? Browse other questions tagged .