2

I was trying to login my Ubuntu 14.04, but after entering password, I wasn't able to see any icons or dash. I had faced this issue before and I knew the solution as well.
The issue was that my Ubuntu partition was almost full.

I planned to move the huge downloaded files to my Windows partition. I got into the terminal Alt+Shift+F1 and mounted my Windows drive at /mnt.

Then I moved files using mv to my mounted drive.
The files were moved successfully (I confirmed that with ls).
I unmounted the drive and rebooted my system and what I found?
The files were vanished.

Just like that. What might be the reason? I also tried recovering the files, but no success so far!

EDIT : I was successful to recover some of the files (not all). The files appeared in the explorer as soon as I ran chkdsk on the affected drive.

Some files were corrupt (The clusters might have got overwritten).

5
  • Did you shut down Windows properly or did you hibernate it? If you've hibernated it, the Windows file system could be not consistent and you could damage it when mounting and modifying it.
    – NZD
    Sep 18, 2015 at 21:38
  • @NZD It was properly shut down
    – CyberGeek
    Sep 19, 2015 at 4:39
  • 1
    In Ubuntu, does the Windows drive get mounted as NTFS or NTFS-3g? Linux can't write to NTFS, only NTFS-3g. The mount command for NTFS likely contains a umask=0222 argument to remove all write permissions. If that's the issue, no writing took place. (But that doesn't explain the confirmation.)
    – fixer1234
    Sep 19, 2015 at 4:52
  • 1
    Did u check with sudo ls /mnt where ur ntfs partition is mounted at /mnt
    – Bharat G
    Sep 19, 2015 at 5:04
  • @BharatG Yes, it was mounted.
    – CyberGeek
    Sep 21, 2015 at 15:31

1 Answer 1

0

Just an hint: a sync problem

The kernel keeps data in memory to avoid doing (relatively slow) disk reads and writes. This improves performance, but if the computer crashes, data may be lost or the file system corrupted as a result.

The `sync' command ensures everything in memory is written to disk.

In your case probably you turn off the computer before it ends to physically copy the files.
Unfortunately the simple ls answer is not enough to guarantee that the kernel finished to flush them.

Moreover if your HDD was completely full some part of the files should still be only on the memory; thus, after the system reboot, there is no way to extract again them from the ram.

Next time you can try to avoid this problem giving a sync command before to turn off and waiting its exit status:

mv  From_Here To_There 
sync && echo " ### DONE : sync finish to work ##"

Reference

  • info coreutils 'sync invocation' you can read more

    'sync' writes any data buffered in memory out to disk. This can include (but is not limited to) modified superblocks, modified inodes, and delayed reads and writes. This must be implemented by the kernel; the 'sync' program does nothing but exercise the `sync' system call.

Note

When you unmount the partition the sync is given by the system, but you have to wait that unmount process finish correctly. If it doesn't you should have the problem you find.

You must log in to answer this question.

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