cyoung / stratux

Aviation weather and traffic receiver based on RTL-SDR.
BSD 3-Clause "New" or "Revised" License
1.05k stars 361 forks source link

Constant SD card corruption after proper shutdown #654

Closed ismarhernandez closed 7 years ago

ismarhernandez commented 7 years ago
  1. Stratux version: stratux-v1.3b1-a6f9aaf9f5-dev.img

  2. Stratux config: Raspberry Pi3 - NooElec Dual-Band NESDR Nano 2 ADS-B (978MHz UAT & 1090MHz 1090ES) - Stratux AHRS sensor - External USB GPS antenna WAAS capable - Summitlink tinted case with fan - I flash the stratux software to an SD card using my MAC.

    SDR

    • [ ] single
    • [X] dual

    GPS

    • [X] yes
    • [ ] no type:

    AHRS

    • [X] yes
    • [ ] no

    power source: USB cable to car carger - I will be ordering a 22000 mAh battery soon

    usb cable: regular USB cable to stratux

  3. EFB app and version: FLTPLAN Go

    EFB platform: iOS 10.3.3 (iPad Pro 9.7 Tablet and iPhone)

    EFB hardware: (iPad Pro 9.7" and iPhone 7plus )

  4. Description of your issue: Hey guys, since I knew about Stratux I knew it was a great system, so I went ahead and I built my own. I have great reception, GPS, AHRS and traffic information. But my Stratux box is not very reliable since the SD card keeps getting corrupted constantly. Let's say I use the Stratux today, and after the Stratux starts I see the fan start, the green light blinking rapidly (about 5 times per second) and no red light shown. However, the Stratux works flawlessly... beautifully!!! It gets traffic better than my friend's Stratus, great GPS, and AHRS information. I then conduct a proper shutdown through the 192.168.10.1 and clicking the "SHUT DOWN" button. Immediately, the red and green light comes on steady, and my fan stops working; perfect, I think I turned it off correctly. I give it 10 seconds after this and then disconnect the USB cable at the Stratux -no problems so far. The problem comes after the second time I use the Stratux. I do the same thing to start it like the last time by connecting the cable to the electricity, then to the Stratux. However, I do not find the Stratux wifi signal and I am not able to connect to it. The green light stays blinking the same way as if it was working, but I do not see the wifi signal. I have attempted this as a controlled experiment using wall plug adapter(iPhone charger)-to-USB cable-to-Stratux, cigarette lighter adapter-to-cable-to-Stratux, with the same results. I have attempted to find the signal with a wide array of things (Mac, iPad, iPhone, other computers, and phones), to no avail. After this, there is no way I can get the Stratux to work unless I re-flash the SD card. When I reflash the card and use the Stratux, it works as if it was brand new again. I read a post that explains the SD card may be getting corrupted and a brief explanation on how to make the SD card "read-only". However, I don't seem to be able to make it work. I don't think to be following the instructions correctly and messing up somewhere. I am able to use a computer and follow steps to the exact letter (including using terminal and prompt), but I am not a programmer and do not have a lot of experience working with this. I can follow the instructions, but they have to be broken down as if I was an 8 year old child. Could someone please extend me a hand with this problem?

2016/02/26 01:18:19 Stratux v1.3b1 (a6f9aaf9f52caab49017dfde3701306fd94f0af6) starting. 2016/02/26 01:18:19 Entered uatReader() ... 2016/02/26 01:18:19 can't read settings /etc/stratux.conf: open /etc/stratux.conf: no such file or directory 2016/02/26 01:18:19 AHRS Info: initializing new Simple AHRS 2016/02/26 01:18:19 AHRS Info: couldn't start ahrswebListener: dial tcp [::1]:8000: getsockopt: connection refused 2016/02/26 01:18:10 Stratux v1.3b1 (a6f9aaf9f52caab49017dfde3701306fd94f0af6) starting. 2016/02/26 01:18:10 Entered uatReader() ... 2016/02/26 01:18:10 can't read settings /etc/stratux.conf: open /etc/stratux.conf: no such file or directory 2016/02/26 01:18:10 AHRS Info: initializing new Simple AHRS 2016/02/26 01:18:10 AHRS Info: couldn't start ahrswebListener: dial tcp [::1]:8000: getsockopt: connection refused 2016/02/26 01:18:11 ===== UAT Device Name : Generic RTL2832U OEM ===== 2016/02/26 01:18:11 ===== UAT Device Serial: stx:978:-35===== 2016/02/26 01:18:11 GetTunerType: RTLSDR_TUNER_R820T 2016/02/26 01:18:11 SetTunerGainMode Successful 2016/02/26 01:18:11 SetTunerGain Successful 2016/02/26 01:18:11 GetTunerGain: 480 2016/02/26 01:18:12 SetSampleRate - rate: 2083334 2016/02/26 01:18:12 GetSampleRate: 2083334 2016/02/26 01:18:12 GetXtalFreq - Rtl: 28800000, Tuner: 28800000 2016/02/26 01:18:12 SetXtalFreq - Center freq: 28800000, Tuner freq: 28800000 2016/02/26 01:18:12 SetCenterFreq 978MHz Successful 2016/02/26 01:18:12 GetCenterFreq: 978000000 2016/02/26 01:18:12 Setting Bandwidth: 1000000 2016/02/26 01:18:12 SetTunerBw 1000000 Successful 2016/02/26 01:18:12 ResetBuffer Successful 2016/02/26 01:18:12 GetFreqCorrection: 0 2016/02/26 01:18:12 SetFreqCorrection -35 Successful 2016/02/26 01:18:12 Entered UAT read() ... 2016/02/26 01:18:12 ===== ES Device Serial: stx:1090:-30 PPM -30 ===== 2016/02/26 01:18:12 Entered ES read() ... 2016/02/26 01:18:12 Executed /usr/bin/dump1090 successfully... 2016/02/26 01:18:14 AHRS Info: attempting pressure sensor connection. 2016/02/26 01:18:14 Using SiRFIV config. 2016/02/26 01:18:14 BMP280 Connection Attempt 1 2016/02/26 01:18:14 AHRS Info: Successfully initialized BMP280 2016/02/26 01:18:14 AHRS Info: attempting IMU connection. 2016/02/26 01:18:14 AHRS Info: attempting to connect to MPU9250 2016/02/26 01:18:14 AHRS Info: Making new MPU9250 2016/02/26 01:18:14 MPU9250: Error reading calibration data from /etc/mpu9250cal.json: open /etc/mpu9250cal.json: no such file or directory 2016/02/26 01:18:14 Raw mag calibrations: 199 193 195 2016/02/26 01:18:14 MPU9250 Mag bias: 0.191594 0.188078 0.189250 2016/02/26 01:18:14 AHRS Info: Setting MPU9250 LPF 2016/02/26 01:18:14 AHRS Info: monitoring IMU 2016/02/26 01:18:15 AHRS Info: Successfully connected MPU9250 2016/02/26 01:18:15 AHRS Info: Calibrating IMU 2016/02/26 01:18:16 AHRS Info: IMU Calibrated: accel 0.282931 0.636714 -0.731433; gyro 77.705466 -0.073397 125.101169 2016/02/26 01:18:16 AHRS Gyro/Accel Error: MPU9250 Error: No new accel/gyro values 2016/02/26 01:18:16 AHRS Gyro/Accel Error: MPU9250 Error: No new accel/gyro values 2016/02/26 01:18:21 setting system time to: '20170802 02:01:00.926 UTC' 2017/08/02 02:01:00 Time set from GPS. Current time is 2017-08-02 02:01:00.927033489 +0000 UTC 2017/08/02 02:01:00 AHRS Info: Reinitializing at -6795364567.661345 2017/08/02 02:01:19 client connected: 192.168.10.10:4000 (ismar). 2017/08/02 02:01:19 stats [started: 29 seconds ago] 2017/08/02 02:01:19 - Disk bytes used = 1.8 GB (97.7 %), Disk bytes free = 43 MB (2.3 %) 2017/08/02 02:01:19 - CPUTemp=45.08 deg C, MemStats.Alloc=2.3 MB, MemStats.Sys=8.8 MB, totalNetworkMessagesSent=0 2017/08/02 02:01:19 - CPU load 0.95 0.27 0.09 2017/08/02 02:01:19 - UAT/min 0/0 [maxSS=0.00%], ES/min 147/147, Total traffic targets tracked=3 2017/08/02 02:01:19 - Network data messages sent: 0 total, 0 nonqueueable. Network data bytes sent: 0 total, 0 nonqueueable. 2017/08/02 02:01:19 - Last GPS fix: now, GPS solution type: 1 using 6 satellites (9/12 seen/tracked), NACp: 9, est accuracy 11.20 m 2017/08/02 02:01:19 - GPS vertical velocity: 0.00 ft/sec; GPS vertical accuracy: 13 m 2017/08/02 02:01:19 - Last IMU read: now 2017/08/02 02:01:19 - Last BMP read: now

If possible, enable "Replay Logs", reproduce the problem, and provide a copy of the logs in http://192.168.10.1/logs/stratux/ and http://192.168.10.1/logs/stratux.log.

peepsnet commented 7 years ago

SD card corruption Is common with underpowered supplies. If your power supply is not providing over to amps you're likely to have that corruption quite constantly. I lost about four cards to plugging it into a standard car charger or USB port in my car.

You definitely want to get a 223 amp charger just to make sure

ismarhernandez commented 7 years ago

I understand where you're coming from, but as I mentioned in the post, I tried this using several power sources, including a wall plug adapter giving me the correct voltage and amps.

Nokomis449 commented 7 years ago

Per this, a green blinking light 10 times per second indicates a system error. I suggest you re-image your SD card and see if the problem goes away. It may be as simple as your card being full, especially if you have logging turned on, especially if you didn't expand your card. https://github.com/cyoung/stratux/commit/176cf42f2e8a03852456782ac4e3903d703fca30

ismarhernandez commented 7 years ago

I have to constantly flash the card to get it working again. logging is not turned on... I dont understand the part of expanding the card... i have a 16gb card on, there's plenty of space.

Nokomis449 commented 7 years ago

You have a 16G card, but the image you're putting on it is about 2G. So unless you expand the partition, your system only "sees" 2G. If you know how to SSH, Google how to expand a Pi card and you'll find an easy tutorial.

ismarhernandez commented 7 years ago

done, but it just did it to me on wall power.

ismarhernandez commented 7 years ago

on the 192.168.10.1 says i still have space on my sd card. I just dont know why is the SD card constantly getting corrupted. it doesnt matter how many methods i use to read only that card, i just dont seem to either understand, or they just fail

Nokomis449 commented 7 years ago

Don't assume that it's adequate just because it's a wall charger. Chargers are meant to CHARGE things, not POWER things. You can charge your car battery with a 1/2amp charger just as well as you can charge it with a 10amp charger; it'll just take a lot longer. A lot of 5v phone chargers, wall plugs included, are rated for 1/2amp or so, and is fine for charging a phone overnight. But a Pi in the Stratux configuration needs over an amp of power at times. If the RED light isn't on, then the Pi isn't getting enough power. And just as important as the power source is the cable. You can try to jumpstart a car using 8ga cables and it might work and it might not, but if you put some thicker cables on there, it'll fire right up. Same with USB cords. They come in different sizes, and a long cable or a smaller gauge cable is not going to be able to supply the amps that the Stratux needs, regardless of power source. Your initial post says you don't have a RED light. That's where I'd start. Anker is a good brand for power AND cables, and there are others. If you can SSH into it, check the log files in /var/log and see if there's a clue there. Your problem seems to be unique to you, so start with the red light and go from there. Also, the green light should be steady, but since it's fast blinking it is screaming "I'M SICK!". The fan is a seperate program from Stratux, so just because the fan starts up at boot doesn't imply that Stratux is starting up. Good luck!

ismarhernandez commented 7 years ago

got it... I appreciate a lot your input, but the amps and voltage are proper. I have used several cables, including a DC regulator where I can select the correct amount of amps and voltage. I have tried with a vast array of things, it works fine, but the next time I try to start it up, it doesn't work. In other words, I have to re-flash the card every time to make it work. Maybe I should rephrase the problem... Can someone help me make the SD card read only and break it into baby steps?

Nokomis449 commented 7 years ago

Well the red light is a Pi thing, not a Stratux thing. The red light shuts off if the Pi voltage drops below (I think) 4.8 volts. So if you don't have a red light and don't have low voltage, then your Pi has a problem.

ismarhernandez commented 7 years ago

thank you so much Nokomis449... the pi is working fine. I may have this issue after one use or 2 uses, but I get the issue where I have to constantly reflash the card... at this point the PI issue is discarded. I just needed some help with making my SD card READ ONLY.... does anyone have any ideas in baby steps? has anyone tried this before?

rhole commented 7 years ago

Could it be a defective SD card? You might try a different card.

Rick & Sonia Hole Email: r.hole@ieee.orgmailto:r.hole@ieee.org

On Aug 1, 2017, at 8:57 PM, ismarhernandez notifications@github.com<mailto:notifications@github.com> wrote:

thank you so much Nokomis449... the pi is working fine. I may have this issue after one use or 2 uses, but I get the issue where I have to constantly reflash the card... at this point the PI issue is discarded. I just needed some help with making my SD card READ ONLY.... does anyone have any ideas in baby steps? has anyone tried this before?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/cyoung/stratux/issues/654#issuecomment-319554056, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARCCfasOAMkdnL9HaWD8p9kE7ZNwRw-zks5sT-WigaJpZM4OqdDi.

ismarhernandez commented 7 years ago

well, I thought of that also... I went ahead a purchased two more cards. Another 16gb card and a 32gb card. it still does the same thing. The pi doesn't have any issues and it's not underpowered. Thank you so much for your help rhole... for now, the last thing I want to try is to make my SD card read only. If anyone know how to make an SD "read-only" and you don't mind sharing your knowledge, please let me know. I'm not very computer savvy, but I can follow instructions to the letter if you provide me with those.

rhole commented 7 years ago

Have you proved it has sufficient power? Others have had similar problems solved by power supply or power cord upgrades. What counts is power at the RPi. The SDRs draw considerable power. If you could measure the 5 volt at RPi to be sure it has proper voltage you will settle the issue. Canakit offers a wall wart supply at 5.2v because many RPi users have seen power related issues. I have a not-Stratux application and set the voltage at 5.1 volts as a preventative measure. The Stratux community wants you to succeed! By the way, if you connect an HDMI monitor, USB keyboard and mouse you will boot up with a graphic interface and can query the two volumes on the SD card to see what free space is there. When you load the SD card from an image the SD becomes the size of the image (about 2gb) regardless of the physical size of the card. You must expand the file system to make the space above 2gb usable. Making a read only RPi is a complex task. I am not a Stratux developer and do not know if Stratux must have read/write access to the SD file system to run. Perhaps developers can answer that question.

Rick Hole

On Aug 2, 2017, at 8:51 AM, ismarhernandez notifications@github.com<mailto:notifications@github.com> wrote:

well, I thought of that also... I went ahead a purchased two more cards. Another 16gb card and a 32gb card. it still does the same thing. The pi doesn't have any issues and it's not underpowered. Thank you so much for your help rhole... for now, the last thing I want to try is to make my SD card read only. If anyone know how to make an SD "read-only" and you don't mind sharing your knowledge, please let me know. I'm not very computer savvy, but I can follow instructions to the letter if you provide me with those.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/cyoung/stratux/issues/654#issuecomment-319696307, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARCCfTsBjs3Tb5UlH_obLEr6mfAyjqOaks5sUIzRgaJpZM4OqdDi.

cyoung commented 7 years ago

@ismarhernandez - you experience this error with a brand new SD card? An SD card that is physically damaged can cause erratic behavior that is "fixed" temporarily by re-imaging.

ismarhernandez commented 7 years ago

I have purchased 3 different cards. two 16gb cards and one 32gb card. these behave in the same way. I had a friend of mine check these cards, and he said there was no problem. I then installed the 32gb card in a picture portrait display and filled all 32gb with images with pictures. about a month 15 days later I tried accessing the pictures and there was not an issue. The issue comes when I flash the Stratux software to the SD card and begin using it. After the first of second use, the stratux does not restart at all. I can leave it connected for an hour, connect it to a viable power supply, switch cables, dance around it, but it will not start. The only way to re-start it is by physically taking out the SD card, reflashing the SD with the stratux 1.3 software, and inserting it again. After this, I can connect the stratux to any power source, even if it's a 1 amp (I don't do this, but I did it once) it WILL work. Once it starts working, it will not quit. I have left the unit working for 24h without an issue.... I then turned it off and let it rest for about 5 hours. then I turned it on for an hour and it worked just fine, and on a different power source. That day I went to fly and it did not work (wi-fi) not showing up. For some reason, stratux is corrupting the SD card... I heard the best solution is to configure the SD card to be read only, that way, the SD card cannot be overwritten by the stratux and the files cannot be corrupted.

cyoung commented 7 years ago

From what you've written it's hard to tell exactly what is going on. Can you confirm that you have re-imaged three different microSD cards with stratux, and each of these three microSD cards have individually become corrupted?

ismarhernandez commented 7 years ago

yes, three different SD cards... one 32gb card, and two 16gb cards... I have had to reimaged each card, probably about 6-8 times (each card) within the last month.

jzeevi commented 7 years ago

Have you actually looked at the cards to make sure they really are corrupted and there’s not some other issue? (marginal HW, etc)

From: ismarhernandez [mailto:notifications@github.com] Sent: Thursday, August 03, 2017 8:35 AM To: cyoung/stratux Cc: Subscribed Subject: Re: [cyoung/stratux] Constant SD card corruption after proper shutdown (#654)

yes, three different SD cards... one 32gb card, and two 16gb cards... I have had to reimaged each card, probably about 6-8 times (each card) within the last month.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cyoung/stratux/issues/654#issuecomment-319970271 , or mute the thread https://github.com/notifications/unsubscribe-auth/APJ34cCVY0S0gx-dj9TUugOVfVS9tc9Mks5sUcxqgaJpZM4OqdDi . https://github.com/notifications/beacon/APJ34SVftBoEIMuEkWlD6MuCTTx5vFSpks5sUcxqgaJpZM4OqdDi.gif

ismarhernandez commented 7 years ago

how do you know if they are corrupted? Im having this idea of being corrupted because re-flashing fixes the issue AND I have checked the stratux and it has appropriate power, AND I have used three good cards, AND I properly turn off the stratux through 192.168.10.1. is there a way to find out exactly? I have a MAC

jzeevi commented 7 years ago

You should be able to mount them on the MAC (similar to what you do when flashing it) and see it you can do an ls to see the files (there are two sections, as I recall – a boot section and the main file system).

From: ismarhernandez [mailto:notifications@github.com] Sent: Thursday, August 03, 2017 8:40 AM To: cyoung/stratux Cc: Josef Zeevi; Comment Subject: Re: [cyoung/stratux] Constant SD card corruption after proper shutdown (#654)

how do you know if they are corrupted? Im having this idea of being corrupted because re-flashing fixes the issue AND I have checked the stratux and it has appropriate power, AND I have used three good cards. is there a way to find out exactly? I have a MAC

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cyoung/stratux/issues/654#issuecomment-319971739 , or mute the thread https://github.com/notifications/unsubscribe-auth/APJ34TQmtA39LuUd7jWNS1ISQGLJlUPHks5sUc3EgaJpZM4OqdDi . https://github.com/notifications/beacon/APJ34SGwTiIgoVO5UwWfqT2CCwgEEYMDks5sUc3EgaJpZM4OqdDi.gif

ismarhernandez commented 7 years ago

gotcha... I can only see one section. for the most part I dont have any folders visible. however, i can see these folders if i select to view hidden folders. after doing so, I am not able to access the two other hidden folders. :/

jzeevi commented 7 years ago

Er, what do you mean “after doing so, …”

From: ismarhernandez [mailto:notifications@github.com] Sent: Thursday, August 03, 2017 8:52 AM To: cyoung/stratux Cc: Josef Zeevi; Comment Subject: Re: [cyoung/stratux] Constant SD card corruption after proper shutdown (#654)

gotcha... I can only see one section. for the most part I dont have any folders visible. however, i can see these folders if i select to view hidden folders. after doing so, I am not able to access the two other hidden folders. :/

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cyoung/stratux/issues/654#issuecomment-319975035 , or mute the thread https://github.com/notifications/unsubscribe-auth/APJ34XVLoGak4Beqnqt8vCwjBe4zQYYTks5sUdCQgaJpZM4OqdDi . https://github.com/notifications/beacon/APJ34U-4RfswNpmFpNXE2yUvzqE7cOi7ks5sUdCQgaJpZM4OqdDi.gif

ismarhernandez commented 7 years ago

after displaying the hidden folders

jzeevi commented 7 years ago

You’re saying, then, that you can only see the folders one time only. You cannot see them again before you use the card?

From: ismarhernandez [mailto:notifications@github.com] Sent: Thursday, August 03, 2017 9:03 AM To: cyoung/stratux Cc: Josef Zeevi; Comment Subject: Re: [cyoung/stratux] Constant SD card corruption after proper shutdown (#654)

after displaying the hidden folders

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cyoung/stratux/issues/654#issuecomment-319978132 , or mute the thread https://github.com/notifications/unsubscribe-auth/APJ34TyjuKy5oJbkPkejjRksd9lZ0_Y-ks5sUdMUgaJpZM4OqdDi . https://github.com/notifications/beacon/APJ34VDcvVzI49ZTRJpYzlTwDUwi6JGCks5sUdMUgaJpZM4OqdDi.gif

ismarhernandez commented 7 years ago

I can see them before and after using the card, but they appear as hidden folders (ghost looking), and I am unable to access them. However, on the SD card, as soon as I access it I see other files, .sh files, .exe files and other things.

jzeevi commented 7 years ago

Sounds like that mount point isn’t being affected, then. Those hidden files are normal as part of the system.

Maybe someone can offer up a method to mount the secondary file system, or you can view it on the rPi.

From: ismarhernandez [mailto:notifications@github.com] Sent: Thursday, August 03, 2017 9:24 AM To: cyoung/stratux Cc: Josef Zeevi; Comment Subject: Re: [cyoung/stratux] Constant SD card corruption after proper shutdown (#654)

I can see them before and after using the card, but they appear as hidden folders (ghost looking), and I am unable to access them. However, on the SD card, as soon as I access it I see other files, .sh files, .exe files and other things.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cyoung/stratux/issues/654#issuecomment-319984210 , or mute the thread https://github.com/notifications/unsubscribe-auth/APJ34aH_yzOuzDrlfCFuVQTKvvnIhCz-ks5sUdgcgaJpZM4OqdDi . https://github.com/notifications/beacon/APJ34bYRucyzQZujEyLdlr8fF72Qjr7_ks5sUdgcgaJpZM4OqdDi.gif

ismarhernandez commented 7 years ago

what do you mean about secondary file system setup -sorry, but I'm not a programmer in any shape or form. However, I can follow instructions to the letter if you guys tell me how.

ismarhernandez commented 7 years ago

i tried following this: Here is a way to make the Stratux Read Only from a Windows PC:

!/bin/bash

Pi Update / Make-Read-Only Script.

Download the script files from: https://github.com/cyoung/stratux/issues/78

When unpacked, you will have a folder named "ropi"

In the folder downloaded from above, save this script starting from the #!/bin/bash as a text file and name the

file "setup.sh" replacing the "setup.sh" in the "ropi" directory

With Filezilla copy "ropi" directory to the pi to /home/pi/

Connect pi to Ethernet for Internet access to install packages in script

SSH to the pi and within the /home/pi/ropi directory and run: sudo bash setup.sh

After installation: sudo reboot or sudo halt

Replace the default DHCP server startup file

scp /home/pi/ropi/isc-dhcp-server /etc/init.d/isc-dhcp-server

Remove the checkroot-bootclean.sh script

update-rc.d -f checkroot-bootclean.sh remove rm -f /etc/init.d/checkroot-bootclean.sh

Add the ro / rw commands

scp /home/pi/ropi/ro /usr/bin/ro scp /home/pi/ropi/rw /usr/bin/rw

Remove a bunch of stuff we don't need

apt-get -y remove --purge triggerhappy cron logrotate dphys-swapfile fake-hwclock apt-get -y autoremove --purge

Install the busybox version of syslogd

apt-get -y install busybox-syslogd dpkg --purge rsyslog

Delete a bunch of stuff to make clean mount points

rm -rf /tmp/ rm -rf /var/tmp/ rm -rf /var/log/ rm -rf /var/lib/dhcp/

Replace the /boot/cmdline.txt file with the RO, fastboot version

scp /home/pi/ropi/cmdline.txt /boot/cmdline.txt

Replace the fstab with our RO version

scp /home/pi/ropi/fstab /etc/fstab ///////// but I noticed that it did not make the file read-only....

cyoung commented 7 years ago

Try with the latest image: https://github.com/cyoung/stratux/releases/download/v1.4r1/stratux-v1.4r1-f6bad36cdc.img.zip.

You definitely shouldn't be using the dev image.

ismarhernandez commented 7 years ago

ok.... Will try with the latest image... Downloading it right now. I will put it to the test.

jzeevi commented 7 years ago

Also, to test if Stratux is corrupting the image, you can connect to Stratux via the web page (192.168.10.1) go to settings, and do a shutdown before yanking power.

From: ismarhernandez [mailto:notifications@github.com] Sent: Thursday, August 03, 2017 9:46 AM To: cyoung/stratux Cc: Josef Zeevi; Comment Subject: Re: [cyoung/stratux] Constant SD card corruption after proper shutdown (#654)

i tried following this: Here is a way to make the Stratux Read Only from a Windows PC:

!/bin/bash

Pi Update / Make-Read-Only Script.

Download the script files from: #78 https://github.com/cyoung/stratux/issues/78

When unpacked, you will have a folder named "ropi"

In the folder downloaded from above, save this script starting from the #!/bin/bash as a text file and name the

file "setup.sh" replacing the "setup.sh" in the "ropi" directory

With Filezilla copy "ropi" directory to the pi to /home/pi/

Connect pi to Ethernet for Internet access to install packages in script

SSH to the pi and within the /home/pi/ropi directory and run: sudo bash setup.sh

After installation: sudo reboot or sudo halt

Replace the default DHCP server startup file

scp /home/pi/ropi/isc-dhcp-server /etc/init.d/isc-dhcp-server

Remove the checkroot-bootclean.sh script

update-rc.d -f checkroot-bootclean.sh remove rm -f /etc/init.d/checkroot-bootclean.sh

Add the ro / rw commands

scp /home/pi/ropi/ro /usr/bin/ro scp /home/pi/ropi/rw /usr/bin/rw

Remove a bunch of stuff we don't need

apt-get -y remove --purge triggerhappy cron logrotate dphys-swapfile fake-hwclock apt-get -y autoremove --purge

Install the busybox version of syslogd

apt-get -y install busybox-syslogd dpkg --purge rsyslog

Delete a bunch of stuff to make clean mount points

rm -rf /tmp/ rm -rf /var/tmp/ rm -rf /var/log/ rm -rf /var/lib/dhcp/

Replace the /boot/cmdline.txt file with the RO, fastboot version

scp /home/pi/ropi/cmdline.txt /boot/cmdline.txt

Replace the fstab with our RO version

scp /home/pi/ropi/fstab /etc/fstab ///////// but I noticed that it did not make the file read-only....

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cyoung/stratux/issues/654#issuecomment-319990792 , or mute the thread https://github.com/notifications/unsubscribe-auth/APJ34f2fYXYBjhSXV0PZwNbukSc-Wsq8ks5sUd01gaJpZM4OqdDi . https://github.com/notifications/beacon/APJ34eaUiMfsDtzrvY-uGVCxldAumUPXks5sUd01gaJpZM4OqdDi.gif

ismarhernandez commented 7 years ago

yes, that's how I usually shut down the power. first I go to the 192.168.10.1 page, then go to settings, then i select the shutdown button and confirm I want to shut down. I then give it a good 10 seconds after confirming shutdown and then disconnect it.

ismarhernandez commented 7 years ago

cyoung, what does the "dev" image means? was that one not good?

cyoung commented 7 years ago

Did the non-dev image work, then? @ismarhernandez

ismarhernandez commented 7 years ago

@cyoung

Hello! At this time I have not had any issues. I wanted to test it for this month and see if the problem has been fully fixed. I noticed the red light and the green light are continuously on after I switched the version. The power supply cable, the power supply, and the SD card are the same as before. The only thing I changed was the version. I am starting to think the problem was with the "dev" image, and not with the power supply or SD card.

cyoung commented 7 years ago

I think that was the case. Re-open if you have further issues. Thanks for responding.