Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: how to change a config setting in a read-only image?  (Read 1207 times)

0 Members and 1 Guest are viewing this topic.

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
how to change a config setting in a read-only image?
« on: November 04, 2015, 05:25:20 pm »
Hey guys, so im super close to my goal of running my pi to boot to a single rom. My only problem is this. Im using portablemame v2.0 image which is great, BUT, for the monitor im using, i need to access /boot/config.txt to change some screen settings to fit my lcd properly. I cannot change anything as the image is a read only setup, to avoid corruption on shut downs.  Is there anyway to change my config.txt on the read only image? This is my only issue

JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3306
  • Last login:Today at 12:36:30 pm
  • I want to build my own arcade controls!
Re: how to change a config setting in a read-only image?
« Reply #1 on: November 04, 2015, 05:32:45 pm »
Is it made read only by using the lock on the sd card or a setting in the OS ?

If just in the OS then you need to go to the file and change it to allow writing - make your changes and save them then reset to read only.

According to an article here ( http://hallard.me/raspberry-pi-read-only/ ) this is the command for changing to/from read only mode
Quote
To set system to Read-Write use mount -o remount,rw / and to set it back to Read-Only mount -o remount,ro /

If using the lock slider then there should be a slide on the side of the SD card to unlock or lock the card (should be locked currently since you want it read only) - slide it to unlock and that will change it to read/write - change the file and then slide it back to lock ( makes it again read only)


« Last Edit: November 04, 2015, 05:47:34 pm by JDFan »

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: how to change a config setting in a read-only image?
« Reply #2 on: November 04, 2015, 08:06:22 pm »
Normally I'd say "I'm not an idiot".. But hey, sometimes the obvious kills ya ;) it isn't the tab. The image is made to be read only as to never go corrupt with a sudden shut down, which happens when a shutdown happens with the pi writing something. I will try that Command to mount and unmount it as I read a little something about that in my researching. Hope that does the trick
« Last Edit: November 04, 2015, 08:07:55 pm by aldub516 »

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: how to change a config setting in a read-only image?
« Reply #3 on: November 04, 2015, 08:42:39 pm »
Edit. So I tried it out, and those commands seem to have no response. It doesn't even tell me it's a bad command. It just goes down a line and waits for a new command. Portablepi has built in rwenable and roenable shortcuts but those do nothing as well.

JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3306
  • Last login:Today at 12:36:30 pm
  • I want to build my own arcade controls!
Re: how to change a config setting in a read-only image?
« Reply #4 on: November 04, 2015, 08:56:24 pm »
Edit. So I tried it out, and those commands seem to have no response. It doesn't even tell me it's a bad command. It just goes down a line and waits for a new command. Portablepi has built in rwenable and roenable shortcuts but those do nothing as well.

Did you try rebooting after using the rwenable shortcut (might need to reboot for the change to take effect )  :dunno

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: how to change a config setting in a read-only image?
« Reply #5 on: November 05, 2015, 03:10:15 am »
so it seems rwenable works, but im only able to write to a rc.local folder which holds boot options for the frontend. As i said im new to the pi, so I dont even really know how to navigate around well. Im wondering that since this is a custom distro, if maybe the normal /boot/config.txt file isnt even used? I need to change "disable overscan" and the overscan right, left etc values so my screen fits properly on the lcd

JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3306
  • Last login:Today at 12:36:30 pm
  • I want to build my own arcade controls!
Re: how to change a config setting in a read-only image?
« Reply #6 on: November 05, 2015, 09:04:28 am »
Not real familiar with the pi either - hopefully someone with more knowledge will chime in soon ! -- But since it is a text file - you could probably load it up on the windows PC - change the properties to allow writes - change the setting in notepad and save and move the SD card back to the pi and the change should remain.

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: how to change a config setting in a read-only image?
« Reply #7 on: November 05, 2015, 11:31:15 am »
 So last night at 3:30 in the morning I couldn't sleep for anything so I woke up and started working on this. And I figured out just what you said. I mounted the card on my PC made the changes then went back in and everything was good. For someone trying to make a dedicated machine/game,
I could not sing the praise of portable pimame any more. Minus the screen problem which is a pi issue, the front end loaded up right away with roms, and even a newbie like me was able to program a single game boot in seconds.

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: how to change a config setting in a read-only image?
« Reply #8 on: November 05, 2015, 01:58:26 pm »
it turns out that i figured out how to change the files, but now realize that the mame4all runs off its own config, so it still boots up to a giant screen.. Im now trying to learn how to better navigate around the pi directories to change different values

obcd

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 160
  • Last login:April 03, 2019, 11:44:36 am
  • I want to build my own arcade controls!
Re: how to change a config setting in a read-only image?
« Reply #9 on: November 05, 2015, 05:48:26 pm »
If you insert the SD in a windows pc, the boot folder containing the config.txt will become available as drive letter as that's a fat32 partition. (But you already figured that out)
The sd card also has a second partition with all the linux stuff. That's an ext4 partition that can't be seen by windows.
If you mount the sd card in a linux pc, the ext4 partition becomes available. This linux machine can be a virtual pc running in virtualbox.
Some fiiles are only accessible if you have administrator rights. Usually placing sudo in front of your editor is all it takes.
This might be the reason why you can't change the files on the pi itself, even after you mounted the partition back as read/write
The write protect switch of the sd card connector isn't used on the raspberry pi. So, the wp slider on the sd card is ignored.
Basically, only files in your home folder can be changed without administrator (sudo) rights. It depends upon the right flags of the file.