LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   data rescue from Knoppix (https://www.linuxquestions.org/questions/linux-newbie-8/data-rescue-from-knoppix-643536/)

nnjond 05-20-2008 11:00 AM

data rescue from Knoppix
 
Hi,Can anyone help me?

All my partions show up as hdcx on the desktop in Knoppix, as well as my Fat32 ancillary drive hdd. When I click on mount hdd i get an error message:

Could not mount device.
The reported error was:
mount: I could not determine the filesystem type, and none was specified

What should I do to acces the data?

Thanks

GrapefruiTgirl 05-20-2008 11:22 AM

For starters, read the man page for the 'mount' command, and verify that you are using it correctly, including the filesystem type that is on the drive you want to mount. Using a complete and correct mount command, specifying mount point, filesystem-type, and options, should mount the drive, unless the partitions are so totally trashed that the filesystem cannot be mounted; if that is the case, you would be in need of some low-level direct method of accessing the drive to recover stuff, which is both out of the scope of this thread, and beyond my abilities to help you with.

Check your /etc/fstab file on the Knoppix and see what it lists as filetypes, if anything, to try when mounting the drive in question. For example, if the filesystem of the drive you want to mount is Ext2, then the line in the fstab file for that drive should have Ext2 as one of the options to use.

Read the man page for 'fstab' for further info on this file and its options.

Best of luck :)

SVA

nnjond 05-20-2008 12:32 PM

Getting warmer
 
Thanks for your help; I'm just fleeing MS, I don't really no what i'm doing.

"Check your /etc/fstab file on the Knoppix and see what it lists as filetypes, if anything,"

My ancillary drive doesn't show up in Ubuntu or Win 2k. My Knoppix is a live cd. Is that what you were asking?


knoppix@Knoppix:~$ man
What manual page do you want?
knoppix@Knoppix:~$ mount
/dev/root on / type ext2 (rw)

This last (1st) line seems to refer to my hdd and,

knoppix@Knoppix:~$ /dev/root on / type ext2 (rw)
bash: syntax error near unexpected token `('

knoppix@Knoppix:~$ su fstab
Unknown id: fstab
knoppix@Knoppix:~$ sudo fstab
sudo: fstab: command not found


Should I understand what "id" is refered to here?

GrapefruiTgirl 05-20-2008 12:40 PM

Try 'man mount' and 'man fstab' to read the man pages. Use SPACE to go to the next page, B for back, and Q to exit the manual.

Also, when you type 'mount' by itself, it shows you what drives are mounted already.

As it's a live CD, knoppix in particular, there is no root password (at least on my Knoppix) to to become root, type 'sudo konqueror' to get a filemanager as root, then navigate to the /etc folder and open the fstab file in a text editor, if you want to edit it or examine it.

Once you read the man page for mount, or type 'mount --help' you will see examples of how to mount various devices. Follow the examples to mount the drive you want.

Sasha

Wim Sturkenboom 05-20-2008 12:48 PM

Type in a terminal
man mount to read the man page for mount
cat /etc/fstab to view the content of fstab (it's a small file); post output here if you don't come right

fdisk -l (this is a lower case L) to see which harddisks there are; post output here if you don't come right


mkdir /abc to create a directory for a mountpoint
mount -t vfat /dev/hddX /abc to mount hddX on /abc (replace X by a number like 1 (for first partition) that was displayed using the fdisk command above); vfat only applies for your fat partition
ls -l /abc to see the content of the mounted partition

Hope it helps

nnjond 05-20-2008 02:00 PM

Is there no easier way of retrieving some data from a hard drive sitting on my desktop? I can't make sense of the 1400 lines of "man mount"; but this is what I've discovered...


knoppix@Knoppix:~$ cat /etc/fstab
/proc /proc proc rw,nosuid,nodev,noexec 0 0
/sys /sys sysfs rw,nosuid,nodev,noexec 0 0
/dev/shm /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0
/dev/pts /dev/pts devpts mode=0622 0 0
/dev/fd0 /media/fd0 auto user,noauto,exec,umask=000 0 0
/dev/cdrom /media/cdrom auto user,noauto,exec,ro 0 0
/dev/hda /media/hda auto users,noauto,exec,ro 0 0
# Added by KNOPPIX
/dev/hdc1 /media/hdc1 ntfs noauto,users,exec,umask=000,uid=knoppix,gid=knoppix 0 0
# Added by KNOPPIX
/dev/hdc3 /media/hdc3 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hdc4 /media/hdc4 vfat noauto,users,exec,umask=000,shortname=winnt,uid=knoppix,gid=knoppix 0 0
# Added by KNOPPIX
/dev/hdc5 /media/hdc5 auto noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hdc6 none swap defaults 0 0
# Added by KNOPPIX
/dev/hdc7 /media/hdc7 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hdd /media/hdd auto noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sda1 /media/sda1 vfat noauto,users,exec,umask=000,shortname=winnt,uid=knoppix,gid=knoppix 0 0
knoppix@Knoppix:~$


knoppix@Knoppix:~$ fdisk -l
knoppix@Knoppix:~$
knoppix@Knoppix:~$ mkdir /abc
mkdir: cannot create directory `/abc': Permission denied

GrapefruiTgirl 05-20-2008 05:21 PM

# Added by KNOPPIX
/dev/hdd /media/hdd auto noauto,users,exec 0 0


The above lines are from the fstab file you posted above. Knoppix for whatever reason did not identify a file system type for that drive.

Let's say then, for example, that hdd is your fat drive (I don't know if it really is or not), and you want to mount it on /media/hdd. Here's a basic mount command that should work:
Code:

mount /dev/hdd /media/hdd -t vfat -o ro
So the example here, tells the system to mount /dev/hdd onto /media/hdd with a file system type of vfat (for FAT) and the final -o ro is for read-only. Assuming that hdd is actually your fat partition, it should mount. if it does not, then it is either the wrong partition, the wrong drive, or I have used an incorrect syntax in my example command.
If you get an error after having tried this, post us the error.


While there may be 1400 pages to man mount, the first couple (as I recall) give basic syntax of the mount command (as does typing "mount --help") while the rest is clearly divided into sections, one section per mount option or file system type. It's one of the better man pages out there. When it comes to man pages, more is generally better, particularly when it is formatted as well as this one is. Some man pages are sparse and totally non helpful.
If you were to pull up the man pages for mount, and advance the pages until you get to the section for VFAT/FAT32/FAT16 (or whatever its title is) you would then see the possible options you can use when mounting a fat volume.

For the record, I don't believe you mentioned earlier why exactly you are trying to 'recover data'. Is it that the partitions were damaged? Or are you simply trying to access the data, and it is not in fact 'lost' or 'damaged'?? Please explain.

SVA

nnjond 05-21-2008 01:17 AM

Thanks for your cont support

In my flight from 'subjugating' softsware, I am attempting a halfway position where I have access to my data drive from Win 2k, Hardy and openSuse on my Primary drive. Foolishly messing around with the new Hardy install disk, I lost access to my data drive. Now I want to take advantage of this sit by retreiving the valuable data and installing a larger ancillary drive.

I would like to be able to 'configure' things for myself but finding time is not easy. Here is my latest obstacle. As I understand it, Knoppix Live should have bypassed problem. I hope you can advise me.


knoppix@Knoppix:~$ mount /dev/hdd /media/hdd -t vfat -o ro
mount: only root can do that
knoppix@Knoppix:~$ su mount /dev/hdd /media/hdd -t vfat -o ro
su: invalid option -- t
Usage: su [options] [LOGIN]

Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and keep
the same shell
-s, --shell SHELL use SHELL instead of the default in passwd

Wim Sturkenboom 05-21-2008 02:14 AM

1a) su - root
1b) enter root password (on a liveCD probably either empty or the same as the username)
2) your mount command

nnjond 05-21-2008 03:25 AM

??? As I understand it, my hdd is fat32

knoppix@Knoppix:~$ su
root@Knoppix:/ramdisk/home/knoppix# mount /dev/hdd /media/hdd -t vfat -o ro
mount: wrong fs type, bad option, bad superblock on /dev/hdd,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

root@Knoppix:/ramdisk/home/knoppix# dmesg | tail
eth0: Media Link On 100mbps full-duplex
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
Mobile IPv6
eth0: Media Link On 100mbps full-duplex
eth0: no IPv6 routers present
FAT: invalid media value (0xb9)
VFS: Can't find a valid FAT filesystem on dev hdd.
FAT: invalid media value (0xb9)
VFS: Can't find a valid FAT filesystem on dev hdd.
root@Knoppix:/ramdisk/home/knoppix#

Wim Sturkenboom 05-21-2008 04:00 AM

I think it must be /dev/hdd1 (as the first partition)

What 'worries' me is that fdisk -l does not give any output. It brings the thought that you might be using an old Knoppix version (although it still should recognize an old IDE drive). Maybe you must be root for that as well.

Question:
You're running Hardy? Can't you use the Hardy install disk to access the drives?

nnjond 05-21-2008 04:38 AM

It seems to have just got more complicated.

root@Knoppix:/ramdisk/home/knoppix# mount /dev/hd
d1 /media/hdd -t vfat -o ro
mount: wrong fs type, bad option, bad superblock
on /dev/hdd1,
missing codepage or other error
(aren't you trying to mount an extended pa
rtition,
instead of some logical partition inside?)
In some cases useful info is found in sysl
og - try
dmesg | tail or so

root@Knoppix:/ramdisk/home/knoppix# mount /dev/hd
d1 /media/hdd1 -vfat -o ro
Usage: mount -V : print version
mount -h : print this help
mount : list mounted fi
lesystems
mount -l : idem, including
volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somew
here'.
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 dev ice 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 dev ice.
One can also mount an already visible directory t ree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
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 passwd fd].
For many more details, say man 8 mount .
root@Knoppix:/ramdisk/home/knoppix#

I was advised that (this is the latest) knoppix is the best rescue disk. I daren't put Hardy back in the draw: did it alter my file sys?

Wim Sturkenboom 05-21-2008 05:23 AM

And fdisk -l (lower case L), ran as root? What's the output?

nnjond 05-21-2008 06:16 AM

root@Knoppix:/ramdisk/home/knoppix# fdisk -l

Disk /dev/hdc: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 3666 29439112 7 HPFS/NTFS
/dev/hdc2 3666 6944 26338536+ f W95 Ext'd (LBA)
/dev/hdc3 8247 10011 14177362+ 83 Linux
/dev/hdc4 6945 8246 10458315 b W95 FAT32
/dev/hdc5 3666 3927 2104483+ 82 Linux swap / Solaris
/dev/hdc6 3928 4189 2104483+ 82 Linux swap / Solaris
/dev/hdc7 4190 6536 18852246 83 Linux

Partition table entries are not in disk order
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)

Disk /dev/hdd: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 2 19457 156280320 f W95 Ext'd (LBA)
root@Knoppix:/ramdisk/home/knoppix#


Thanks again.

Wim Sturkenboom 05-21-2008 06:37 AM

OK, I think that we're getting somewhere.

I see a hdc4 FAT partition and a hdd1 extended; there are however no logical partitions in hdd1.

If you state that hdd is your data disk, you should start looking for data recovery programs. Some are mentioned in this thread

If hdd was not your data disk, you can partition it and add a logical partition.

nnjond 05-21-2008 07:21 AM

I'm afraid hdd is my data drive. So can it be mounted? Is that relevant to a data recovery attempt? Ideally I would be able to look into the drive and just select the most recent, unbacked-up data.

Thanks for your help.

Wim Sturkenboom 05-21-2008 08:00 AM

As far as I know:
To mount it, you need a file system on it. Recovery software does a lower level access so does not need to mount it.

See the other thread that I gave you for data recovery. There are more threads and you can also find info on the internet by looking for data recovery software.


All times are GMT -5. The time now is 08:52 AM.