View Single Post
Old 03-19-2019, 08:17 PM   #47
tonyyng
Enthusiast
tonyyng began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Jan 2019
Device: none
Some good news. My mtdblock4 partition is back to normal after using BloodRagg's 'dd if=/dev/zero' approach to reset it:

Here's the log:

Code:
# dd if=/dev/zero of=/dev/mtdblock4 bs=1M conv=fsync
end_request: I/O error, dev mtdblock4, sector 298752
Buffer I/O error on device mtdblock4, logical block 37344
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298760
Buffer I/O error on device mtdblock4, logical block 37345
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298768
Buffer I/O error on device mtdblock4, logical block 37346
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298776
Buffer I/O error on device mtdblock4, logical block 37347
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298784
Buffer I/O error on device mtdblock4, logical block 37348
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298792
Buffer I/O error on device mtdblock4, logical block 37349
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298800
Buffer I/O error on device mtdblock4, logical block 37350
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298808
Buffer I/O error on device mtdblock4, logical block 37351
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298816
Buffer I/O error on device mtdblock4, logical block 37352
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298824
Buffer I/O error on device mtdblock4, logical block 37353
lost page write due to I/O error on mtdblock4
end_request: I/O error, dev mtdblock4, sector 298832
end_request: I/O error, dev mtdblock4, sector 298840
end_request: I/O error, dev mtdblock4, sector 298848
end_request: I/O error, dev mtdblock4, sector 298856
end_request: I/O error, dev mtdblock4, sector 298864
end_request: I/O error, dev mtdblock4, sector 298872
end_request: I/O error, dev mtdblock4, sector 298880
end_request: I/O error, dev mtdblock4, sector 298888
end_request: I/O error, dev mtdblock4, sector 298896
end_request: I/O error, dev mtdblock4, sector 298904
end_request: I/O error, dev mtdblock4, sector 298912
end_request: I/O error, dev mtdblock4, sector 298920
end_request: I/O error, dev mtdblock4, sector 298928
end_request: I/O error, dev mtdblock4, sector 298936
end_request: I/O error, dev mtdblock4, sector 298944
end_request: I/O error, dev mtdblock4, sector 298952
end_request: I/O error, dev mtdblock4, sector 298960
end_request: I/O error, dev mtdblock4, sector 298968
end_request: I/O error, dev mtdblock4, sector 298976
end_request: I/O error, dev mtdblock4, sector 298984
end_request: I/O error, dev mtdblock4, sector 298992
end_request: I/O error, dev mtdblock4, sector 299000
dd: /dev/mtdblock4: Input/output error
# dd if=/dev/zero of=/dev/mtdblock4 bs=1K conv=fsync
end_request: I/O error, dev mtdblock4, sector 298752
dd: writing '/dev/mtdblock4': Input/output error
149377+0 records in
149376+0 records out
# mount /dev/mtdblock4 /mnt/mtd4/
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
yaffs: auto selecting yaffs2
**>> Block 1279 retired
# ls -l /mnt/mtd4/
drw-rw-rw-    1 root     root         2048 Aug 31 03:48 lost+found
drwxr-xr-x    1 root     root         2048 Jan  1  1970 mnt
drwxr-xr-x    1 root     root         2048 Jan  1  1970 proc
drwxr-xr-x    1 root     root         2048 Jan  1  1970 sys
drwxr-xr-x    1 root     root         2048 Jan  1  1970 tmp
drwxr-xr-x    1 root     root         2048 Jan  1  1970 usr
drwxr-xr-x    1 root     root         2048 Jan  1  1970 var
# cd /mnt/mtd4/
# ls -ltr
drwxr-xr-x    1 root     root         2048 Jan  1  1970 usr
drwxr-xr-x    1 root     root         2048 Jan  1  1970 tmp
drwxr-xr-x    1 root     root         2048 Jan  1  1970 sys
drwxr-xr-x    1 root     root         2048 Jan  1  1970 proc
drwxr-xr-x    1 root     root         2048 Jan  1  1970 mnt
drwxr-xr-x    1 root     root         2048 Jan  1  1970 var
drw-rw-rw-    1 root     root         2048 Aug 31 03:48 lost+found
# rm -rf mnt
# rm -rf tmp
# rm -rf usr
# ls -ltr
drwxr-xr-x    1 root     root         2048 Jan  1  1970 sys
drwxr-xr-x    1 root     root         2048 Jan  1  1970 proc
drwxr-xr-x    1 root     root         2048 Jan  1  1970 var
drw-rw-rw-    1 root     root         2048 Aug 31 03:48 lost+found
# sync
# ls -ltr
drwxr-xr-x    1 root     root         2048 Jan  1  1970 sys
drwxr-xr-x    1 root     root         2048 Jan  1  1970 proc
drwxr-xr-x    1 root     root         2048 Jan  1  1970 var
drw-rw-rw-    1 root     root         2048 Aug 31 03:48 lost+found
# rm -rf proc
# rm -rf var
# sync
# ls -ltr
drwxr-xr-x    1 root     root         2048 Jan  1  1970 sys
drw-rw-rw-    1 root     root         2048 Aug 31 03:48 lost+found
# rm -rf sys
# sync
# ls -ltr
drw-rw-rw-    1 root     root         2048 Aug 31 03:48 lost+found
# rm -rf lost\+found/
**>> yaffs chunk 64 was not erased
**>> yaffs chunk 128 was not erased
**>> yaffs chunk 192 was not erased
**>> yaffs chunk 256 was not erased
**>> yaffs chunk 320 was not erased
<snip>
**>> yaffs chunk 74688 was not erased
**>> yaffs write required 1168 attempts
Unable to handle kernel NULL pointer dereference at virtual address 00000008
arch_reset: attempting watchdog reset

REBOOTED - had to gradually delete stuff from 'lost + found'

# mount /dev/mtdblock4
mount: can't find /dev/mtdblock4 in /etc/fstab
# mount /dev/mtdblock4 /mnt/mtd4/
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
yaffs: auto selecting yaffs2
**>> Block 1279 retired
# cd /mnt/mtd4/
# ls -ltr
drw-rw-rw-    1 root     root         2048 Aug 31 03:58 lost+found
# ls -l lost\+found/
d---------    1 root     root         2048 Aug 31 03:58 obj1079
d---------    1 root     root         2048 Aug 31 03:58 obj1340
#

Was left with the previous two directories, which I couldn't delete

# cd /
# cp -P -r bin /mnt/mtd4
cp -P -r boot /mnt/mtd4
cp -P -r dev /mnt/mtd4
cp -P -r etc /mnt/mtd4
cp -P -r lib /mnt/mtd4
cp -P -r lost+found /mnt/mtd4
cp -P -r root /mnt/mtd4
cp -P -r sbin /mnt/mtd4
cp -P -r usr /mnt/mtd4
cp -P -r linuxrc /mnt/mtd4
mkdir /mnt/mtd4/mnt
mkdir /mnt/mtd4/mnt/onboard
mkdir# cp -P -r boot /mnt/mtd4
 /# cp -P -r dev /mnt/mtd4
mnt/mtcp: cannot stat 'dev/mtdb6': Input/output error
d4# cp -P -r etc /mnt/mtd4
/mnt/mtd4
mkdir /mnt/mtd4/proc
mkdir /mnt/mtd4/sys
mkdir /mnt/mtd4/tmp
mkdir /mnt/mtd4/var# cp -P -r lib /mnt/mtd4
# cp -P -r lost+found /mnt/mtd4
# cp -P -r root /mnt/mtd4
# cp -P -r sbin /mnt/mtd4
# cp -P -r usr /mnt/mtd4

# cp -P -r linuxrc /mnt/mtd4
# mkdir /mnt/mtd4/mnt
# mkdir /mnt/mtd4/mnt/onboard
# mkdir /mnt/mtd4/mnt/mtd4
# mkdir /mnt/mtd4/proc
# mkdir /mnt/mtd4/sys
# mkdir /mnt/mtd4/tmp
# mkdir /mnt/mtd4/var
#

Standard Reboot using filesystem on mtdblock4

Please press Enter to activate this console. hwclock: settimeofday() failed: Invalid argument

# ls -ltr
drwxr-xr-x   11 root     root            0 Jan  1  1970 sys
dr-xr-xr-x   36 root     root            0 Jan  1  1970 proc
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 bin
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 dev
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 boot
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 etc
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 lib
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 sbin
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 root
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 usr
drwxr-xr-x    1 root     root         2048 Aug 31 04:10 var
drwxr-xr-x    1 root     root         2048 Aug 31 04:10 mnt
lrwxrwxrwx    1 root     root           11 Aug 31 04:10 linuxrc -> bin/busybox
drw-rw-rw-    1 root     root         2048 Aug 31 04:11 lost+found
drwxrwxrwt    2 root     root           80 Aug 31 04:11 tmp
# cd lost\+found/
# ls -ltr
d---------    1 root     root         2048 Aug 31 04:11 obj1340
d---------    1 root     root         2048 Aug 31 04:11 obj1079
#
# cd obj1340/

Hmm.  This directory seems normal now.

# ls
Apia         Funafuti     Guadalcanal  Majuro       Noumea       Saipan
Chuuk        Galapagos    Johnston     Nauru        Palau        Truk
Fiji         Gambier      Kiritimati   Niue         Pohnpei
# ls -ltr
-rw-r--r--    2 root     root          624 Jan  1  1970 Truk
-rw-r--r--    1 root     root          709 Jan  1  1970 Saipan
-rw-r--r--    1 root     root          624 Jan  1  1970 Pohnpei
-rw-r--r--    1 root     root          780 Jan  1  1970 Noumea
-rw-r--r--    1 root     root          720 Jan  1  1970 Nauru
-rw-r--r--    1 root     root          651 Jan  1  1970 Majuro
-rw-r--r--    1 root     root          684 Jan  1  1970 Kiritimati
-rw-r--r--    1 root     root          599 Jan  1  1970 Johnston
-rw-r--r--    1 root     root          638 Jan  1  1970 Guadalcanal
-rw-r--r--    1 root     root          639 Jan  1  1970 Gambier
-rw-r--r--    1 root     root          677 Jan  1  1970 Galapagos
-rw-r--r--    1 root     root          776 Jan  1  1970 Fiji
-rw-r--r--    2 root     root          624 Jan  1  1970 Chuuk
-rw-r--r--    1 root     root          748 Jan  1  1970 Apia
-rw-r--r--    1 root     root          620 Jan  1  1970 Palau
-rw-r--r--    1 root     root          680 Jan  1  1970 Niue
-rw-r--r--    1 root     root          621 Jan  1  1970 Funafuti
# rm *
# cd ..
# rm -rf obj1340/
# cd obj1079/
# ls -ltr
-rw-r--r--    1 root     root         2774 Jan  1  1970 PST8PDT
-rw-r--r--    1 root     root          598 Jan  1  1970 MST
-rw-r--r--    1 root     root          599 Jan  1  1970 HST
-rw-r--r--    2 root     root          606 Aug 31 04:08 ROK
-rw-r--r--    2 root     root          607 Aug 31 04:08 PRC
-rw-r--r--    2 root     root          606 Aug 31 04:08 Iran
-rw-r--r--    2 root     root         2689 Aug 31 04:08 UTC
# rm *
# cd ..
# rm -rf obj1079/
# cd ..
# ls -ltr
drwxr-xr-x   11 root     root            0 Jan  1  1970 sys
dr-xr-xr-x   36 root     root            0 Jan  1  1970 proc
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 bin
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 dev
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 boot
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 etc
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 lib
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 sbin
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 root
drwxr-xr-x    1 root     root         2048 Aug 31 04:08 usr
drwxr-xr-x    1 root     root         2048 Aug 31 04:10 var
drwxr-xr-x    1 root     root         2048 Aug 31 04:10 mnt
lrwxrwxrwx    1 root     root           11 Aug 31 04:10 linuxrc -> bin/busybox
drw-rw-rw-    1 root     root         2048 Aug 31 04:11 lost+found
drwxrwxrwt    2 root     root           80 Aug 31 04:11 tmp

Back to normal
tonyyng is offline   Reply With Quote