Cannot access /etc/resolv.conf input/output error

Started by bpir1, January 18, 2018, 03:32:02 PM

Previous topic - Next topic

bpir1

Hi all,

I have A20-olinuxino-Micro-n8gb. I have loaded Debian Nand image. It worked for some time and after that it started giving following error.

Cannot access /etc/resolv.conf input/output error

Then I have reloaded the Debian Nand Os again also the same error. Could you please tell me the solution to it?

Thanks

LubOlimex

#1
Did you use exactly this image (release #15): https://www.olimex.com/wiki/images/f/fc/A20_OLinuxino_Micro_debian_Jessie_34_103_2G_NAND_release_15.torrent ?

Also did you use the nandinstall script that is inside the image?
Technical support and documentation manager at Olimex

bpir1

Thanks for the reply sir. I have used above mentioned os only. and to load the os from sd card to nand I have
used nandinstall command only.

after that I am able to use it for some time and then I am getting
cannot access/etc/resolve.conf input/output error.

please help me to solve this error as soon as possible

thanks

LubOlimex

First I would try to replicate the problem it here but I need few more details:

1. So when the error appears - does the board stop or what exactly happens? The Debian can't boot at all? Please describe what happens after the error.

2. Is it possible that the file system got corrupted due to a sudden power down? How do you turn off the board - do you often perform hardware shutdowns (removing the power supply before performing software shutdown)?
Technical support and documentation manager at Olimex

bpir1

board boots properly, but problem comes with Internet. Internet won't work. I can't delete or modify the file or access the file. in fact I am using battery with a20 and I am not turning off immediately.


LubOlimex

It doesn't happen here and no one else reported similar behavior.

"I can't delete or modify the file or access the file."

The more I look into it the more it looks like the file is corrupted most likely due to file system corruption.

Can you try booting from SD card and then running fsck.ext3 -f -y /dev/nandb (or /dev/nandx where x is the letter associated with the nand memory)?
Technical support and documentation manager at Olimex

JohnS

And be sure the power supply can deliver plenty of clean power.

John

bpir1

Is their any way to clean file system on boot? Means Everytime I reboot, board Should start cleaning filesystem.



JohnS

Seems to be expecting a corrupted file system.  May well be due to bad power.  In that case the fix is good power then start with a good file system.

John

bpir1

Brian: Everytime when board power on, it will automatically clean the file system so that I don't need have to do it manually.

If any thing is like that please tell me. I am facing lot of problems with this.

Thanks

bpir1

Hi all,

It is very difficult for me to use this olimex-micro-a20 board, as this board's filesystem(nand) is always getting corrupted. Everytime I install os, after one or two days of using, board filesystem(nand) is getting corrupted.
Filesystem(nand) is corrupting means Everytime some or the other files will show like following.


$ rm  pic -R rm: cannot remove `pic/60.jpg': Input/output error
rm: cannot remove `pic/006.jpg': Input/output error
rm: cannot remove `pic/008.jpg': Input/output error
rm: cannot remove `pic/011.jpg': Input/output error

$ ls -la pic ls: cannot access pic/60.jpg: Input -????????? ? ?    ?         ? -????????? ? ?    ?         ? -????????? ? ?    ?         ?

I am using following procedure to repair filesystem
a. boot from sd card
b. then repair nand partition with following command
$e2fsck -y -b 32768 /dev/nandb.
C. then power off and remove the sd card then the device works properly.

Even after repairing filesystem like above the nand filesystem is again corrupting. Is their any permanent solution to this or not? Or Is it going to continue like this only?

If any solution is there then please let me know?

Thanks

JohnS

Still sounds like the cause is bad power.

You will never fix it with software if it is bad power.

John

bpir1

sir I am using battery along with main power supply. Even after using battery I am facing this issue.

Atleast can you tell me the way to automatically solve this issue, when I get this problem.. Means automatically board should repair filesystem( for eg. on reboot or after every week). Since this board is going to be installed at remote plce, Everytime I can't put sd card and repair filesystem.

So please help me with this.


Thanks

LubOlimex

Things to be executed on boot can be add inside rc.local (typically "nano /etc/rc.local").

Overall this is strange behavior considering the presence of battery.

There are a number of workarounds for the issue, that would reduce the risk of corruption, and the main workaround is to avoid sudden shutdown or power loss. This is a very good article on the subject that covers most of the workarounds:

https://www.embeddedarm.com/about/resource/preventing-filesystem-corruption-in-embedded-linux
Technical support and documentation manager at Olimex