My 32 Gb ssd was partitioned with 8 Gb and 29 Gb. I used dd to write ubuntu iso onto my pendrive but accidentally wrote it to my 8 gb partition of my ssd. Now gparted dosent show that 8 Gb partition.
How do i recover it??
the command was dd if=path_to_iso of=/dev/sdb
where sdb is the ssd
Output of sudo fdisk -l
is :
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
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 / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xb367fbf3
` Device Boot Start End Blocks Id System
/dev/sda1 1 976773167 488386583+ ee GPT
Partition 1 does not start on physical sector boundary. `
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, 32017047552 bytes
255 heads, 63 sectors/track, 3892 cylinders, total 62533296 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: 0x01a1f343
` Device Boot Start End Blocks Id System `
and output of df -h
is :
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 303G 8.3G 280G 3% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 2.9G 4.0K 2.9G 1% /dev
tmpfs 594M 1.2M 593M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.9G 288K 2.9G 1% /run/shm
none 100M 44K 100M 1% /run/user
output of sudo parted -l
is :
Model: ATA ST500LT012-9WS14 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 525MB 524MB fat32 EFI system partition boot
2 525MB 567MB 41.9MB fat32 Basic data partition hidden
3 567MB 701MB 134MB Microsoft reserved partition msftres
4 701MB 1215MB 514MB ntfs Basic data partition hidden, diag
5 1215MB 153GB 152GB ntfs Basic data partition msftdata
7 153GB 484GB 331GB ext4
8 484GB 489GB 5243MB linux-swap(v1)
6 489GB 500GB 11.0GB ntfs Microsoft recovery partition hidden, diag
Model: ATA LITEONIT LMS-32L (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
it was by mistake that I forgot to put sdb1
sudo parted /dev/sdb print free
gives :
Model: ATA LITEONIT LMS-32L (scsi)
Disk /dev/sdb: 32.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
32.3kB 32.0GB 32.0GB Free Space
gparted shoows 29 gb as unallocated
dd
command you used and also the output ofsudo fdisk -l
anddf -h
./dev/sdb1
) and that is probably the problem. Thefdisk -l
output should clarify things.sudo parted -l
, notfdisk
, sorry. In any case, it looks like yourdd
command has deleted your partitions (which is what it should do since you copied to the disk and not to a partition likesdb1
).