Skip to content
  • Blog
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Community Forum

I

Ing.Fernando

@Ing.Fernando
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent

  • Protect your Raspberry PI SD card, use Read-Only filesystem
    I Ing.Fernando

    Hi I successfully made my Pi Zero v 1.3 Read Mode, but a problem came up when I was trying to connect to internet with a 3g usb dongle.

    First, the modem get connected to internet, but after a minute or less, it losed the connection, and then it reconnects, and the same story was looping forever.

    After thinking, the problem was the DNS, because when the modem connects to internet, it changes the default DNS and tried to write the new DNS to the default file, here is the problem, the modem didn't notice that he cant write to the SD!

    I took the solution from here: https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/read-only.md

    touch /tmp/resolv.conf
    sudo rm /etc/resolv.conf
    sudo ln -s /tmp/resolv.conf /etc/resolv.conf

    touch /tmp/resolv.conf.dhclient-new
    sudo chmod 777 /tmp/resolv.conf.dhclient-new
    sudo rm /etc/resolv.conf.dhclient-new
    sudo ln -s /tmp/resolv.conf.dhclient-new /etc/resolv.conf.dhclient-new

    sudo mv /sbin/dhclient-script /sbin/dhclient-script_original
    sudo ln -s /home/pi/emonpi/dhclient-script_raspbian_jessielite /sbin/dhclient-script

    Then rebooted and all worked fine, the 3g modem connected to the internet and never disconnected, then I successfully SSH with weaved.com service.

    After that another problem came up, my system is a GPS tracker for public transport, so there is a GPS module in my system, and the GPS was not working for the same reason as the 3g modem.

    I'm using a "Ublox Neo 6m GPS" and GPSD to get the required information.

    When GPSD run at boot it tryes to write a configuration file to open the stream, but it cant because the Pi is in read mode, so we need to put in that file what GPSD write at boot.

    To solve this, just edit this file: /etc/default/gpsd

    Then edit as this:

    START_DAEMON="true"
    GPSD_OPTIONS="-n"
    DEVICES="/dev/ttyAMA0" #My GPS is connected via UART, change if yours is via USB or whatelse
    USBAUTO="true"
    GPSD_SOCKET="/var/run/gpsd.sock"

    Finally reboot and all will work fine.

    So, if you are having a problem with a sensor or what else, first verify if the program who communicates with it needs to write sometime to the SD.

    Thank you and greetings from Mexico!!!

    Blog articles comments life filesystem card log end
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Blog
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups