Lucifer22334
Posts: 130
Joined: Wed Mar 06, 2019 7:36 am

Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 6:27 am

Hi,


I am trying to create a file from command line in raspberry pi 3 B by using

touch a.txt but it is giving me error this:

pi@raspberrypi:~ $ touch a.txt
touch: cannot touch 'a.txt': Read-only file system

I tried creating a file directly on desktop but still same Error.

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 6:36 am

Damaged or fake uSD card?

Try it on another system.
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

Lucifer22334
Posts: 130
Joined: Wed Mar 06, 2019 7:36 am

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 6:49 am

wildfire wrote:
Tue Jul 23, 2019 6:36 am
Damaged or fake uSD card?

Try it on another system.
Nope Latest Samsung SD card 16GB. Tried on different raspberry pi same sd card same Error. I think the latest Raspbian stretch has some issues. For the confirmation, I am again trying to load stretch on it and try once again if not works I will try with a different version of stretch and if that doesn't work then probably SD card is damaged as you said.

Lucifer22334
Posts: 130
Joined: Wed Mar 06, 2019 7:36 am

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:02 am

wildfire wrote:
Tue Jul 23, 2019 6:36 am
Damaged or fake uSD card?

Try it on another system.
Tried new stretch before hitting sudo apt-get upgrade Everything works fine but in sudo apt-get upgrade it throws Error so I guess due to that it is causing the problem.
why there is error in running Sudo-apt-get upgrade?

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:04 am

FWIW, Buster runs perfectly fine on my 3B+

If you're going to try a fresh image anyway use Buster rather than Stretch.
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

Lucifer22334
Posts: 130
Joined: Wed Mar 06, 2019 7:36 am

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:06 am

wildfire wrote:
Tue Jul 23, 2019 7:04 am
FWIW, Buster runs perfectly fine on my 3B+

If you're going to try a fresh image anyway use Buster rather than Stretch.
I want to run snips.ai on raspberry pi 3 and they strongly recommend stretch. There are issue on there part which is work in progress regarding buster.

pcmanbob
Posts: 9298
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:07 am

If you can't create a file in your home directory then either your SD card has gone read only , your system has become corrupt in some way or you have made changes to the pi user or directory permissions.

If every thing is working correctly you should have no problem creating a file in stretch.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Lucifer22334
Posts: 130
Joined: Wed Mar 06, 2019 7:36 am

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:11 am

pcmanbob wrote:
Tue Jul 23, 2019 7:07 am
If you can't create a file in your home directory then either your SD card has gone read only , your system has become corrupt in some way or you have made changes to the pi user or directory permissions.

If everything is working correctly you should have no problem creating a file in the stretch.
I have loaded again for confirmation that if my card is corrupted or system. I loaded stretch again and it was running great until I ran sudo apt-get upgrade.

Then it changed the system read-write permission to read-only and then I cant create the file or open raspi-config or anything. So there is a problem with stretch I think.

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:17 am

Lucifer22334 wrote:
Tue Jul 23, 2019 7:11 am
Then it changed the system read-write permission to read-only and then I cant create the file or open raspi-config or anything. So there is a problem with stretch I think.
There is no problem with Stretch, my zero w's and my other 3B+ are still using it.
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

Lucifer22334
Posts: 130
Joined: Wed Mar 06, 2019 7:36 am

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:19 am

wildfire wrote:
Tue Jul 23, 2019 7:17 am
Lucifer22334 wrote:
Tue Jul 23, 2019 7:11 am
Then it changed the system read-write permission to read-only and then I cant create the file or open raspi-config or anything. So there is a problem with stretch I think.
There is no problem with Stretch, my zero w's and my other 3B+ are still using it.
ok I will try with new sd card.

pcmanbob
Posts: 9298
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:20 am

If there was a problem with stretch then everyone would be complaining of it.

How did you re-flash your SD card ?

I would recommend you test your SD card using H2testw if using windows or some other card testing software if using another OS to flash your SD card.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Lucifer22334
Posts: 130
Joined: Wed Mar 06, 2019 7:36 am

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:22 am

pcmanbob wrote:
Tue Jul 23, 2019 7:20 am
If there was a problem with stretch then everyone would be complaining of it.

How did you re-flash your SD card ?

I would recommend you test your SD card using H2testw if using windows or some other card testing software if using another OS to flash your SD card.
I format it with SD card Formatter and then Load OS with Baleno Etcher.

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:27 am

Lucifer22334 wrote:
Tue Jul 23, 2019 7:22 am
I format it with SD card Formatter and then Load OS with Baleno Etcher.
Etcher does not need your uSD to be formatted, in fact to avoid unnecessary wear and tear I'd advise you don't.
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

Lucifer22334
Posts: 130
Joined: Wed Mar 06, 2019 7:36 am

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 7:31 am

wildfire wrote:
Tue Jul 23, 2019 7:27 am
Lucifer22334 wrote:
Tue Jul 23, 2019 7:22 am
I format it with SD card Formatter and then Load OS with Baleno Etcher.
Etcher does not need your uSD to be formatted, in fact to avoid unnecessary wear and tear I'd advise you don't.
Right now I am loading 2018 stretch version on SD card directly through etcher without formatting lets see what happens.

Lucifer22334
Posts: 130
Joined: Wed Mar 06, 2019 7:36 am

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 12:12 pm

without updating and upgrading it is working great. so I have checked with updating and upgrading it creates issues. And Does any one know how to set default output sound device to 3.5 mm jack and microphone input to USB one in asound.conf? I have tried but no sound comes out.

fruitoftheloom
Posts: 23132
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Error Creating a File in Raspbian stretch

Tue Jul 23, 2019 1:39 pm

Lucifer22334 wrote:
Tue Jul 23, 2019 12:12 pm
without updating and upgrading it is working great. so I have checked with updating and upgrading it creates issues. And Does any one know how to set default output sound device to 3.5 mm jack and microphone input to USB one in asound.conf? I have tried but no sound comes out.

FYI Raspbian Buster is the current supported Operating System since 20th June 2019:

https://www.raspberrypi.org/downloads/raspbian/
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

Return to “General discussion”