2

I recently installed windows 8.1, which stopped working and became corrupt. I tried loading linux to clear my hard drive partitions, and it says I only have 24 gigabytes of total hard drive space across my partitions (the SSD is 256 GB).

When I view "disks" on ununtu, It also tells me I also tells me I have 24GB across all of my partitions.

Is there a simple way to format my whole hard drive to get all the lost space back? (I'm not worried about the data in it)

sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 24.0 GB, 24015495168 bytes
255 heads, 63 sectors/track, 2919 cylinders, total 46905264 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: 0xb07b6a12

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1    46905263    23452631+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 32.0 GB, 32027705344 bytes
255 heads, 63 sectors/track, 3893 cylinders, total 62554112 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: 0x7565bcfd

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           0     2039807     1019904    0  Empty
/dev/sdb2           20644       25315        2336   ef  EFI (FAT-12/16/32)

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb1'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb1: 1044 MB, 1044381696 bytes
255 heads, 63 sectors/track, 126 cylinders, total 2039808 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: 0x7565bcfd

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1   *           0     2039807     1019904    0  Empty
/dev/sdb1p2           20644       25315        2336   ef  EFI (FAT-12/16/32)

ubuntu@ubuntu:~$ sudo parted -l
Model: ATA SAMSUNG MZMPA024 (scsi)
Disk /dev/sda: 24.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  538MB   537MB   fat32                                         msftdata
 2      538MB   852MB   315MB   ntfs            Basic data partition          hidden, diag
 3      852MB   957MB   105MB   fat32           EFI system partition          boot
 4      957MB   1092MB  134MB                   Microsoft reserved partition  msftres
 5      1092MB  19.9GB  18.8GB  ntfs            Basic data partition          msftdata
 6      19.9GB  24.0GB  4103MB  linux-swap(v1)


Warning: /dev/sdb contains GPT signatures, indicating that it has a GPT table.
However, it does not have a valid fake msdos partition table, as it should.
Perhaps it was corrupted -- possibly by a program that doesn't understand GPT
partition tables.  Or perhaps you deleted the GPT table, and are now using an
msdos partition table.  Is this a GPT partition table?
Yes/No? Yes                                                               
Error: The primary GPT table is corrupt, but the backup appears OK, so that will be used.

OK/Cancel? OK                                                             
Model:  Patriot Memory (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name                  Flags
 1      20.5kB  210MB   210MB                EFI System Partition  boot
 2      210MB   31.9GB  31.7GB               Untitled

ubuntu@ubuntu:~$ sudo lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0  22.4G  0 disk 
├─sda1   8:1    0   512M  0 part 
├─sda2   8:2    0   300M  0 part 
├─sda3   8:3    0   100M  0 part 
├─sda4   8:4    0   128M  0 part 
├─sda5   8:5    0  17.5G  0 part 
└─sda6   8:6    0   3.8G  0 part 
sdb      8:16   1  29.8G  0 disk 
├─sdb1   8:17   1   996M  0 part 
└─sdb2   8:18   1   2.3M  0 part 
loop0    7:0    0   953M  1 loop /rofs
9
  • Please edit your post and add the output of fdisk -l, parted -l and lsusb.
    – muru
    Apr 23, 2015 at 22:46
  • Not sure if the results are different because I used a USB version of Ubuntu. Thank you for the quick comment.
    – Fatt_Dre
    Apr 23, 2015 at 23:43
  • I'm very sorry, don't know what I was thinking when I typed that - I intended to ask for lsblk, not lsusb.
    – muru
    Apr 23, 2015 at 23:45
  • No problem, Fixed the edit! still looks like a lot of disk space is missing :\
    – Fatt_Dre
    Apr 24, 2015 at 0:00
  • 1
    Are you certain it's a 256GB disk? The model name (MZMPA024) suggests otherwise.
    – muru
    Apr 24, 2015 at 0:02

0

Browse other questions tagged .