You are not logged in.
Pages: 1
Hello I formatted windows partition and installed Arch on it, before that I created extended windows partition and moved all my data there. Now I have a problem I can't access partition where all my data is. When I run gparted I get notification that partitions are overlapped and if I check information of that partition I get following describtion:
Failed to open '/dev/sda5'.
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 0: Invalid argument
Record 0 has no FILE magic (0x0)
Failed to load $MFT: Input/output error
Failed to mount '/dev/sda5': Input/output error
NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
made to NTFS by this software.Hard drive partitions look like this:
Disk: /dev/sda
Size: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Label: dos, identifier: 0x0efe3462
Device Boot Start End Sectors Size Id Type
>> Free space 2048 307202047 307200000 146.5G
/dev/sda1 * 315590656 976773167 661182512 315.3G 83 Linux
/dev/sda3 636456960 976771071 340314112 162.3G f W95 Ext'd (LBA)
|-Free space 636459008 754976769 118517762 56.5G
|-/dev/sda5 754976769 754976923 155 77.5K 50 OnTrack DM
`-Free space 754980864 976771071 221790208 105.8G
/dev/sda4 307202048 315590655 8388608 4G 82 Linux swap / SolarisI want to access /dev/sda3 partition. I made backup image of partition with dd, but still can't access it.
Do you know how to solve it?
Last edited by mitogoni (2020-06-11 19:26:24)
Offline
sda3 is an extended partition, ie. a container for more parititions (common workaround for limitations of the DOS partition table)
There's only one subpartition (sda5, 77.5kB small) in the middle of it.
I created extended windows partition and moved all my data there
There's a chance you didn't. Do you have a backup of that data?
In the best case scenario, you create sda3 and sda5 spanning its entirety. Then accidentally re-partitioned sda3.
In that case, restoring the partition table (NO FORMATTING!!!) that existed at the time when you moved the data would reveal the old partition, filesystem and all your data.
Worst case: you moved your data over a cliff.
==> What *exactly* did you do? (Describe all steps in order, what programs you used and to the best of your memory. Be accurate!)
If things went really badly, all you could do was to scan your disk for files w/ eg. testdisk, https://wiki.archlinux.org/index.php/File_recovery
If they were encrypted w/ bitkeeper, this won't work either.
Offline
Thank you for reply!
==> What *exactly* did you do? (Describe all steps in order, what programs you used and to the best of your memory. Be accurate!)
Before I started installing Arch I moved files under Windows on seperate partition (D disk) and it was accessable, It was sda5 subpartition of sda3 as you said.
I messed up partitions later. Initially it looked like this when I ran arch first time after installation.
Festplatte: /dev/sda Größe: 465,78 GiB, 500107862016 Byte, 976773168 Sektoren Bezeichner: dos, Identifikator: 0x0efe3462
Gerät Boot Anfang Ende Sektoren Größe Kn Typ
Freier Bereich 2048 307202047 307200000 146,5G
/dev/sda1 * 315590656 976773167 661182512 315,3G 83 Linux
/dev/sda3 636456960 976771071 340314112 162,3G f W95 Erw. (LBA)
└─/dev/sda5 636459008 976771071 340312064 162,3G 7 HPFS/NTFS/exFAT
/dev/sda4 307202048 315590655 8388608 4G 82 Linux Swap / SolarisSo what I did:
1. During installation I deleted windows os partition and created swap and root partitions on that space.
2. When I was finished with installation of Arch, extended partitoin wasn't listed in file manager. I ran gparted and first notification was "overlapped partitions aren't allowed" then I checked partition information and I got following notification:
Failed to open '/dev/sda5'.
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 0: Invalid argument
Record 0 has no FILE magic (0x0)
Failed to load $MFT: Input/output error
Failed to mount '/dev/sda5': Input/output error
NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
made to NTFS by this software.3. I booted from slax live cd to check if I could access from there, but partition wasn't accessable from there either.
4. Then I started Arch again and made image backup of that partition with dd (if=/dev/sda3 of=/sda3.img)
5. After that I tried to mount that image in "furius iso mount", but it didn't work.
6. Then I launched testdisk to check/fix partitions it said that Linux root partition /dev/sda1 and ntfs partition /dev/sda3 were in conflict. I didn't do anything I cancelled testdisk with ctl+c.
7. I wanted to install windows again aside Arch to run checkdisk, I DELETED BACKUP image (because there wasn't enought space), but I couldn't resize linux partition, it just didn't allow when you try from gparted live cd.
8. After that I got partition structure and deleted space like it is now. I don't know when did it change, during backup or running testdisk.
https://www.dropbox.com/s/kk6qq0z1cmacj … 8.png?dl=0
Last edited by mitogoni (2020-06-11 19:29:17)
Offline
Gerät Boot Anfang Ende Sektoren Größe Kn Typ
Freier Bereich 2048 307202047 307200000 146,5G
/dev/sda1 * 315590656 976773167 661182512 315,3G 83 Linux
/dev/sda3 636456960 976771071 340314112 162,3G f W95 Erw. (LBA)
└─/dev/sda5 636459008 976771071 340312064 162,3G 7 HPFS/NTFS/exFAT
/dev/sda4 307202048 315590655 8388608 4G 82 Linux Swap / SolarisThe first 146,5G are unused, then there's 4G swap, then there's your 315,3G linux partition and about halfway in is the 162,3G extended/NTFS partition, which resides entirely inside the linux partition.
If you don't care about the data on the windows partition (which is probably lost), you can delete the extended partition, create a new one in the free space at the beginning of the disk and install windows there.
If you do care about the data in the windows partition, your best hope is to delete the partition table and create a paritition that spans the exact sectors of sda5 (starting at 636459008 and 340312064 sectors wide), tag it NTFS, boot some life distro, try to mount that partition and pray.
If you don't care about any data on the disk, I'd suggest to completely repartition the disk and install everything again, because w/ the conflicting partitions, it's hard to say whether and which data might have lost its integrity (notably because files might be fragmented across the disk, though from your description, that doesn't see likely)
Offline
thank you for answer.
that was before I started fixing, now it looks like this:
Disk: /dev/sda
Size: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Label: dos, identifier: 0x0efe3462
Device Boot Start End Sectors Size Id Type
>> Free space 2048 307202047 307200000 146.5G
/dev/sda1 * 315590656 976773167 661182512 315.3G 83 Linux
/dev/sda3 636456960 976771071 340314112 162.3G f W95 Ext'd (LBA)
|-Free space 636459008 754976769 118517762 56.5G
|-/dev/sda5 754976769 754976923 155 77.5K 50 OnTrack DM
`-Free space 754980864 976771071 221790208 105.8G
/dev/sda4 307202048 315590655 8388608 4G 82 Linux swap / SolarDoes it mean that I deleted all my files? Which tool would you suggest me to try to recover that partition?
Last edited by mitogoni (2020-06-11 19:03:32)
Offline
Please post commands and their output in English and in between [code] [/code] tags...
https://wiki.archlinux.org/index.php/Co … s_and_code
Offline
Disk: /dev/sda
Size: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Label: dos, identifier: 0x0efe3462
Device Boot Start End Sectors Size Id Type
>> Free space 2048 307202047 307200000 146.5G
/dev/sda1 * 315590656 976773167 661182512 315.3G 83 Linux
/dev/sda3 636456960 976771071 340314112 162.3G f W95 Ext'd (LBA)
|-Free space 636459008 754976769 118517762 56.5G
|-/dev/sda5 754976769 754976923 155 77.5K 50 OnTrack DM
`-Free space 754980864 976771071 221790208 105.8G
/dev/sda4 307202048 315590655 8388608 4G 82 Linux swap / SolarisSorry I am new here didn't know that option.
Last edited by mitogoni (2020-06-11 19:40:57)
Offline
Offline
Disk: /dev/sda
Size: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Label: dos, identifier: 0x0efe3462
Device Boot Start End Sectors Size Id Type
>> Free space 2048 307202047 307200000 146.5G
/dev/sda1 * 315590656 976773167 661182512 315.3G 83 Linux
/dev/sda3 636456960 976771071 340314112 162.3G f W95 Ext'd (LBA)
|-Free space 636459008 754976769 118517762 56.5G
|-/dev/sda5 754976769 754976923 155 77.5K 50 OnTrack DM
`-Free space 754980864 976771071 221790208 105.8G
/dev/sda4 307202048 315590655 8388608 4G 82 Linux swap / SolarisOffline
Does it mean that I deleted all my files?
Something that has escaped me:
Then I started Arch again and made image backup of that partition with dd (if=/dev/sda3 of=/sda3.img)
You made a backup of the windows partition that was overlapping your linux partition onto the linux partition.
Assuming the image is not 77.5kB but 162.3GB, this image is the closest thing of what's left of your data, because you overwrote at least some sectors of sda3 with a shifted version of the partition.
That might also explain the shredded extended partition layout - the headers now contain random garbage.
You can try testdisk on the image (see the link I posted in #2) but you probably want to invest in an external drive to rescue the data on (because there's not 162 GB free space left on the linux partition and don't even think about extending the partition into the 146.5GB free space before you secured what's left of your data :-(
Offline
Thanks a lot! I guess I couldn't make it more complicated :)
You can try testdisk on the image (see the link I posted in #2) but you probably want to invest in an external drive to rescue the data on
I will try that, hope there is still left something on it.
Offline
Pages: 1