Ask Your Question
1

partial partition overwrite

asked 2014-01-23 17:45:34 -0500

Greg Wright gravatar image

updated 2014-01-23 21:42:11 -0500

FranciscoD_ gravatar image

I was using using gparted's unformatted option to change the partition ordering (because I prefer it to list sda 1 2 3 4 5 not sda1 3 2 4 when i resize and create a new part) but you have to delete the partiton to get that option (not run of course) anyway then I decided to make the new one even bigger without resizing further. now the othe partition is unreadable. How do I recover the filesystem or realy just the data on it?

EDIT: this is the fdisk report:

Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 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
Disklabel type: dos
Disk identifier: 0x00005008

Device    Boot      Start        End     Blocks  Id System
/dev/sda1            2048    1025485     511719  83 Linux
/dev/sda2 *       1026048    1230847     102400   7 HPFS/NTFS/exFAT
/dev/sda3         1232894 3907028991 1952898049   5 Extended
/dev/sda5         1232896  210948095  104857600  83 Linux
/dev/sda6       210950144  420665343  104857600   7 HPFS/NTFS/exFAT
/dev/sda7       420667392  630380543  104856576  83 Linux
/dev/sda8       630382592 3068168191 1218892800  83 Linux
/dev/sda9      3068170240 3907028991  419429376  83 Linux


Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 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
Disklabel type: gpt
Disk identifier: 6E2F5367-EEF5-4DFF-94DD-E72561050E04

Device    Start          End   Size Type
/dev/sdb1  2048   3907028991   1.8T Microsoft basic data


Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 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
Disklabel type: dos
Disk identifier: 0x4e3ab301

Device    Boot Start        End     Blocks  Id System
/dev/sdc1       2048 3907028991 1953513472  83 Linux


Disk /dev/sdd: 3.7 GiB, 4004511744 bytes, 7821312 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
Disklabel type: dos
Disk identifier: 0x09e809e8

Device    Boot Start       End  Blocks  Id System
/dev/sdd1 *       32   7831550 3915759+  b W95 FAT32


Disk /dev/mapper/live-rw: 4 GiB, 4294967296 bytes, 8388608 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 /dev/mapper/live-base: 4 GiB, 4294967296 bytes, 8388608 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 /dev/mapper/live-osimg-min: 4 GiB, 4294967296 bytes, 8388608 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
edit retag flag offensive close merge delete

Comments

Are you asking if you can recover data from the older partition that you've overwritten? I see you haven't asked a question :) Please edit your question to improve it. If you can give more details, like the sudo fdisk -l output etc., that would help people answer your question better.

FranciscoD_ gravatar imageFranciscoD_ ( 2014-01-23 19:27:24 -0500 )edit
1

I dont think this is what you are looking for but

sudo fdisk -l sda8
fdisk: cannot open sda8: No such file or directory
Greg Wright gravatar imageGreg Wright ( 2014-01-23 20:39:14 -0500 )edit

Ah, no. Just sudo fdisk -l is enough. No need to specify a partition. It'll tell us the state of your entire disk. For example:

[asinha@ankur-laptop  ~]$ sudo fdisk -l
[sudo] password for asinha:

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
...
Device    Boot     Start       End    Blocks  Id System
/dev/sda1 *         2048   1026047    512000  83 Linux
/dev/sda2        1026048 864016383 431495168  83 Linux
...
FranciscoD_ gravatar imageFranciscoD_ ( 2014-01-23 20:52:11 -0500 )edit

Can you please edit your question and add the info there? it's easier for people to follow. You can add an "EDIT: adding more info" line etc.

FranciscoD_ gravatar imageFranciscoD_ ( 2014-01-23 20:53:31 -0500 )edit

The /dev/mapper/live* parts are probably the liveCD that you're using?

FranciscoD_ gravatar imageFranciscoD_ ( 2014-01-23 21:42:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-01-23 21:29:48 -0500

sergiomb gravatar image

better software to recover data and partitions is testdisk

yum install testdisk

rpm -qi testdisk

URL         : http://www.cgsecurity.org/wiki/TestDisk
Summary     : Tool to check and undelete partition, PhotoRec recovers lost files
Description :
Tool to check and undelete partition. Works with FAT12, FAT16, FAT32,
NTFS, ext2, ext3, ext4, btrfs, BeFS, CramFS, HFS, JFS, Linux Raid, Linux
Swap, LVM, LVM2, NSS, ReiserFS, UFS, XFS.
PhotoRec is a signature based file recovery utility. It handles more than 
440 file formats including JPG, MSOffice, OpenOffice documents.

before do anything else try recover partitions as was , after that , if you want reorder partitions I advise use gdisk , with gdisk you also could convert partitions tables from MBR to GPT , if you do that you can enter in trouble again , you need reinstall gurb entering to be based on GPT, you need create a "BIOS boot partition"

 /dev/sda1           34         2047  1007K BIOS boot partition

my disk fdisk -l /dev/sda

Disk /dev/sda: 232,9 GiB, 250059350016 bytes, 488397168 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
Disklabel type: gpt
Disk identifier: xxx

Device           Start          End   Size Type
/dev/sda1           34         2047  1007K BIOS boot partition
/dev/sda2         2048      1026047   500M Linux filesystem
/dev/sda3      1026048    488396799 232,4G Linux LVM

https://fedoraproject.org/wiki/Common_F20_bugs#UEFI_install_to_ms-dos_.28.27MBR.27.29_labelled_disk_fails_with_unclear_errors I had been guide by this link, text begins in: You can, however, convert it ..., but for the first time I could reorder partition else is better copy data to other disk and do partition again . Also if you reorder partitions check /etc/fstab , depends on how you label the partitions ....

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-01-23 17:45:34 -0500

Seen: 439 times

Last updated: Jan 23 '14