Solved

recover data from external ext3FS (ubuntu)

Posted on 2008-06-14
15
823 Views
Last Modified: 2013-11-15
I need to recover important data that I stored on user's desktop on UBUNTU OS. The ubuntu OS is installed alone on external HDD (30 GB). I used to boot from the external HDD fine. But now, it gives (grub 1.5 loading... error 17).
Now I have both WinXP (NTFS) + UBUNTU (ext3) + extra partition (FAT32) all are on the internal HDD. However, the new (internal) UBUNTU doesn't show the external HDD so I can recover my files. And on the XP I can see the external HDD on disk management. But, even with using (ext3) reader I couldn't access the external HDD.
I'm looking for a way to fix the external HDD so it can't boot again. Or a way to recover my data.
To run a command as administrator (user "root"), use "sudo <command>".

See "man sudo_root" for details.
 

ali@goldeneye-linux:~$ sudo fdisk -l

[sudo] password for ali: 
 

Disk /dev/sda: 60.0 GB, 60011642880 bytes

255 heads, 63 sectors/track, 7296 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x92279227
 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1        2550    20482843+   7  HPFS/NTFS

/dev/sda2            2551        6197    29294527+   c  W95 FAT32 (LBA)

/dev/sda3            6198        7296     8827717+  83  Linux
 

Disk /dev/sdb: 30.0 GB, 30005821440 bytes

255 heads, 63 sectors/track, 3648 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00006ce4
 

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1   *           1        3492    28049458+  83  Linux

/dev/sdb2            3493        3648     1253070    5  Extended

/dev/sdb5            3493        3648     1253038+  82  Linux swap / Solaris

ali@goldeneye-linux:~$

Open in new window

diskmanage.jpg
0
Comment
Question by:sniper038
  • 9
  • 6
15 Comments
 
LVL 87

Expert Comment

by:rindi
Comment Utility
make a mount point for the external disk (ie /media/sdb1). Then mount those two partitions (mount /dev/sdb1 /media/sdb1). If that works without errors you should now have access to the linux partition via /media/sdb1.
0
 
LVL 3

Author Comment

by:sniper038
Comment Utility
as a limited user with linux, I still searching for how to make a mount point!
0
 
LVL 87

Expert Comment

by:rindi
Comment Utility
sudo mkdir /media/sdb1
0
 
LVL 3

Author Comment

by:sniper038
Comment Utility
output:

ali@goldeneye-linux:~$ mount /dev/sdb1 /media/sdb1
mount: only root can do that
ali@goldeneye-linux:~$ mount /dev/sdb1
mount: can't find /dev/sdb1 in /etc/fstab or /etc/mtab
ali@goldeneye-linux:~$ mount /media/sdb1
mount: can't find /media/sdb1 in /etc/fstab or /etc/mtab
0
 
LVL 87

Expert Comment

by:rindi
Comment Utility
sudo mount /dev/sdb1 /media/sdb1
0
 
LVL 3

Author Comment

by:sniper038
Comment Utility
ali@goldeneye-linux:~$ sudo mount /dev/sdb1 /media/sdb1
[sudo] password for ali:
mount: you must specify the filesystem type

i gave it a try, but seemed wrong (see code)


ali@goldeneye-linux:~$ sudo mount /dev/sdb1 ext3 /media/sdb1

Usage: mount -V                 : print version

       mount -h                 : print this help

       mount                    : list mounted filesystems

       mount -l                 : idem, including volume labels

So far the informational part. Next the mounting.

The command is `mount [-t fstype] something somewhere'.

Details found in /etc/fstab may be omitted.

       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab

       mount device             : mount device at the known place

       mount directory          : mount known device here

       mount -t type dev dir    : ordinary mount command

Note that one does not really mount a device, one mounts

a filesystem (of the given type) found on the device.

One can also mount an already visible directory tree elsewhere:

       mount --bind olddir newdir

or move a subtree:

       mount --move olddir newdir

One can change the type of mount containing the directory dir:

       mount --make-shared dir

       mount --make-slave dir

       mount --make-private dir

       mount --make-unbindable dir

One can change the type of all the mounts in a mount subtree

containing the directory dir:

       mount --make-rshared dir

       mount --make-rslave dir

       mount --make-rprivate dir

       mount --make-runbindable dir

A device can be given by name, say /dev/hda1 or /dev/cdrom,

or by label, using  -L label  or by uuid, using  -U uuid .

Other options: [-nfFrsvw] [-o options] [-p passwdfd].

For many more details, say  man 8 mount .

Open in new window

0
 
LVL 87

Expert Comment

by:rindi
Comment Utility
sudo mount -t ext3 /dev/sdb1 /media/sdb1
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 3

Author Comment

by:sniper038
Comment Utility
@rindi
it seems something is missing!!

output:
ali@goldeneye-linux:~$ sudo mount -t ext3 /dev/sdb1 /media/sdb1
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

ali@goldeneye-linux:~$ /dev/sdb1 /media/sdb1 auto defaults 0 0
bash: /dev/sdb1: Permission denied

ali@goldeneye-linux:~$ /dev/sdb1 /media/sdb1 ext3 defaults 0 0
bash: /dev/sdb1: Permission denied


BTW the OS on external HDD has a user & password do we need those info?
0
 
LVL 3

Author Comment

by:sniper038
Comment Utility
how bout reinstalling UBUNTU on the external HDD? is it possible to have the system run again with out deleting my files?
0
 
LVL 87

Accepted Solution

by:
rindi earned 350 total points
Comment Utility
There is probably a problem with the HD, like the filesystem got corrupt or something similar. First test the disk using the HD manufacturer's utility, and allow that tool repair any errors it finds, if it can. In order to be able to use the testing utility, remove the HD from the external enclosure and connect it directly to the PC. You'll find the utilities on the UBCD.

http://ultimatebootcd.com

After that run sudo e2fsck -p /dev/sdb1

and after that again try mounting the drive.
0
 
LVL 3

Author Comment

by:sniper038
Comment Utility
yeah indeed the HD is corrupted. Before reading rindi's previous post, I was already trying (DiskInternals Linux Reader). And it didn't read anything! But the (DiskInternals Linux Recovery) was able to recover all files I was concern about. However, it doesn't support non english file names (it uses some unknown characters).
Anyway, few Gig's are being recovered. And I won't stop, will continue trying to bring the HD to life again :D
0
 
LVL 3

Author Comment

by:sniper038
Comment Utility
OK... some new news

the external HDD is internal now. I used Hiren's boot CD. The HDD for Fujitsu was successful. It has no error.
In addition, my recovery process using (DiskInternals Linux Recovery) has stopped in the middle. It can't recover the rest of my data (it takes so long time, freezes, and recovers zero byte data).

@rindi
where there was no error with the HDD, commands can't be applied yet!
I think we need to fix the boot loader. Is there any tool for fixing GRUB?. I've seen some tools on Hiren's All in 1, those for MBR fixing will they help? which one to use?
Or do I go with reinstalling UBUNTU idea?

any clue?
0
 
LVL 3

Author Comment

by:sniper038
Comment Utility
find attached screen shoot, when I wanted to reinstall. I think reinstalling without formatting is impossible!
damn it, each OS and each software has its own look, for this HDD!!!
Screenshot-Install.png
0
 
LVL 87

Expert Comment

by:rindi
Comment Utility
I don't use or have hiren's CD as it uses some pirated software illegally, while the software on the UBCD is completely legal. You can try fixing grub by booting your ubuntu CD, it should have an option for that (or use it to start into recovery mode). The mbr tools probably won't help. Also I don't think installing ubuntu without formatting is a good idea as it will still overwrite some of your data.
0
 
LVL 3

Author Comment

by:sniper038
Comment Utility
I was able to recover some of my files using recovery software. Files were recovered from the hard disk as a RAW HDD.
anyway, I think I can't go any further. And the HDD can't be fixed. I'm some how satisfy with the recovered data and will try to format the hard disk soon.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Bellevue, WA, USA; Late December, 1980 "OK, folks, we nailed the IBM contract. We're going to have many meetings like this to discuss features and functions...and how to move from 86-DOS, the CP/M clone we just purchased, to our baby, MS-DOS. Thi…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now