1

So I'm having a problem with kimsufi server. I was installing windows by using this command:

wget -O- ...url.../server.gz | gunzip | dd of=/dev/sda

And I messed up and accidentally ran that command on already existing windows installation, now I can't use RDP anymore, I guess it's all gone now, it somehow wrote over existing installation, even though it had 3% progress at downloading the image. All my important files were on different partition, not on primary where the OS was stored.

Is there a way to transfer all files to another server by using rescue mode ? Can I somehow get FTP server running in Kimsufi Linux rescue mode ? I am thinking of connecting to it from another server (windows), browse files and download/back up them.

I have tried to use WinSCP, but it shows only Linux directories. How can I browse windows partitions through WinSCP ?

Could it be that after running that command it had overwritten my main partition and corrupted other partitions ?

I ran lsblk command and it shows only 2 partitions

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT 
sda 8:0 0 1.8T 0 disk 
├─sda1 8:1 0 500M 0 part 
└─sda2 8:2 0 14.5G 0 part 

Or it just shows linux partitions ?

5
  • I already recovered it with testdisk. In case someone has the same problem, here's the solution: Intel > Analyse > Quick search > And there I found the deleted partition [1.8 TB] > Enter to continue > [Write] (Write partition structure to disk) > And now it's showing when I run fdisk -l
    – Rudolph
    Nov 25, 2016 at 2:32
  • Now I just have to mount that partition and transfer all files through WinSCP to other server.
    – Rudolph
    Nov 25, 2016 at 2:35
  • Tried to mount, but it shows an error "Metadata kept in Windows cache, refused to mount" root@rescue:/dev# sudo mount /dev/sda3 /mnt The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda3': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.
    – Rudolph
    Nov 25, 2016 at 2:45
  • Just read some other thread on this forum on how to fix this: sudo ntfsfix /dev/sda3 and sudo mount -o rw /dev/sda3 /mnt > now it's showing in WinSCP /mnt folder. Everything is fixed now, thanks.
    – Rudolph
    Nov 25, 2016 at 2:50
  • You should write a self-answer to your question, not just bury the useful information in the comments. :) Also please link the other Questions (those are not threads and this is not a forum, it's a Q&A site). Thank you. Nov 25, 2016 at 14:24

1 Answer 1

2

I recovered the partly overwritten partition with testdisk. In case someone has the same problem, here's the solution (use testdisk):

  1. Intel/PC Partition >

  2. Analyse >

  3. Quick search >

    And there I found the deleted partition [1.8 TB] >

  4. Enter to continue >

  5. [Write] (Write partition structure to disk) >

And now the partition is showing when I run fdisk -l

After that I tried to mount it, but it showed an error:

"Metadata kept in Windows cache, refused to mount" root@rescue:/dev# sudo mount /dev/sda3 /mnt The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda3': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.

Read some other thread on this site on how to fix this: sudo ntfsfix /dev/sda3 and sudo mount -o rw /dev/sda3 /mnt > now the mounted NTFS partition is showing in WinSCP (SFTP) /mnt folder.

sda3 is the recovered partition's name, it can contain a different number based on how many other partitions you have.

You must log in to answer this question.

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