3

I have installed Ubuntu 18.04 in a Lenovo 310 and I have some problems after some time (the problem usually happens after watching flash videos on the browser) the filesystem gets read-only. For instance when I try to do ls, the following error appears:

bash: cannot create temp file for here-document: Read-only file system

and with dmesg I find the following:

[ 1113.452578] mmc1: mmc_hs400_to_hs200 failed, error -110  
[ 1113.452615] mmcblk1: timed out sending r/w cmd command, card status 0x400e00   
[ 1113.452617] mmcblk1: command error, retrying timeout  
[ 1113.452908] mmc1: mmc_hs400_to_hs200 failed, error -110  
[ 1113.452931] mmcblk1: timed out sending r/w cmd command, card status 0x400e00   
[ 1113.452933] mmcblk1: command error, retrying timeout   
[ 1123.552180] mmc1: Timeout waiting for hardware interrupt.  
[ 1123.552209] mmc1: sdhci: ============ SDHCI REGISTER DUMP ===========   
[ 1123.552216] mmc1: sdhci: Sys addr:  0x20000008 | Version:  0x00001002  
[ 1123.552223] mmc1: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000008  
[ 1123.552229] mmc1: sdhci: Argument:  0x02400988 | Trn mode: 0x0000002b  
[ 1123.552235] mmc1: sdhci: Present:   0x1fff0001 | Host ctl: 0x0000003d  
[ 1123.552241] mmc1: sdhci: Power:     0x0000000b | Blk gap:  0x00000080  
[ 1123.552248] mmc1: sdhci: Wake-up:   0x00000000 | Clock:    0x00000207  
[ 1123.552254] mmc1: sdhci: Timeout:   0x00000006 | Int stat: 0x00000000  
[ 1123.552260] mmc1: sdhci: Int enab:  0x02ff000b | Sig enab: 0x02ff000b  
[ 1123.552266] mmc1: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000  
[ 1123.552272] mmc1: sdhci: Caps:      0x546ec881 | Caps_1:   0x80000807  
[ 1123.552278] mmc1: sdhci: Cmd:       0x0000193a | Max curr: 0x00000000  
[ 1123.552285] mmc1: sdhci: Resp[0]:   0x00400e00 | Resp[1]:  0x00000000  
[ 1123.552291] mmc1: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00400e00  
[ 1123.552296] mmc1: sdhci: Host ctl2: 0x0000000d  
[ 1123.552303] mmc1: sdhci: ADMA Err:  0x00000000 | ADMA Ptr:   0x000000016f310200   
[ 1123.552306] mmc1: sdhci: ============================================  
[ 1123.552579] mmcblk1: error -110 sending stop command, original cmd response 0x0, card status 0x400900  
[ 1123.552619] mmcblk1: error -110 transferring data, sector 37751176, nr 8, cmd response 0x0, card status 0x0  

When I reboot, there is a terminal telling me to run fsck and after doing that and rebooting again the system is again fine (for a while).

I have read that this might be a kernel problem, but that might be also be a problem with my hardware.

Could someone help me to discover which is the problem? Which log information can I provide to clarify this?

muru
  • 207,228

1 Answers1

2

You have a hardware problem, but you might be able to save the eMMC by doing the following:

  1. plug the eMMC into another computer running Ubuntu

  2. install ddrescue:

     sudo apt-get install gddrescue
    
  3. copy the eMMC to an image on the HDD of the other computer:

     ddrescue --direct --retry-passes=3 /dev/XdY /tmp/eMMC.img /tmp/eMMC.log
    

    The above command will tells ddrescue to:

    • --direct use direct disk access and ignore the kernel’s cache
    • --retry-passes=3 retry bad sectors 3 times before giving up.
    • /dev/XdY is the MMC we are rescuing where X and Y denominate the identifier of the MMC
    • eMMC.img is the name of the image file
    • eMMC.log is the name of the logfile. Always use a logfile. This allows you to resume an interrupted image at the point you left off, or to retry bad sectors after an initial pass. Without a logfile, you will have to start over again!
  4. After that completes, unmount the MMC if needed

  5. Insert a new MMC in the MMC slot of the computer and execute:

     ddrescue --force /tmp/eMMC.img /dev/XdY /tmp/eMMC.restore.log
    
  6. insert the new MMC back into your Lenovo and reboot

Done!

Fabby
  • 35,017