Community Forum
    • Blog
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. Ing.Fernando
    I
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 0

    Ing.Fernando

    @Ing.Fernando

    191
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Ing.Fernando Unfollow Follow

    Latest posts made by Ing.Fernando

    • RE: Protect your Raspberry PI SD card, use Read-Only filesystem

      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!!!

      posted in Blog articles comments
      I
      Ing.Fernando