Quantcast
Username/Email:  Password: 

How Linux Saved My Files and My Job

 in
Next time your NTFS-based drive decides to take a sudden trip down south, give BG-Rescue Linux a try.

This is a story of how Linux saved my life. Well, actually, not my life but perhaps my job. This is the story of how Linux helped me to recover some important data that I had almost given up on ever getting back, saving my employer and me a whole lot of time, effort and frustration in the process.

Picture the scene: you're sitting at your desk, writing some code for a client on your aging but reliable ThinkPad. Things all seem to be coming together nicely, and you're putting the finishing touches on the last unit test in the current package. You make a modification, press Ctrl and F11, and Eclipse fires up the JUnit. As you wait for the unit test progress bar to reach 100%, you notice that Eclipse literally has begun to crawl. It's true that Eclipse can be a memory hog at the best of times, but this is unusually severe. You turn away for a second, drum your fingers on the desk,and when you turn back, there's a big ugly blue screen of death (BSOD) staring you in the face.

Back in the days of Win95/98, BSODs were common, and NT had its fair share as well--I even had a joke BSOD screensaver at one point. But, Win2k is better in this regard, and a blue screen usually means something is seriously amiss. The message on the screen reads: KERNEL_DATA_INPAGE_ERROR. The only driver visible in the stack trace is atapi.sys, the IDE driver. You scribble down some details. A few minutes of judicious Googling may be able to shed some light on the problem--when the machine restarts. The Win2k memory dump takes an inordinately long time to complete. As you reboot after the dump is complete, you make a mental note to make a backup. It's been a long time since you backed up anything.

The Win2k progress bar gets about 70% across; it's still noticeably slower than normal now and then it bluescreens again. This time it reads INACCESSIBLE_BOOT_DEVICE. The cold hand of fear begins to tighten around you; this is not good. From bitter experience, you know that spontaneous errors related to boot devices are the worst. A few reboots later and nothing has changed. Powering off and then back on produces the same result, and safe mode is no better. It's at this point that you remember the code you were working on hasn't been checked into CVS yet. It was going to be refactored heavily before you added it to the source repository. You could try and place the blame on CVS and its propensity for making difficult the large-scale refactoring of a project structure--and this would be true--but the reality is you should have checked in the code earlier, if only to guard against such a situation. This really is going to mess up the deadline for this portion of the project deliverables. So what to do? Taking a deep breath, you weigh up the options and decide to try and find a way to recover the data.

In my case, at first glance, it seemed as though the hard drive or possibly even the drive controller was at fault. So, I grabbed an identical ThinkPad model and swapped the drives across. The other ThinkPad drive booted up fine, but the drive still was, to use the technical vernacular, knackered. I couldn't simply whip out the drive and attach it as a slave drive on another computer's IDE controller, this being a ThinkPad drive, and all.

My next port of call was the Windows 2000 install CD. I put it in and fired up the recovery console. I recently used the recovery console to restore a corrupted NT boot loader, so I figured it might do the trick here. At the least, I hoped I might be able to get a command-prompt view into the hard drive so I could run chkdsk. When I finally got to the DOS prompt, chkdsk didn't want to know about it. Drive C contains unrecoverable errors was all it wanted to say on the matter. So that option was out.

The next few hours were tedious and frustrating, to say the least. I alternated between three well-known disk recovery and repair software programs, formatting floppies, installing the programs onto the floppies and then attempting to run the programs against the damaged disk. The experiences varied, but the end result was always the same. One of the programs couldn't run without utilizing EMS (extended memory) on DOS, but its extended memory manager (EMM368.EXE) always crapped out, complaining that it couldn't find an unused 64K frame to use as extended memory. A look at the help for EMM386.EXE and a quick look at CONFIG.SYS and AUTOEXEC.BAT (thought I'd seen the last of those guys a few years ago) revealed that there were some settings to alter the locations at which EMM368.EXE probed for unused memory. However, I really didn't know what memory ranges I safely could specify, and the prospect of finding out by way of trial-and-error wasn't appealing. To make matters worse, any reference material I found on EMM386 was for the MS-DOS version; I was using Caldera DR-DOS.

I got similar results from the next program. It looked promising at first--it actually started enumerating through the filesystem on the disk. About 30% of the way through, however, it crashed with an ugly DOS page fault error.

Maybe if I could get a boot disk, I could get a DOS command prompt, I thought. So I dutifully looked around and found a great site called www.bootdisk.com. I downloaded the DOS 6.22 and Win98 SE boot disks. I decided to go with the Win98 SE boot disk, figuring it would have better support for long filenames and so on. I then dimly remembered a site I hadn't visited for a while, a Windows kernel development site called www.sysinternals.com. This site is a gem; it's full of hardcode techie info, plus loads of useful, tricky little utilities, including a lot of useful source code. The utility I was after was called NTFSDOS, and it basically consists of a driver (NTFSDOS.VXD) that allows read-only (for the free version) and read-write (for the pay version) access to NTFS from DOS. I downloaded the utility, stuck it on a floppy and booted into DOS. I ran NTFSDOS.EXE and, lo and behold, there was my drive--the first positive development all day.

I quickly browsed around the file structure and verified that things seemed to be intact. I then cataloged the important files I needed to rescue. The Trouble was my only media was a few floppies. This might seem okay in theory, but the more I browsed through the disk, the more stuff I found that I wanted to keep. Also, the source tree alone that I wanted to retrieve was pretty large. There also were things such as directories with 12 PowerPoint presentations at about 2MB apiece. I also had other essential items, .MAME for one. Clearly, this was not going to be easy. I searched around for a DOS NIC driver for my specific MiniPCI Ethernet/56k combo, but I couldn't find one anywhere.

At this point, things looked pretty bleak. Without a working NIC under DOS, I could spend about a week with a handful of floppies and a copy of PkZIP--not an ideal solution. It was at this point that I remembered using Linux once to recover some data from an NT server I ran in university. I also recently remembered a friend recounting to me how he had lost the administrator password to his Windows box and had reset it using a Linux-based boot floppy that altered the SAM. I shrugged and thought I might as well give it a try. No other practical options were left at this point.

I've been a Linux user since about 1997 and a FreeBSD user for the last couple of years, but I had never tried any of the floppy-based distros. I looked around and quickly came across a floppy distro called BG-Rescue Linux. This seemed to be a pretty capable little distro, specifically aimed at disaster recovery. The current version of BG-Rescue Linux is 0.3.1, which is compiled with kernel version 2.4.24, and it supported a host of Ethernet devices--it even had USB and PCMCIA network device support. A host of command-line utilities are provided by BusyBox, and BG-Rescue Linux uses the uClibC C library. What really made my eyes light up was the inclusion of NTFS support. This uses the LinuxNTFS driver, which is a complete and heavily improved rewrite of the older NTFS driver I had used. BG-Rescue Linux comes complete with the ntfsprogs package, which contains, among other things, tools to non-destructively resize an NTFS partition under Linux.

I downloaded the two floppy disk install images and wrote them onto two blank floppies using dd if=imagename.img of=/dev/fd0. I then inserted the first floppy into the stricken laptop and rebooted. The familiar Linux init sequence rolled up onto the screen, accompanied by a colorful Tux image. I was prompted for a preferred display resolution, followed by a prompt to insert the second floppy disk. It then unzipped its filesystem images into RAM, and a minute or so later I was sitting at a root shell prompt.

First of all, I checked to see if it had picked up the network card. A quick scan of the output of dmesg confirmed that it had found something, all right, and assigned it a driver. I set the IP address and netmask using ifconfig (ifconfig eth0 xx.xx.xx.xx. netmask yy.yy.yy.yy), and then attempted to ping another machine on the same network. It worked. A quick moment of elation ensued, and then it was on to the hard work--accessing and backing up the filesystem. Truth be told, it wasn't that hard at all. In fact, it was downright simple. My next step was to create the directory /mnt/win2k and mount my NTFS partition under that by running mount -t ntfs /dev/hda1 /mnt/win2k. Two seconds later, I had access to the entire NTFS directory tree. Things were finally starting to look positive.

The next step was to perform the actual file backups. I had a couple of options; BG-Rescue Linux comes with SMB and NFS support and also has cmdftp built in. Deciding to go for the quick-and-easy SMB share route, I hopped over to our new Dell server (running Red Hat 9) and set up a Samba share called, appropriately enough, disaster. Going back to the laptop, I accessed the share with smbclient, like so:

smbclient //xx.xx.xx.xx/disaster <password> 

where xx.xx.xx.xx was the Red Hat server's IP address. This dropped me into an FTP-like environment; it even had a similar command set (prompt, mget, mput). I was able to back up all of the necessary files and directory trees quickly and easily by turning on smbclient's recurse option to copy entire directory trees with one command. In fact, it would have been even easier if the smbfs filesystem was supported and smbmount was included in the command set for the distro--a suggestion for the next release of BG Rescue, perhaps?

So, now I'm writing this article on a backup laptop. My new one currently is on order. Both work and personal data has been recovered and dutifully backed up, the project manager was placated and I'm overall safe in the knowledge that I have come out pretty well from this potentially disastrous situation, thanks to Linux. More specifically, thanks to the maintainer of BG-Rescue Linux, an invaluable distro for this type of situation.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

URL change for BG-Rescue Linux

Bodo Giannone's picture

Hello,

first of all thank You very much for Your interests in BG-Rescue Linux and for linking my website.
Please update my URL to http://www.giannone.eu/rescue/current/

Thank You again,

Bodo Giannone

Windows XP rescued by Linux

Nikos's picture

I had a similar situation just a few hours ago. I found this page by searching for articles about "recover NTFS with Linux" and following a few links ;-)

My Windows XP installation on my dual boot PC (SuSE 10.2 and Windows XP SP2) refused to boot this morning. It just resulted in the PC freezing during the XP loading screen. Safe mode didn't help. I inserted the XP CD, booted and loaded the recovery console. chdsk didn't find any errors. So I thought "OK, big deal, I'll just delete C:\Windows and C:\Program Files along with every other Windows XP system file, rename C:\Documents and Settings to something else, reinstall XP on the drive and recover what I need from the renamed Documents and Settings folder". Sounds simple, doesn't it?

Well, no. The XP recovery console is a bad idea of a joke. It doesn't let you do anything. "Permission denied" errors all over the place. IT'S TOTALLY USELESS! Microsoft is busy providing bells and whistles instead of something useful.

Booted Linux, copied my C:\Documents and Settings on a Linux drive and reinstalled XP by formatting.

Microsoft might as well put the following text on the Windows XP retail box:

"If this software f**ks up, use Linux. We're too incompetent to implement even basic, simple recovery tools."

I have the same problem

Anonymous's picture

After uninstalling windows xp sp2 patch, i could not boot windows xp anymore, maybe a virus or files are corrupted. Then i tried a repair install, did not work either because it seems that windows cannot boot because I received a message like "windows\system32\config\system is missing or corrupt. I then did a fresh install out of despair, but then I realized that the new install will overwrite my personal map and documents. But it was too late i have replaced my old windows with a new windows but it won't boot either. I hooked on another hard drive with another windows xp, i notice that my personal map in the my documents and settings was still intact, but it is empty! it is probably password protected by my old windows xp, but i cannot get at my files, if i format the hard drive i will lose everything! I cannot repair or install the old windows xp installation, i have no knowledge of linux, how can I get my files back in my personal map? I know my password of the old windows xp installation, but i cannnot boot, what can i do?

Save my data by SuSE 9.2

Cosmo's picture

Once day's later i had problem with my 3 partition (2 FAT, 1 NTFS). My Win XP report boot sector failure... My previously installed SuSE 9.2 cannot boot... (LILO out of order :-) )I did repair this failure by booting Original SuSE CD1, repair instalation of SuSE... Firs step was LILO reinstall... Cool - That's clever. After this step i was promted to reboot PC... LILO was sucessfully repaired and renew access to my partitions and win XP was able to boot... Shortly LINUX IS BEST CHOICE FOR WORKING WITH COMPUTER...

Linux does not mount

al's picture

> My next step was to create the directory /mnt/win2k and mount my
> NTFS partition under that by running
> mount -t ntfs /dev/hda1 /mnt/win2k.
> Two seconds later, I had access to the entire NTFS directory tree.
> Things were finally starting to look positive.

I have the same error but knoppix whon't mount the partition ("bad superblock or ..."), it seems to be too damaged.
What to do now, are there tools out there to repair a corrupted ntfs filesystem with knoppix ? Or at least get the data?

Thanks
al

Re: 2.5" to 3.5" IDE adapters

Anonymous's picture

Who sells or where can I buy a 2.5" to 3.5" IDE adapter? I looked and can't locate one.

Thanks.

Re: 2.5

Anonymous's picture

Take a look on ebay there are literally LOADS!!!

Re: 2.5

Anonymous's picture

couple of links

http://www.sewelld.com/25to35ideconverter.asp

or
http://www.google.com/search?hl=en&ie=UTF-8&safe=off&q=2.5+inch+to+3.5+inch+IDE+adapter&spell=1

But the easiest way is to by a 2.5 inch to usb enclosure.

http://www.softwareandstuff.com/ACC10729.html

The price is right so to speak.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Well there's many rescue kits out there. The one I offer has been present for a long time :

http://crashrecovery.org/

It also does ntfs resizing, and ext2/ext3 resizing, but that only got some broader use and attention after I published some human readable documentation. credits should go to where credit are due. Sofar until this very day, i haven't charged a single user for the CRK. As a side note i mention that http://crashrecovery.org/ consists of 3 independant ftp/http servers, so that the offered docs and iso's are downloadable at all times.

cheers,

Robert
---
Robert M. Stockmann - RHCE
Network Engineer - UNIX/Linux Specialist
crashrecovery.org stock@stokkie.net

Did that already a long time ago :)

Anonymous's picture

A really long time ago (Around 5 to 6 years), where Win98 was still "hot", I deletes some of the important data, thanks to my second partition with a SuSE, I could recover everything and repair the erros.
Since then, whenever theres is any problem with windows, I always come with a bootable linux, because that "resuce cd" from windows its a laughing joke, and you actually pay for that ... whenever I think of that I really get so angry at Microsoft ...

Re: How Linux Saved My Files and My Job

Anonymous's picture

An even better distro for repairing windows due to corrpt files, bootload issues, viruses, etc. is Linux Defender Live. This is a bootable cd with the capability to scan hard drives for viruses, read and write NTFS drives and partitions, burn data to cd (if a burner is available), etc.

It beats any windows based recovery disks or cd's and it has a short learning curve for newbie's with no linux experience.

Floppy disks

Anonymous's picture

I've had a similar experience with floppy disks. My wife is a teacher and thanks to general lack of networking they store and transport pupil reports on floppy disks. On two occasions my wife has had fellow teachers despairing over a floppy that has the only copy of the reports (a week's work, due tomorrow) but is corrupt.

When this happens I stick the floppy into the drive and try mtools. When that doesn't work I use 'dd' to read it sector by sector and 'strings' to discover where the lost files are and what is still recoverable. Some files can be recovered completely. Others are corrupt and I have to employ "strings" to recover the unformatted text.

Paul.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Note mentioned is using CVS or SourceSafe. For code, that is the best. I've never run into the situation of loosing code (alright, at least important code). Even on personal projects, everything is backed up nightly or in a code repository somewhere.

I also gave up on Windows especially for Eclipse and NetBeans, you might as well use Linux in the first place. Even my laptop is Linux now.

Roy

Re: How Linux Saved My Files and My Job

Anonymous's picture

I have a feeling this could have been fixed from the Win2K Recovery Console with two simple commands... fixboot, fixmbr. I see this error all the time and those two commands usually do the trick... unless the hard drive is truly toast... in which case, no recovery floppy or cd can help.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Except that those 2 commands never work.

Re: How Linux Saved My Files and My Job

Anonymous's picture

I've salvaged files from otherwise "dead" floppy disks many times under Linux (probably close to 50% success rate); saved several people a lot of heartache by retrieving the files before destroying the disk. Apparently the Linux floppy driver doesn't give up as easily as the Windows' driver.

Re: How Linux Saved My Files and My Job

Anonymous's picture

> My next step was to create the directory /mnt/win2k and mount my NTFS
> partition under that by running mount -t ntfs /dev/hda1 /mnt/win2k. Two
> seconds later, I had access to the entire NTFS directory tree. Things
> were finally starting to look positive.

Sure, you had luck that some clever guys have reverse engineered the NTFS filesystem. What if it was encrypted by an undocumented or patented encryption.

Re: How Linux Saved My Files and My Job

Anonymous's picture

All your data are belong to us!

Re: Caldera DR-DOS

Anonymous's picture

Caldera's DR-DOS always craps out when it comes to EMS. I tried to play old DOS games with it only works with some of them. Wehn it comes to EMS it always craps out.

FreeDOS works much more smoothly, I've never had a problem with it. Try that the next time you have to use DOS.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Yeah, try a "new" WD 80GB hd, windows 2000 (not so professional) aka Windows no thank you... partitions and installs to the drive, all it's "files" after rebooting, same thing BSOD Inaccessible boot device. Tried their boot disk (WDC) apparently not compatible with windows 2000, so i used Linux install to partition and windows went as it usually does......

Strange aiy?

One Question

Anonymous's picture

Why were you running Eclipse under Windows in the first place? What does Eclipse on Windows do that Eclipse on Linux doesn't?

Re: How Linux Saved My Files and My Job

Anonymous's picture

I have good luck with "RIP" (short for Recovery Is Possible). It is a small distribution on a CD and includes a lot of functionality. It actually is running the 2.6.5 kernel ;-)

Re: How Linux Saved My Files and My Job

Anonymous's picture

I too had a similar problem, however I work at a tech shop, and one of the services we offer is data backups. I had a laptop delivered to me, and was told the harddrive was dead, and I was to reinstall Windows. I offered, for a small fee, to back up his HD, and went through the process you described. A week later, whilst picking through cables at my local PC shop, I found a laptop IDE to regular IDE adaptor. Needless to say its made my life much easier. I recomend you keep on handy just in case. They're a little hard to find, but they do exist.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Portable USB2 enclosures are readily available and cheap.

Put the drive in the enclosure, hotplug into your Linux box and you're away.

Another good prog

Anonymous's picture

Hey, anoyone out here wanna avoid this, I found a really great prog for stuff like this a while back. Look into EBCD. It's got password reset, MS-DOS prompts, etc..., and it's not a full CD...only about 50megs, so you can put a buncha other progs on it as well. I currently have it on my master system repair disc. Firewalls, system utils, that, C++ compiler, FTP prog, and adware/spyware scanner. Good for basic stuff...for everything else I've got 4 or 5 Linux LiveCDs :P

Re: How Linux Saved My Files and My Job

Anonymous's picture

Having recently done something like this with a failing WD 80GB drive on a PC by using a SuSE 8.0 install CD, seeing how others have resolved similar problems and the tools they've discovered is a way to increase my own options in the future.

When the disk failed WD's hardware tests, it was RMA'd but the new disk was sent to me before returning the old so I could try and capture data. Booting to the rescue OS on the SuSE CD, both disks were mounted. Trying to dd the old to the new failed with unrecoverable read errors. So fdisk output from the old disk was used to manually create partitions on the new disk. Then all partitions but the first (WinXP) were successfully copied using tar, one at a time. The first partition had a lot of errors, and wouldn't boot, but most of the user data files were there. Those were saved off to other partitions (Linux and fat32) for later recovery. (Note: fat32 partitions are the only kind I use for windows, so read/write operations from Linux are possible. If NTFS is writeable these days, I haven't heard about it yet...Linux is my second "language", mostly I work with Solaris).

After reinstalling WinXP to partition one, all the data files were there, but because of the stupid registry, reinstallation was required for applications anyone wanted to use. While it would be nice to know if that was really necessary, lack of time and interest preclude my learning any more about Windoze than absolutely necessary to keep my wife's applications running.

This would have been one horrendous mess if not for Linux being able to cut through the Windoze obstructions to getting things done.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Not sure what you mean about writing NTFS, but I do know I had a WXP box that I had set up to dual boot SuSE 8.1. I'd got some files I didn't want anyone to see, so I encrypted them in WXP with a 19 character password with upper/lower case, numerical and other non alphanumerical characters and avoided leet rules. I then put the encrypted files into a .zip file with a similarly secure password and, as a fina step, set the hidden bit on the file.
Playing about under Linux, I thought I'd see how it handled the files. It opened up the .zip file without prompting for a password and showed me the files inside without a second glance. Of course, I was impressed, but I was also dismayed that Linux would look straight through all the Windows security I put on. Needless to say, I use Linux tools to hide my files from prying eyes these days.

Re: How Linux Saved My Files and My Job

Anonymous's picture

I had similarly successfull results after an XP crash [Game dies, child pushes power off, power on], which resulted in "Unmountable boot volume", unrecoverable with any MS Windows tools I could find.

My task was a little easier, however, since I had a 2nd hard disc in the machine with Fedora Core 1 installed. Booting that, and fetching an ntfs file system mounter for FC1, allowed Linux to determine that the disc was physically perfectly fine, and to retrieve as much of the contents of the "dead" Windows disc as I wanted to the Linux disc.

If only the game ran under Linux......

Re: How Linux Saved My Files and My Job

Anonymous's picture

REQUIRED READING!

any sysadmin getting paid to do this stuff should file this article next to his/her RHCE/MSCE certificates!

i had the same experience and accomplished the same results.

thanks for a GREAT read!

Re: How Linux Saved My Files and My Job

Anonymous's picture

Yes, rescueing failing Windows workstation and (especially) notebook harddisks is a frequent task. Far too frequent. Just last friday I ended up recovering one 20GB bugger. It's partition table had been written over by God knows what, so I had to write a little C program to search for anything that looks like a beginning of a FAT or NTFS file system (the user didn't recall which one it was). Turned out there were two NTFS partitions and after I got the raw sector readings from the C program, it only took a brief experimentation with fdisk to get the partition table right and to be able to mount the filesystems.

I used Knoppix (http://www.knopper.de) for this. It is a bootable cd linux distro - complete with gcc, ntfs driver, network drivers, smbfs driver (I copied the stuff over with smbfs), sshd (handy when I wanted to check how the partition search and later copying was progressing), smarttools (for accessing the harddisk SMART self diagnostics), even RW ntfs driver (http://captive.sf.net). Best of all, everything is autoconfigured, down to getting ip from dhcp server.

There's absolutely no reason to limit oneself to a floppy distro, a cd distro has it all. KDE, browser... everything.

PS: I agree the 2.5" -> 3.5" adapter can turn in handy at times.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Goot tool for searching partition signatures and recovering partition boundaries is gpart - http://www.stud.uni-hannover.de/user/76201/gpart/
Helped me a lot once.

Re: How Linux Saved My Files and My Job

Anonymous's picture

There's absolutely no reason to limit oneself to a floppy distro?

There are systems that will not boot from CDROM drives.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Even then you can boot from floppy to the cd-based distro.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Well, you may be able to boot from CD but I cannot do that. And I bet I am not the only one.

This advent PC (4-5 years old) doesn't recognize the CDROM at boot time even when the CD does appear in the BIOS as the first boot device.

I tried smart boot manager (kind of grubby floppy which would let me boot from CD) but to no avail. I may have to tweak the I/O ports of the CD so this boot manager can see the CD.

http://btmgr.sourceforge.net/download.html

So, no. Do not make assumptions. I can only boot from floppy and this one will *hopefully* do the trick.

What I need is a floppy distro with NTFS support and (USB or NetWork) connectivity. Let me explain why:

I am helping a friend whos WXP system is not booting (actually it keeps on rebooting but getting nowhere). There is some "lsass.exe sytem error" popup which I have already investigated. I will have to either:
a) fix the registry
or
b) transfer files and reinstall

(a) is documented in M$ technet but it may even not work
(b) is safe but then he will need to reinstall everything (software, updates, etc...)

I need to be able to:
1) boot from floppy
2) copy files across to my Linux or FreeBSD boxes
3) attempt the registry modifications

I take for granted a network connection will not be a problem with 99.99% of floppy distros but then I have to see what way I can copy the files (samba, NFS, ftp, USB external HD...) and this is something that totally depends on what software is available on the floppy and what a typical floppy-distro kernel supports.

Also NTFS support may not exist on on old distros. This support has been for RO mounts only for some time and only recently added full reliable RW support with ntfsprogs.

http://www.linux-ntfs.org/

Re: How Linux Saved My Files and My Job

Anonymous's picture

I agree, laptop HDD recovery is a common task.

KNOPPIX, the CDROM you used, has a program called testdisk (or is it disktest?) that does what youv've described. Scans the whole disk looking for lost partition types, and can rebuild the partition table for you.

Mind you, the one time I used it, it kept finding OS/2 when I know there wasn't... but I was able to recover the actual NTFS partition OK.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Well, I was almost sure that there was a at least a dozen program for scanning for partitions. I just couldn't name any off hand. Writing the program was fun, though :).

For the another poster: in case you don't have cd drive, an external usb cd-drive is useful. These days cd drives are beginning to be more common than floppy drives, though.

Re: How Linux Saved My Files and My Job

Anonymous's picture

I would bet that particular thinkpad did not have a CD-ROM drive.

That said, I know people that regularly boot a Knoppix CD when they need to remove a huge directory hierarchy (on FAT ). The overhead is negligible to the time win$ need to perform that task.

Typical scenario

Anonymous's picture

Typical scenario. Windows rescue utilities aren't worth a dime when you need them. They always exit on the smallest of errors, while at the same time linux utilities always try to read through the crap or have options to force whatever you want to do.
Let this be a lesson... take periodic backups... Just write some scripts to do it automatically (you can use e.g. cygwin)
In the Windows world you have to "triple guarantee" (I quote a famous person) that you won't have data loss.
There's a reason I'm paranoid about this. Because I've been there many times. Enough to know for certain that you should not rely on the reliability of windows or your hardware.
You were in luck that none of the important data was damaged.

Re: How Linux Saved My Files and My Job

Anonymous's picture

Just a tip:
Do you have tried a 2.5" to 3.5" adapter? with this you can mount the laptop drive on a normal PC and you can try your rescue on the PC and recover your data...
I have do that to install a Debian woody to an old Toshiba laptop without a CDROM

Mauricio Flores
From Mexico...

Re: How Linux Saved My Files and My Job

Anonymous's picture

Hi,

Thanks for the tip! I didn't have one available at the time, unfortunately :(

Rory

Re: How Linux Saved My Files and My Job

Anonymous's picture

Other handy linux-based rescue disks:

System Rescue CD: Has 'partimage', a Ghost clone that'll let you upload/download images via ftp/ssh/etc. (also contains QTParted and memtest86+)

PLD Rescue CD

Knoppix

Re: How Linux Saved My Files and My Job

Anonymous's picture

Been there me too. I tried the XP recovery CD first, but amazingly, the only option was to throw everything on the disk out with the dishwater and reinstall everything from scratch. Huh? Isn't my work woth anything? (As if MS thinks that all a Windows user does is to play games, chat on the net and surf for p**n.)

Well, I just inserted the Knoppix CD, waited, and everything came up, including the network. A 'mount -t smbfs //server/share /mnt/new -o username=myname,passwd=*****' made me immediatly able to just use 'cp -a /mnt/hda1 /mnt/new' and wait. (Actually I didn't copy everything, but it was easy.)

Re: How Linux Saved My Files and My Job

Anonymous's picture

Much better options in my opinion. I don't own a machine with a floppy drive, so floppy-based solutions are completely out of the question for me.

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre><tt> <ul> <ol> <li> <dl> <dt> <dd> <i> <b><blockquote>
  • Lines and paragraphs break automatically.
  • Use to create page breaks.

More information about formatting options