maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   [SOLVED] How do I delete a read-only folder ? (https://talk.maemo.org/showthread.php?t=64746)

Oposum 2011-06-23 15:26

Re: [SOLVED] How do I delete a read-only folder ?
 
I've read the whole thread an tried all the solutions, but nothing worked for me.

About 1 week ago my microSD was corrupt and could be rescued with the this procedure:

Code:

root
umount /media/mmc1
fsck.vfat -af /dev/mmcblk1p1

Now my eMMC is corrupted. I've edited /usr/lib/genfstab.awk and commented the lines about the eMMC out and then rebooted and tried the things down here:

Code:

Nokia-N900:~# fsck.vfat -aw /dev/mmcblk0p1
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/
  Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!
Nokia-N900:~# fsck.vfat -avw /dev/mmcblk0p1
dosfsck 2.11 (12 Mar 2005)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "Maemo"
Media byte 0xf8 (hard disk)
      512 bytes per logical sector
    65536 bytes per cluster
      126 reserved sectors
First FAT starts at byte 64512 (sector 126)
        2 FATs, 32 bit entries
  1769984 bytes per FAT (= 3457 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 3604480 (sector 7040)
    442377 data clusters (28991619072 bytes)
32 sectors/track, 64 heads
        0 hidden sectors
  56631296 sectors total
/
  Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!

To show you that /dev/mmcblk0p1 is _not_ mounted:

Code:

Nokia-N900:~# cat /proc/mounts
rootfs / rootfs rw 0 0
ubi0:rootfs / ubifs rw,bulk_read,no_chk_data_crc 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /tmp tmpfs rw,noatime,size=1024k 0 0
tmpfs /var/run tmpfs rw,nosuid,noatime,size=256k,mode=755 0 0
none /dev tmpfs rw,noatime,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,noatime,size=65536k 0 0
/dev/mmcblk0p2 /home ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0
/dev/mmcblk0p2 /opt ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0
cgroup /syspart cgroup rw,freezer,memory,cpu 0 0
nodev /sys/kernel/debug debugfs rw 0 0
/dev/mmcblk0p2 /usr/lib/python2.5 ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0
/dev/mmcblk0p2 /usr/share/pyshared ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0
/dev/mmcblk0p2 /usr/lib/pyshared ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0
/dev/mmcblk0p2 /usr/share/python-support ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0
/dev/mmcblk0p2 /usr/lib/python-support ext3 rw,noatime,errors=continue,commit=1,data=writeback 0 0

Maybe someone has an idea how to solve this or if I need to reflash the device?

michaaa62 2011-06-23 16:08

Re: [SOLVED] How do I delete a read-only folder ?
 
Try to repair with
Code:

sudo gainroot
fsck -r /dev/mmcblk0p1

If this fails, please show the output of
Code:

sudo gainroot
sfdisk -l

to see what state the partition table is in.

Oposum 2011-06-23 20:53

Re: [SOLVED] How do I delete a read-only folder ?
 
Quote:

Originally Posted by michaaa62 (Post 1037375)
Try to repair with
Code:

sudo gainroot
fsck -r /dev/mmcblk0p1

If this fails, please show the output of
Code:

sudo gainroot
sfdisk -l

to see what state the partition table is in.

Thanks for your answer. Down here the requested standard output of my N900:

Code:

Nokia-N900:~# fsck -r /dev/mmcblk0p1
fsck 1.41.3.maemo0 (12-Oct-2008)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/
  Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!

Code:

Nokia-N900:~# sfdisk -l

Disk /dev/mmcblk0: 977024 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

  Device Boot Start    End  #cyls    #blocks  Id  System
/dev/mmcblk0p1          1  884864  884864  28315648    c  W95 FAT32 (LBA)
/dev/mmcblk0p2    884865  950400  65536    2097152  83  Linux
/dev/mmcblk0p3    950401  974976  24576    786432  82  Linux swap / Solaris
/dev/mmcblk0p4          0      -      0          0    0  Empty


michaaa62 2011-06-23 21:39

Re: [SOLVED] How do I delete a read-only folder ?
 
Try to run the af options on the device again, there are user reports in the forum, that they actually succeeded in running the command a couple of times before it worked
Code:

sudo gainroot
fsck -af /dev/mmcblk0p1

Also give
Code:

mmc-check /dev/mmcblk0p1
a try please.

Oposum 2011-06-23 21:51

Re: [SOLVED] How do I delete a read-only folder ?
 
Quote:

Originally Posted by michaaa62 (Post 1037648)
Try to run the af options on the device again, there are user reports in the forum, that they actually succeeded in running the command a couple of times before it worked
Code:

sudo gainroot
fsck -af /dev/mmcblk0p1

Also give
Code:

mmc-check /dev/mmcblk0p1
a try please.

Yep, i tried the "-af" version already before posting, but here:

Code:

Nokia-N900:~# fsck -af /dev/mmcblk0p1
fsck 1.41.3.maemo0 (12-Oct-2008)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/
  Contains a free cluster (2). Assuming EOF.
FAT32 root dir starts with a bad cluster!
Nokia-N900:~#

Code:

Nokia-N900:~# mmc-check /dev/mmcblk0p1
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/
  Contains a free cluster (2). Assuming EOF.
Nokia-N900:~#


casketizer 2011-06-23 21:58

Re: [SOLVED] How do I delete a read-only folder ?
 
Have you tried to let a Windoze box fix it? Via USB storage mode?

Oposum 2011-06-23 22:09

Re: [SOLVED] How do I delete a read-only folder ?
 
Quote:

Originally Posted by casketizer (Post 1037666)
Have you tried to let a Windoze box fix it? Via USB storage mode?

Yes, i've tried that too.

Windows says "Disk space 0 bytes" and "Free Space 0 bytes". Via Tools -> Error Checking -> Check Now, it says "The disk check could not be performed because the disk can not be accessed." (Translated from german into english)

casketizer 2011-06-23 22:15

Re: [SOLVED] How do I delete a read-only folder ?
 
You could try a tool like R-Studio (in Windows) if any important data is on it, and then reformat. If that fails too you'll prolly have to flash it.

michaaa62 2011-06-24 07:04

Re: [SOLVED] How do I delete a read-only folder ?
 
Quote:

Originally Posted by casketizer (Post 1037679)
You could try a tool like R-Studio (in Windows) if any important data is on it, and then reformat. If that fails too you'll prolly have to flash it.

Or there is testdisk from the recovery-tools package for the purpose to try recover lost files.

I dont know how valuable the data really is for you, aka.is it just a recopy process from some files via PC or full data lost?), because the whole process might take some time, or if you would risk the data and try to copy the backup header of the file-system to the first sector. But that may also break the whole stuff.

If you do not really feel the need for the Nokia preinstalled stuff, there is no need to flash the device, just make a fresh new file-system and go ahead, but only if you not need what is now on the phone.

Oposum 2011-06-27 16:47

Re: [SOLVED] How do I delete a read-only folder ?
 
Thank you all for your help very much.

After backing up the data (which was readable, but some files were not) with R-Studio yesterday, i formated the eMMC with a Windows PC and copied my data back on it. From the errors during the backup process I conclude, that the eMMC-filesystem was definitly corrupted and could not be restored.

So I think till now, there is no easy or other solution for this problem.


All times are GMT. The time now is 21:12.

vBulletin® Version 3.8.8