filename with ? how to fix this

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

filename with ? how to fix this

Postby reup » Thu Apr 28, 2005 8:10 pm

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
reup
 
Posts: 31
Joined: Thu Apr 28, 2005 8:04 pm

RE: filename with ? how to fix this

Postby Nigel » Thu Apr 28, 2005 8:33 pm

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.
User avatar
Nigel
LXF regular
 
Posts: 1141
Joined: Fri Apr 08, 2005 8:03 pm
Location: Gloucestershire, UK

RE: filename with ? how to fix this

Postby nelz » Thu Apr 28, 2005 9:10 pm

You can also type \? to give a ? character in the filename.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: filename with ? how to fix this

Postby reup » Fri Apr 29, 2005 7:43 am

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
reup
 
Posts: 31
Joined: Thu Apr 28, 2005 8:04 pm

RE: filename with ? how to fix this

Postby nelz » Fri Apr 29, 2005 8:09 am

Can you access any files on the camera? Does
Code: Select all
cp -a /mnt/cf ~/

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.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: filename with ? how to fix this

Postby reup » Fri Apr 29, 2005 8:28 am

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
reup
 
Posts: 31
Joined: Thu Apr 28, 2005 8:04 pm

RE: filename with ? how to fix this

Postby nelz » Fri Apr 29, 2005 12:10 pm

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: Select all
dd if=/dev/sda1 of=card.img


Then you can mount the image with
Code: Select all
mount -o loop card.img /mount/point

and experiment with that.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: filename with ? how to fix this

Postby fingers99 » Fri Apr 29, 2005 6:03 pm

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.
fingers99
LXF regular
 
Posts: 143
Joined: Thu Apr 07, 2005 6:15 pm

RE: filename with ? how to fix this

Postby linuxgirlie » Fri Apr 29, 2005 6:12 pm

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:http://www.linuxschools.com
linuxgirlie
LXF regular
 
Posts: 787
Joined: Sat Apr 09, 2005 6:34 pm
Location: Kent...UK

Re: RE: filename with ? how to fix this

Postby nelz » Fri Apr 29, 2005 8:17 pm

fingers99 wrote:Like Nelz (in Warrington, really?).


Yes, really. Someone has to live here :?
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: Re: RE: filename with ? how to fix this

Postby reup » Sun May 01, 2005 11:44 am

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
reup
 
Posts: 31
Joined: Thu Apr 28, 2005 8:04 pm

RE: Re: RE: filename with ? how to fix this

Postby towy71 » Sun May 01, 2005 11:50 am

Khexedit is the one I can think of
HTH
Dick
still looking for that door into summer
User avatar
towy71
Moderator
 
Posts: 4276
Joined: Wed Apr 06, 2005 2:11 pm
Location: wild West Wales

RE: Re: RE: filename with ? how to fix this

Postby reup » Mon May 02, 2005 11:17 am

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
reup
 
Posts: 31
Joined: Thu Apr 28, 2005 8:04 pm

RE: Re: RE: filename with ? how to fix this

Postby Nigel » Mon May 02, 2005 6:12 pm

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.
User avatar
Nigel
LXF regular
 
Posts: 1141
Joined: Fri Apr 08, 2005 8:03 pm
Location: Gloucestershire, UK

RE: Re: RE: filename with ? how to fix this

Postby nelz » Mon May 02, 2005 7:12 pm

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.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8577
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Next

Return to Help!

Who is online

Users browsing this forum: No registered users and 1 guest