Welcome, Guest

Author Topic: Cannot access /etc/resolv.conf input/output error  (Read 1626 times)

bpir1

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Cannot access /etc/resolv.conf input/output error
« on: January 18, 2018, 03:32:02 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1753
  • Karma: +46/-2
Re: Cannot access /etc/resolv.conf input/output error
« Reply #1 on: January 18, 2018, 03:34:58 PM »
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?
« Last Edit: January 18, 2018, 03:44:13 PM by LubOlimex »
Technical support and documentation manager at Olimex

bpir1

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Cannot access /etc/resolv.conf input/output error
« Reply #2 on: January 18, 2018, 04:46:40 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1753
  • Karma: +46/-2
Re: Cannot access /etc/resolv.conf input/output error
« Reply #3 on: January 18, 2018, 04:53:41 PM »
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

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Cannot access /etc/resolv.conf input/output error
« Reply #4 on: January 18, 2018, 05:54:39 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1753
  • Karma: +46/-2
Re: Cannot access /etc/resolv.conf input/output error
« Reply #5 on: January 22, 2018, 04:24:34 PM »
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

  • Hero Member
  • *****
  • Posts: 1674
  • Karma: +33/-45
Re: Cannot access /etc/resolv.conf input/output error
« Reply #6 on: January 22, 2018, 07:14:52 PM »
And be sure the power supply can deliver plenty of clean power.

John

bpir1

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Cannot access /etc/resolv.conf input/output error
« Reply #7 on: January 24, 2018, 02:25:26 AM »
Is their any way to clean file system on boot? Means Everytime I reboot, board Should start cleaning filesystem.


Brian

  • Newbie
  • *
  • Posts: 12
  • Karma: +3/-0
Re: Cannot access /etc/resolv.conf input/output error
« Reply #8 on: January 24, 2018, 08:39:48 AM »
Why? ???

JohnS

  • Hero Member
  • *****
  • Posts: 1674
  • Karma: +33/-45
Re: Cannot access /etc/resolv.conf input/output error
« Reply #9 on: January 24, 2018, 01:21:05 PM »
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

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Cannot access /etc/resolv.conf input/output error
« Reply #10 on: January 31, 2018, 12:40:08 PM »
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

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Cannot access /etc/resolv.conf input/output error
« Reply #11 on: February 03, 2018, 03:46:15 PM »
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

  • Hero Member
  • *****
  • Posts: 1674
  • Karma: +33/-45
Re: Cannot access /etc/resolv.conf input/output error
« Reply #12 on: February 03, 2018, 04:49:43 PM »
Still sounds like the cause is bad power.

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

John

bpir1

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Cannot access /etc/resolv.conf input/output error
« Reply #13 on: February 03, 2018, 06:38:26 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1753
  • Karma: +46/-2
Re: Cannot access /etc/resolv.conf input/output error
« Reply #14 on: February 05, 2018, 08:13:08 AM »
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