Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22
Hello All, I was doing a file transfer from my laptop (running Ubuntu 8.04) to my desktop (Ubuntu 8.04) and somehow the task crashed, and I lost the folder I ...
  1. #1
    Just Joined! Shugotenshi_X's Avatar
    Join Date
    Nov 2008
    Location
    Washington
    Posts
    18

    [SOLVED] Lost an entire folder. How do I get it back?

    Hello All,

    I was doing a file transfer from my laptop (running Ubuntu 8.04) to my desktop (Ubuntu 8.04) and somehow the task crashed, and I lost the folder I was transferring the file to.

    At the time of the crash, on the laptop I had just run sudo apt-get install bridge-utils to install some network bridging utilities. I figure that upon installing this, it may have automatically dinked with my NIC and disconnected me, and crashed the file transfer in the process. I was transferring a .avi file from the ext2 file system on my laptop, to my secondary HDD (500GB NTFS) on the desktop; (I know, NTFS on Linux = BAD, but it was originally a M$ box, and I don't have enough HDD space elsewhere to shuffle it around). I was transferring the .avi file to a folder called "DVDs", and now that folder is "gone".

    I say "gone", because I can't see the folder in nautilus/konqueror, but I can see it from the terminal, except it isn't listed as a folder, (now shows in blue text rather than green with the ls command). When I try to simply CD to it, or do anything to it, such as copying it, it gives me an input/output error message.

    I ran updatedb to refresh the list, and it's still there, so I know it's not a "ghost" file. I also tried sudo ntfsfix to no avail. I'd like to check it with chkdsk with a Windows box, but the only one I have with a bios that supports this big of a HDD outside of Linux won't boot right now.

    Anyone have any ideas how to get my folder back? Thanks in advance!

  2. #2
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    Do you have a windows install CD? You can boot with that and select Repair console. When you get the prompt, you can run Chkdsk.

    Another option if you have another Windows machine is to make a bootable (sort of) Windows Live CD, check out the Ultimate Boot CD with BartPE. Comes with a bunch of useful tools too, incl for recovery.

  3. #3
    Just Joined! Shugotenshi_X's Avatar
    Join Date
    Nov 2008
    Location
    Washington
    Posts
    18
    Unfortunately, there's something wrong with the MB on the Windows box, and that's the only one with a bios that can handle the 500GB. So, it won't even let me boot to the XP disc. Now, if an Ultimate Boot CD could load whatever magic Linux uses to mount it (on my system that can't support it via the bios,) and THEN run chkdsk, I'd be alright. Only problem is, I have no idea what part of Linux does that to include it in a custom UBCD.

    (Thanks for the quick reply...)

  4. #4
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    It doesn't, it's a Windows program to build a Windows based CD, and includes the Windows programs that do the numerous things that fix Windows (and Windows file systems) problems. The point I was suggesting was to build the CD on any Windows computer (doesn't have to handle 500+ gig), then boot the CD on your ailing Linux machine. It won't be able to do anything with the Linux partitions, but it might be able to recover your NTFS partition.

  5. #5
    Just Joined! Shugotenshi_X's Avatar
    Join Date
    Nov 2008
    Location
    Washington
    Posts
    18
    The thing is though, by loading this HDD on my Linux box with a Windows CD will only show 130GB or so. Outside of Linux, this computer cannot read the entire disk due to the BIOS. I'm not too comfortable letting anything try to reconfigure anything on the HDD, even chkdsk, without being able to read it properly. Besides, the missing folder is probably in the later 270GB or so since it was added recently, if it can read the contents at all.

    Point is, running chkdsk on a drive it can't read properly will probably do more harm than good, unless you have experience that says otherwise.

    After looking into the issue some more last night, I have all the more reason to believe chkdsk may be all I need to fix this. What I think I'll try if it comes down to it, is bring the drive into work and slap it on one of the PCs I have there and run chkdsk.

    If however, this does not work, how would I change the file/folder attributes to the "missing" folder in the command line, since I can see it there as mentioned in my first post? (I.E. change missing folder "DVDs" [listed in blue in command-line] attributes to make it a folder [listed in green])

    Thanks for the suggestions
    Last edited by Shugotenshi_X; 02-13-2009 at 06:30 PM. Reason: Further elaboration

  6. #6
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    This is a permissions thing. Standard folders are blue, when they're listed with a green bg, it means that all users have full permissions (777), which can be achieved by mounting the fs with umask=0. This is probably a bad idea at the minute until you have the file system repaired.

    The thing is though, by loading this HDD on my Linux box with a Windows CD will only show 130GB or so.
    Question, what is the size of your NTFS partition? With the exceptions of partition editing tools, Windows will only see the size of NTFS or vFAT partitions, it will not include the size of linux partitions. If this is the case, this is normal behavior and it will be safe to run chkdsk off the Windows CD.

    I just find 130GB a really odd BIOS limitation. The limitations of BIOS through history have been related to bit width; these have been things like 512MB (early 90's), then 8GB(Late 90's), then 64GB(Later 90's, early 00's), then I think more current there's been a perceived 320GB limitation with some PATA(IDE) systems. Since the inception of SATA, 500GB drives have been fairly common. Windows interpretation makes more sense to me.

  7. #7
    Just Joined! Shugotenshi_X's Avatar
    Join Date
    Nov 2008
    Location
    Washington
    Posts
    18
    Ok, I always thought the colors specified the type of folder, good to know. I just wanted to give myself the heads up just in case I have to do this AFTER the repair.

    As far as the size of the disk goes, it is kind of odd what size it lists, and 130GB is not the exact size it gives me, (but darn tootin' close to my memory). It's actually an IDE drive, not SATA, and my BIOS only supports so much with no upgrade offered. I found it odd that Linux can read it at all, but the manufacturer assured me that there's no upgrade, and no Windows install nor disc is able to read it as 500GB on this system. (BTW, it's not just a partition, it is the whole 500GB IDE drive, slave). There's no system files on it for Linux or Windows, and is strictly space for dumping files, mostly media and disc images.

    When I read several articles about why my computer only read 130GB or whatever it is, it made perfect sense at the time, as the articles were listing the same size approximately that I was seeing myself, long time ago, don't remember details...

  8. #8
    Just Joined! Sunnyside's Avatar
    Join Date
    Dec 2008
    Posts
    50

    File recovery

    (I know, NTFS on Linux = BAD, but it was originally a M$ box, and I don't have enough HDD space elsewhere to shuffle it around).
    This is not exactly correct. As a data recovery specialist, I can tell you the NTFS file system has a greater chance of recovering data. All Microsoft file systems follow an "even wear" strategy, where all free space from one end of the drive to the other will be written too as time goes on before it will start writing in the free space created by deleting files over time. This means your data can be there for life if you don't have much data and a large partition.
    Linux file systems on the other hand can actually overwrite newly created free space within the same hour in many cases. I don't want to take the time to explain why.

    I learned the hard way not to ever move data from one place to another, it is better to copy it first, then delete the original after the transfer has completed successfully. Because even when you move data over, the original is still there till it's overwritten, just the file system can't reach it as it's been marked as free space. The MTF of an NTFS file system will still have record of it and where it was, but Windows can't retrieve it. You can then use software like "File Salvage" in Windows or Photorec in Linux to recover it.

    In your case, you may be out of luck if you continued to use the Linux system after this happened, because the "full" version the file would be on the ext2 partition, the copy that was interrupted during transfer to the NTFS file system is most likely incomplete and useless.

    In any event, it's possible to recover the folder, but not it's contents, you have to chase each individual file that was in that folder one by one. Run your Ubuntu live CD in both boxes and open up a terminal full screen and run the command: photorec, it can recover .avi very well. If all you were moving was one large .avi file, chances are you won't get it from the NTFS file system.
    Make sure to have a separate large drive or partition to recover to if you let photorec recover many file types, or set it to only go after video files to minimize required space for successful recovery.
    Photorec is part of the testdisk package which I believe is on the Ubuntu CD, if not, get a live CD that has it, forensic CD's have it, like Knoppix. Don't use the Ubuntu partition to aid successful recovery.

  9. #9
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    Are you sure this is a BIOS rather than Windows issue ... I recently upgraded my desktop system with a new hard drive (320GB) but only round about 137GB was recognised by XP before I applied service packs 2 & 3 ... Linux recognised it straight away ... your issue sounds quite similar. In my case when I connected the new drive Windows thought it would be a good idea to reformat the drive

    The way I see it NTFS is a foreign language ... its like using a French to English dictionary to do the translation when the French words have spelling mistakes ! you just know it's going to end badly ... I think you need to fix this with Windblow ...

  10. #10
    Just Joined! Sunnyside's Avatar
    Join Date
    Dec 2008
    Posts
    50
    I just find 130GB a really odd BIOS limitation. The limitations of BIOS through history have been related to bit width; these have been things like 512MB (early 90's), then 8GB(Late 90's), then 64GB(Later 90's, early 00's), then I think more current there's been a perceived 320GB limitation with some PATA(IDE) systems. Since the inception of SATA, 500GB drives have been fairly common. Windows interpretation makes more sense to me.
    I have a Dell XPS Gen 2 laptop, it was the top of the heap in the summer of 2005. I just upgraded the hard drive from 80GB to 250GB to accomodate a Hackintosh installation. I was surprised to see such a newer high end machine with a bios that was limited to the 137GB barrier. After formatting, you're left with around 130GB.
    If I were to just have Window use the entire drive in one partition, it would not be a problem as operating systems can see and use the full amount whether the bios sees it all or not. But because I have 10 primary partitions and some free space in the middle, I had to use some trickery to set this drive up with my shared 120GB NTFS data partition allocated high (at the back end of the drive the bios does not know exists) which all operating systems see and use. I have Windows XP, Ubuntu, Debian and the Hackintosh that I'm still trying to get going properly.
    All of which would not have problems working on that partition.

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...