LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-29-2007, 06:55 AM   #1
dlackovic
Member
 
Registered: Nov 2005
Location: Erie Pa
Distribution: Suse 10.3, Ubuntu 9
Posts: 46

Rep: Reputation: 15
Help restoring deleted files/ mount question


Hi all,

I'm pretty sure I've done something horribly wrong, and I'm hoping that one of you can help me fix it.
Over the weekend, I decided to update my x86_64 system from suse 10.2 to suse 10.3. The update failed, and I ended up with a brick. So I tried to reinstall Suse 10.2. That worked...to a degree (I got console access at least.)

So, knowing that I'd probably have to do a clean install to get things working again, I copied my home directory to what I thought was my secondary hard drive, which I use for my music collection. I had the secondary hdd mounted at /music

I did a fresh install, and everything's working. Except when I mounted the secondary hdd, I found it to be blank.

I'm thinking that perhaps I mounted it incorrectly, and rather than storing all my music on this secondary drive, it was still sitting on the primary?

So here are my 2 questions:
1. is there any way to try to recover any of the data from my original (and now formatted) home directory?

2. how should I go about properly mounting this secondary drive. I was using the partitioner bit out of Yast.

Thanks for all your help!
 
Old 10-29-2007, 07:18 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
1. is there any way to try to recover any of the data from my original (and now formatted) home directory?
... um... it is technically possible with serious forensics.

Quote:
2. how should I go about properly mounting this secondary drive. I was using the partitioner bit out of Yast.
... "partitioner bit out of YaST"? You mean where it assigns mountpoints during installation? You probably accidentally told it to format the partition too. Read carefully.
 
Old 10-29-2007, 07:47 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
/music is not a folder in the standard directory tree. It exists only if created by the user (including the root user).

On re-installing 10.2, if /music exists, then you created it during the re-instllation. If it shows up in /etc/fstab, then you created it during re-installation. You may have overlooked the format and filesystem type options in the screen in which you designated /music as a mount point. It may be possible to recover with *serious forensics* as Simon Bridge says.

On the other hand, if /music did not exist after re-instlaling 10.2, and you had to manually create the folder again to serve as mount point for the second drive, it's probably safe and sound. It becomes a matter of properly mounting the partition to see what's there.

You don't say what tools you have used to view that partition on the second drive, nor do you say what commands (if working at the command line) you have used to try to mount the partition, so it isn't possible to tell if you have/have not properly mounted the partition on the second drive.

The important thing to do immediately is to prevent disk writes to that second drive. Remove it (or comment out) the entry in /etc/fstab.

As root, umount /music (in case it is mounted).

That will preserve it in it's present state. Data recovery depends on keeping it that way until you have the tools to attempt data recovery.

Then point your browser at www.google.com/linux, search for: "data recovery" format. Start searching for ways and means to recover the second disk.

But first, let's prove there is need. Re-read paragraphs 2, 3, and 4 above, and provide more info.

Last edited by bigrigdriver; 10-29-2007 at 07:54 AM.
 
Old 10-29-2007, 07:58 AM   #4
dlackovic
Member
 
Registered: Nov 2005
Location: Erie Pa
Distribution: Suse 10.3, Ubuntu 9
Posts: 46

Original Poster
Rep: Reputation: 15
I did have to remap the secondary drive after the fresh install. And I did this using the partitioner in Yast. I set the mount point again at /music and did not reformat that drive. I'm still not seeing anything when I navigate to it though.
it's device name is /dev/sda1

I only know a few basic console commands, so I'm not sure how to do any mounting that way without a tutorial in front of me.

How can I go about checking that drive for data?
 
Old 10-29-2007, 08:15 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,491

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
To see what partitions exist try "/sbin/fdisk -l" (lower case ell).
 
Old 10-29-2007, 08:20 AM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
I'm getting confused. If /music is /dev/sda1, then what is the /dev/xxxx for the partition in which you installed 10.2 (xxxx is for hdax or sdax or whatever)?
 
Old 10-29-2007, 09:27 AM   #7
dlackovic
Member
 
Registered: Nov 2005
Location: Erie Pa
Distribution: Suse 10.3, Ubuntu 9
Posts: 46

Original Poster
Rep: Reputation: 15
my /music drive is a pata drive, so it got the sda moniker...the primary partition is a sata drive and it's sdb
 
Old 10-29-2007, 11:06 AM   #8
enemorales
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410

Rep: Reputation: 30
There is also another (unfortunately worse) possibility: that you are mounting the partition correctly NOW, but you DID NOT MOUNT IT BEFORE the reinstallation. That is: you saved your files in a /music folder in the (let's say) "old system's" partition and the "music" partition was never mounted/used. Is that possible?
 
Old 10-29-2007, 11:55 AM   #9
dlackovic
Member
 
Registered: Nov 2005
Location: Erie Pa
Distribution: Suse 10.3, Ubuntu 9
Posts: 46

Original Poster
Rep: Reputation: 15
enemorales, I'm very worried that this is exactly the case. That's why I was also asking how to mount a drive, because my primary partition was more than large enough to hold all the data that should have been in the /music drive.

If I unmount the /dev/sda1, I shouldn't see any data in /music, right?
 
Old 10-29-2007, 12:40 PM   #10
enemorales
Member
 
Registered: Jul 2004
Location: Santiago, Chile
Distribution: Ubuntu
Posts: 410

Rep: Reputation: 30
If you unmount /dev/sda1, then you will get a regular folder /music, where you can put whatever you want (as long as you have the permissions). When you mount /dev/sda1 on /music then contents of the folder cannot be accessed, but remain there. (At least it was like that some years ago, when I was learning this mount/unmount thing.)

If you saved your files in /music and /dev/sda1 was not mounted on that folder, and since you formatted the system partition, then I'm afraid that you have lost your files. There are some tools to try to retrieve them, but you probably know what that means...
 
Old 10-29-2007, 12:52 PM   #11
dlackovic
Member
 
Registered: Nov 2005
Location: Erie Pa
Distribution: Suse 10.3, Ubuntu 9
Posts: 46

Original Poster
Rep: Reputation: 15
Ok, so It sounds like I'm going to have to try to recover lost data. I've done this on windows, but never on linux. Can anyone recommend a good program to use? If indeed the /music drive is really blank, I can use that to install a new system thus leaving the primary partition free and unmounted so that I can do recovery stuff.

Is there an easier way? Maybe load the software and OS onto a flash drive?
Are there any live disks that I could download to allow access to that drive?
Or should I try to install windows on the /dev/sda1 and run recovery tools?

Last edited by dlackovic; 10-29-2007 at 02:13 PM.
 
Old 10-29-2007, 05:46 PM   #12
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
Ok, so It sounds like I'm going to have to try to recover lost data. I've done this on windows, but never on linux. Can anyone recommend a good program to use?
If the lost data was on a ext3 partition, then you are stuck with grep. ext2, fat32, have a range of recovery suites for the googling.
 
Old 10-30-2007, 08:49 AM   #13
dlackovic
Member
 
Registered: Nov 2005
Location: Erie Pa
Distribution: Suse 10.3, Ubuntu 9
Posts: 46

Original Poster
Rep: Reputation: 15
I'm pretty sure it was either reiserfs or ext2.
 
Old 10-31-2007, 10:37 AM   #14
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
With reiserfs, you are in worse condition that ext3. But ext2 has recovery tools.
http://recover.sourceforge.net/linux/recover/
 
Old 11-22-2007, 04:19 PM   #15
dlackovic
Member
 
Registered: Nov 2005
Location: Erie Pa
Distribution: Suse 10.3, Ubuntu 9
Posts: 46

Original Poster
Rep: Reputation: 15
Hi all,

Thanks for your help. I ended up being able to recover almost everything. I downloaded a couple of live cds RIPLinux and the Ultimate Backup CD and used them to restore the deleted reiserfs partition, and then I found a tutorial here on linuxquestions detailing how to rebuild a destroyed reiser partition. All in all it was pretty painless once I sat down to do it, and the important things were saved.
 
  


Reply

Tags
data, format, partition, recovery


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mepis, copy files to thumb drive, files deleted? vremenno Linux - Newbie 6 09-16-2006 12:21 AM
Restoring deleted files on ext3 jaa1180 Fedora 5 05-07-2006 11:19 PM
Restoring files j61396 Linux - Newbie 1 10-27-2004 01:52 PM
deleted xinetd, need help restoring bigVoice Mandriva 2 01-16-2004 08:27 AM
accidentally deleted files--need help restoring on reiserfs darksarin Linux - General 4 11-23-2003 08:13 PM


All times are GMT -5. The time now is 01:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration