Raspberry Pi 3 returns input/output error and crashes system when trying to update on 64GB card - raspberry-pi

I'm trying to set up my Raspberry Pi with a 64GB micro-SD card using the image file 2018-04-18-raspbian-stretch-lite.
Every time I try to update or install software on the card, the system gives me the following error message:
dpkg: unrecoverable fatal error, aborting:
unable to sync directory '/var/lib/dpkg/updates/': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - pkgDPkgPM::Go (30: Read-only file system)
The system then refuses to run any more programs and I cannot access the system again after I log out. (I normally access my Raspberry Pi via SSH.) I've checked the filesystem on the card, as per this article, and Disk Utility is telling me the card is FAT32, so that doesn't seem to be the issue; and besides the article says the card shouldn't even boot up the first time if I was using the wrong filesystem.
I have tried installing Raspbian on two different 64GB cards now and have got the same result on both. Additionally, I tried doing the same thing on a 16GB card and it worked normally.

Related

Building Yocto for i.MX8 in an external USB HDD

I'm trying to build an image using bitbake for the i.MX8 board.
I'm following these instructions:
https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf
Since I do not have enough space in local HDD, I'm using an external USB HDD (I have other unrelated stuff stored in this HDD).
I have been successfull at executing the imx-setup-release.sh script in that document, with which I built a configuration for the imx8mm-lppddr4-evk machine using the fslc-wayland distro.
However, when I try a command, such as "bitbake core-image-minimal", I get several failed tasks. It seems that the common deminator is the fact that, for some reason, when the path to my build folder is passed (which is within the external HDD), it is considered an invalid argument.
I get messages such as this:
OSError: [Errno 22] Invalid argument: '/media/home_dir/427AD2297AD2198D/imx-yocto-bsp/build_fslc_wayland_imx8mm_lpddr_evk/sstate-cache/95/51/sigtask.1jbsd4s4' -> '/media/home_dir/427AD2297AD2198D/imx-yocto-bsp/build_fslc_wayland_imx8mm_lpddr_evk/sstate-cache/95/51/sstate:core-image-minimal:imx8mm_lpddr4_evk-fslc-linux:1.0:r0:imx8mm_lpddr4_evk:3:955169ece771b852dc433575442e7ed805ac56cbcb1ebd3aa913a632da23a46b_clean.tgz.siginfo'.
It seems that bitbake is having trouble parsing the path to my HDD (that 427AD.../ folder).
What should I do to fix this?
The issue was that my HDD was not formatted with an ext4 format. Once I did that, those errors went away.

Is there a library for MSR605X that works with Raspberry Pi?

I have been trying to locate a working library for the MSR605X magnetic card reader/writer. At time of writing, I have tried five separate libraries. Only two of these were explicitly for the 605X the other three were for the older 605. All the libraries I have tried either did nothing at all or errored before completing a command (can't figure out the errors either).
I am running Raspberry Pi OS 32 bit on a Raspberry Pi 3 B+ the MSR605X communicates via a USB connection.
So far the library that seems to be most complete is: https://pypi.org/project/msrx/
However, I can not get this library to read or write (either nothing happens or I get a Serial exception "cannot reconfig port).
Any help or links to documentation for this reader is welcome.
EDIT: Adding the commands ran with the above library
msrx -D /dev/input/event4 read
msrx -D /dev/input/jso0 read
The -D is to specify the device path (default is /dev/ttyUSB0 which doesn't exist on my system). I obtained the above two paths by searching for USB serial devices then matching the search result to the device ID which I obtained from lsusb.
Running these commands results in a serial exception (could not reconfig port) which I assume means that I have the wrong device path. I have also checked for any tty* device paths that are changed when I plug in the reader. I consistently get a permission denied error whenever trying to run the above commands with a tty* device path (I am root on this system).
msrx author here — MSR605 requires an external 9V power injected into its cable (via the barrel jack port), otherwise it won't power up properly.

Raspberry Pi + ownCloud: never stops finishing setup wizard

Model: Raspberry Pi 3 model B+
OS: Raspbian Stretch
Target disk for data storage: Netgear readyNAS (NTFS, fstab mounted) with share for ownCloud and www-data as owner on mount
I've been following this guide for installing and setting up ownCloud on my Pi. I've been following every step and doing exactly what the guide says.
It all goes well until the very last step where I fill out the forms for setting up ownCloud via the browser, seemingly correct inputs and no errors, and when i click the finish button it just loads forever. The browser also indicates that the page is loading and this goes on forever.
Tables in the ownCloud database on the Pi gets created so something is happening, but it never seems to create the admin user as the oc_users table is empty no matter how long I wait. The Pi also seems to slow down drastically when doing this as it takes forever to perform simple and otherwise instant tasks like ls, rmdir, rm, etc...
The target disk for data storage as filled in in the ownCloud wizard data directory path is a NAS disk mounted with www-data (uid/guid 33) as owner and chmoded with 777. I know for a fact that the www-data user has the right privileges to the disk since I've overcome permission issues before as well as the correct mysql credentials. Ive tried ownCloud version 10.0.3/8 and 9.1.8 with the same result.
Has anybody encountered this issue before or have any clue what this is all about?
Turns out it was just insanely slow..
Had it running for about 2 hours and it finally finished and prompted me to the login page where I was able to login and finally use my ownCloud. Installed a php cache optimizer and it seemed to have improved a bit.

Raspberry pi doesn't boot after config.txt was deleted

As i said in the title I deleted the config.txt file in the raspberry pi(raspbian). Why is that you might ask ? Well before that the raspberry pi was starting but could not boot. The following error message was on the screen : " error -110 transfering data sector 133646 ". The same message was printing on the screen with the last number incrementing of 1, every second.
So I thought the file system was corrupted and wanted to resolve that, problem is I deleted the config file wich seemed to be the problem, maybe that wasn't so smart.
Now the raspberry pi is not even booting which means that I don't even see error message on the screen and cannot access the raspberry.
My question is : how can I get the pi to boot again ? Can you give me a good config.txt file so that i can try it with that ?
Thanks a lot for your time and expertise.
I have the found the solution, I used chkdsk from Windows. It restored and repaired the file system so all is good.

Using MPI with two RaspberryPi

I am trying to make a 'dual core' RaspberryPi for a project I am working on. I had followed this tutorial by Simon Cox. Unfortunately I could not get the two RasPi to talk to each other. (This was using Hydra as the process manager)
After looking more carefully at the MPICH installers guide, which can be found here, I tried to use the -phrase to pass the passphrase I had created. However I could not find it as part of the hydra commands. So I re-installed with smpd and after many compiling attempts. I configured with:
/configure -prefix=/home/pi/mpich-install --with-pm=smpd --with-pmi=smpd
I also had to install libbsl-dev to get the MD5 that smpd requires. I also exported the path that the commands mpiexec and mpicc are in. After setting the passphrase I copied the image to a second SD card and put it in a second RasPi. I then set up the passphrase using ssh-keygen.
I was able to run the cpi program on the master Pi and the slave Pi individually but when I tried to run multiple processes on both at the same time I got the error
Fatal error in MPI_Init: Other MPI error, error stack:
MPIR_Init``_thread(392).................:
MPID_Init(139)........................: channel initialization failed
MPIDI_CH3_Init(38)....................:
MPID_nem_init(196)....................:
MPIDI_CH3I_Seg_commit(366)............:
MPIU_SHMW_Hnd_deserialize(324)........:
MPIU_SHMW_Seg_open(863)...............:
MPIU_SHMW_Seg_create_attach_templ(637): open failed - No such file or directory
Can someone please suggest how I can either fix this problem or get the RaspberryPis to communicate using MPICH?
Thanks
E.Lee
If anyone else has this problem make sure your hosts don't have the same name!
You can change it by following this tutorial http://raspi.tv/2012/how-to-change-the-name-of-your-raspberry-pi-new-hostname