OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Cannot Delete Folder, trying to remove the zgcc environment
Bulldog58
post Feb 11 2005, 11:17 AM
Post #1





Group: Members
Posts: 5
Joined: 11-February 05
Member No.: 6,455



I tried to install the zgcc environment as described by Jeff Fox at
http://s91215199.onlinehome.us/zaurus/zgcc2install.html

to make a long story short I have this file path created

/mnt/card/cdev/.zgcc

and "ls -a" issued from /mnt/card/cdev/.zgcc returns nothing.
If I try to "rm -r .zgcc" from /mnt/card/cdev I get "unable to remove '.zgcc': Directory not empty

I can rename the cdev directory, but I cannot rename the .zgcc directory. If I try to rename .zgcc directory I get "unable to rename '.zgcc': no such file or directory

I really need to delete the cdev directory and all files in it. Any help would be greatly appreciated.
Go to the top of the page
 
+Quote Post
iamasmith
post Feb 11 2005, 11:41 AM
Post #2





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



QUOTE(Bulldog58 @ Feb 11 2005, 07:17 PM)
and "ls -a" issued from /mnt/card/cdev/.zgcc returns nothing.
If I try to "rm -r .zgcc" from /mnt/card/cdev I get "unable to remove '.zgcc': Directory not empty

I can rename the cdev directory, but I cannot rename the .zgcc directory. If I try to rename .zgcc directory I get "unable to rename '.zgcc': no such file or directory

*


...sounds like the directory is not empty smile.gif you may also need to be root....

try...

rm -rf .zgcc
Go to the top of the page
 
+Quote Post
Bulldog58
post Feb 11 2005, 11:47 AM
Post #3





Group: Members
Posts: 5
Joined: 11-February 05
Member No.: 6,455



I tried that, and to no avail. I get back
"rm: unable to remove '.zgcc': Directory not empty.
I still see nothing in the directory, I am begining to think something is accessing the directory not allowing me to remove it.

I am logged in as root.

any help would be appreciated.
Go to the top of the page
 
+Quote Post
iamasmith
post Feb 11 2005, 12:06 PM
Post #4





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



QUOTE(Bulldog58 @ Feb 11 2005, 07:47 PM)
I tried that, and to no avail. I get back
"rm: unable to remove '.zgcc': Directory not empty.
I still see nothing in the directory, I am begining to think something is accessing the directory not allowing me to remove it.

I am logged in as root.

any help would be appreciated.
*


Can you eject the card ? If so then nothing is accessing it. If not then your easiest route may be to shutdown -r to reboot and try again.

If nothing is accessing the card though and you are still unable to eject then you may want to check the file system. What file system are you using ?
Go to the top of the page
 
+Quote Post
Bulldog58
post Feb 11 2005, 01:39 PM
Post #5





Group: Members
Posts: 5
Joined: 11-February 05
Member No.: 6,455



I am able to eject the card. I think I have found the issue.
it reports that the superblock is bad. How can I fix this? I would think that there would be a utility for this, but I am not sure.

any help is appreciated
Go to the top of the page
 
+Quote Post
Pyrates
post Feb 12 2005, 01:13 AM
Post #6





Group: Members
Posts: 198
Joined: 17-January 04
Member No.: 1,475



Hey Bull.

I can help you a bit. Firstly, important data on it? If NOT, just reformat it with ext2, that's really the easiest solution.

If there is important data, save it and reformat your card. If you can't access that data, read below. The procedure works both for the card itself as well as a copy, but of course with a copy you're pretty much safe if it's screwed up (happened quite a bit of times for me).

Step 1) Make a copy of the filesystem: "dd if=/dev/sda1 of=/wherever/backup.sd". Of course, adjust the paths as needed.
Step 2) There are backup superblocks in every ext2 filesystem. You can find them with "dumpe2fs backup.sd". There probably is a switch to show just the backup superblocks, but you can also just scroll through the output.
Step 3) Once you have found a backup superblock, you can use the "-b" switch for e2fsck in order to repair the filesystem. If you're running it on your backup, use the "-y" switch for non-interactive mode. It probably screws the whole thing, but since it's your backup (or a copy of a backup or whatever...) you can just try.
Step 3) Once the backup is repaired, you can mount it with "mount -o loop -t ext2 backup.sd /mnt/backup" as root and retrieve your data.

PLEASE read all the manpages before doing what I said. I might be dead wrong.

Of course, you could try to repair the filesystem on your sd-card with the above procedure, but for one, it can get screwed, and second, I don't really trust it, so reformatting is the best idea. You can run badblocks (check the -o option) on the card and use the info for your new filesystem, just in case there are any bad blocks...

Hope that helps, let us know how it turns out.

Cheers
Philipp
Go to the top of the page
 
+Quote Post
Bulldog58
post Feb 12 2005, 10:54 AM
Post #7





Group: Members
Posts: 5
Joined: 11-February 05
Member No.: 6,455



I saved what data I could, and then I just reformatted. It was just quicker to do it this way. I appreciate the responses. Pyrates, lots of good info there, that is the kind of detail that I will reference for quite a while.

thanks
Go to the top of the page
 
+Quote Post
Pyrates
post Feb 12 2005, 11:06 AM
Post #8





Group: Members
Posts: 198
Joined: 17-January 04
Member No.: 1,475



Yeah, it took a LONG time for me to gather that, but just recently I just HAD to rescue something from a bunked ext2 partition. I made a 42gb copy into a file smile.gif But it worked as described above and saved my ass... Nice yours was easier to rescue *G*

Cheers
Philipp
Go to the top of the page
 
+Quote Post
bluedevils
post Feb 12 2005, 01:07 PM
Post #9





Group: Members
Posts: 1,284
Joined: 31-January 04
From: Vancouver, BC -> NYC, NY
Member No.: 1,633



<>
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th April 2014 - 05:01 AM