| View previous topic :: View next topic |
| Author |
Message |
reup
Joined: Thu Apr 28, 2005 9:04 pm Posts: 31
|
Posted: Thu Apr 28, 2005 9:10 pm Post subject: filename with ? how to fix this |
|
|
hello,
I have a canon a300 camera and a media card with 32mb of photos that I cannot get because the name of the folders is corrupted with few ? in the name
I have bought a card reader/writer to be able to mount the memory card on my linux box (gentoo) and I can effectivly see the folder name. d?im? instead of dcim. it is seen as a file of 0 byte but the camera shows an occupation of 30mb.
is there a tool to access the filesystem and rename the folders (some hexadecimal soft)
thanks
PS: I had a login and posts on this website, but since the remake of it, my account and post where gone
reup |
|
| Back to top |
|
 |
Nigel LXF regular

Joined: Fri Apr 08, 2005 9:03 pm Posts: 1141 Location: Gloucestershire, UK
|
Posted: Thu Apr 28, 2005 9:33 pm Post subject: RE: filename with ? how to fix this |
|
|
If you're using KDE, have you tried just accessing it using Konquerer ? CLick on the directory name and see if you can get at the photos inside it...
Another possibility is to try to rename the directory from a command prompt. Open a bash shell, mount the card, cd to it and then try typing
mv d
then press <tab> to get bash to autocomplete and add a space
then type
dcim
and press Return.
With a bit of luck you should then have a directory called dcim again. _________________ Hope this helps,
Nigel. |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7993 Location: Warrington, UK
|
Posted: Thu Apr 28, 2005 10:10 pm Post subject: RE: filename with ? how to fix this |
|
|
You can also type \? to give a ? character in the filename. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
reup
Joined: Thu Apr 28, 2005 9:04 pm Posts: 31
|
Posted: Fri Apr 29, 2005 8:43 am Post subject: RE: filename with ? how to fix this |
|
|
try all of this (should have tell it before) konqueror and nautilus do not see the directory, bash see it but when trying to do it I get "cannot stat no such file or directory"
escaping the ? does not work ether. I beleive that only at hexadecimal level will I be able to fix this but any other solution very much welcome
reup |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7993 Location: Warrington, UK
|
Posted: Fri Apr 29, 2005 9:09 am Post subject: RE: filename with ? how to fix this |
|
|
Can you access any files on the camera? Does
copy the files? change /mnt/cf to the mount point of your card reader.
If not, I suspect that either the filesystem is corrupt or you are trying to mount it with the wrong filesystem module (e.g. msdos instead of vfat).
The first thing I'd do is copy the files using gphoto (or camera:/ in Konq's location bar) to make sure they are safe. Then try different options for mounting the card. If all else fails, and you have copied the photos, try reformatting the card in the camera. It may simply have become corrupted. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
reup
Joined: Thu Apr 28, 2005 9:04 pm Posts: 31
|
Posted: Fri Apr 29, 2005 9:28 am Post subject: RE: filename with ? how to fix this |
|
|
hello nelz,
it is not a problem of monting the system, as I can see correctly the other folders, the problem is that I bought the camera while traveling in peru and that canon dump his olds camera there, so the firmware of the camera needed to b e change
but in the midtime, I have all the birthday of my son on it.
the camera itself cannot reread the photos, but shows that the media card is full.
Windows can see only the config folder, only linux can see the corrupted folder but it see it has a file of size 0byte and with illegal caracters in the name,
so I am trying to rewrite the names directly on the card so that I can access it using bash or other.
gphoto2 can see the photos that where taken after the folder was corrupted as the camera recreated a new folder with the correct name |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7993 Location: Warrington, UK
|
Posted: Fri Apr 29, 2005 1:10 pm Post subject: RE: filename with ? how to fix this |
|
|
If the camera cannot read it, the card's filesystem would appear to be corrupted.
I wouldn't try to fix it on the card, one slip and you make everything worse. If you cannot copy everything off with the cp command I gave, which would at least give you access to the pictures even if the names were screwed, try using dd to make a backup of the card first.
| Code: | | dd if=/dev/sda1 of=card.img |
Then you can mount the image with
| Code: | | mount -o loop card.img /mount/point |
and experiment with that. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
fingers99 LXF regular
Joined: Thu Apr 07, 2005 7:15 pm Posts: 143
|
Posted: Fri Apr 29, 2005 7:03 pm Post subject: RE: filename with ? how to fix this |
|
|
Like Nelz (in Warrington, really?) I suspect that there's some major corruption going on there. I've never seen a Canon card corrupted. I wonder if it was reformated off the camera, so to speak?
Still dd will at least preserve anything that is there. |
|
| Back to top |
|
 |
linuxgirlie LXF regular

Joined: Sat Apr 09, 2005 7:34 pm Posts: 787 Location: Kent...UK
|
Posted: Fri Apr 29, 2005 7:12 pm Post subject: RE: filename with ? how to fix this |
|
|
I'm not sure of corruption, I have some cheap dvd drives.....never again......but sometimes, if I take one disk out and put another on in it does what this person described, it sees the files (so mounts the drives) but all the names are in ????, I have tried umount and mount manually but nothing works, I normally have to just leave it and come back later, in which it starts to work again....the machines I have are mdk 10. _________________ My knowledge comes with no warranty...........
Server operating system designed for schools:www.linuxschools.com |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7993 Location: Warrington, UK
|
Posted: Fri Apr 29, 2005 9:17 pm Post subject: Re: RE: filename with ? how to fix this |
|
|
| fingers99 wrote: | | Like Nelz (in Warrington, really?). |
Yes, really. Someone has to live here  |
|
| Back to top |
|
 |
reup
Joined: Thu Apr 28, 2005 9:04 pm Posts: 31
|
Posted: Sun May 01, 2005 12:44 pm Post subject: RE: Re: RE: filename with ? how to fix this |
|
|
sorry, I muyst have explain too much and badly.
I am looking for a software that can access the filename at a hexadecimal level so that I can rename the directory that is missnamed. all the rest is done, I can mount, ready the good part of the card, I can use gphoto2 for the part of the card that is not corrupted...... there is one folder in the card that cannot be enter by anymean, only list using ls, but has it contain ? signe, the shell try to expand it. and escaping with \ doesnot work either. I know that mc can ready files in hexa and it is possible with some software to modify a file in hexadecimal but here it is the filename that needs to be modify
I have problem to explain the problem clearly as english is not my first language
here is the result of ls
localhost:~# ls /mnt/loop
d?i? ecim
localhost:~# ls -la /mnt/loop
: No such file or directory
total 22
drwxr--r-- 4 root root 16384 May 1 09:54 .
drwxr-xr-x 7 root root 4096 May 1 13:22 ..
drwxr--r-- 3 root root 2048 Apr 28 21:35 ecim
thanks for the help
reup |
|
| Back to top |
|
 |
towy71 Moderator

Joined: Wed Apr 06, 2005 3:11 pm Posts: 4169 Location: wild West Wales
|
Posted: Sun May 01, 2005 12:50 pm Post subject: RE: Re: RE: filename with ? how to fix this |
|
|
Khexedit is the one I can think of
HTH
Dick _________________ still looking for that door into summer |
|
| Back to top |
|
 |
reup
Joined: Thu Apr 28, 2005 9:04 pm Posts: 31
|
Posted: Mon May 02, 2005 12:17 pm Post subject: RE: Re: RE: filename with ? how to fix this |
|
|
good one the khexedit, but infortunatly, it cannot edit the filesystem, only the files, so I still cannot rename my directory.
thanks anyway towy71
reup |
|
| Back to top |
|
 |
Nigel LXF regular

Joined: Fri Apr 08, 2005 9:03 pm Posts: 1141 Location: Gloucestershire, UK
|
Posted: Mon May 02, 2005 7:12 pm Post subject: RE: Re: RE: filename with ? how to fix this |
|
|
But if you use dd to take a copy of the entire card to a file (dd if=/dev/whatever_the_card_is of=card.img) you could then edit that file, then mount the file to access the pictures... _________________ Hope this helps,
Nigel. |
|
| Back to top |
|
 |
nelz Moderator

Joined: Mon Apr 04, 2005 12:52 pm Posts: 7993 Location: Warrington, UK
|
Posted: Mon May 02, 2005 8:12 pm Post subject: RE: Re: RE: filename with ? how to fix this |
|
|
A ? character won't stop you accessing the directory, just escape it. You seem to assume that the filesystem corruption is limited to changing the name of one directory. It seems moree likely that the filesystem itself is corrupted, otherwise "cp -av /mnt/card ~/W would show thew files being copied.
You have been ofered several suggestions that may help. why not try these before asking for more? EWven if they fail, the error messages may give further clues as to the cause of the problem. _________________ Unix is user-friendly. It's just very selective about who it's friends are. |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|