RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Update failed error cannot open .git/FETCH_HEAD: Read only file system

    Scheduled Pinned Locked Moved Help and Support
    retropie-setupupdate failedfetchheadread only modecannot open
    18 Posts 3 Posters 3.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • funkotron77F
      funkotron77
      last edited by

      Pi Model or other hardware: Pi 3B+
      Power Supply used: 2.5a Canakit
      RetroPie Version Used: 4.6
      Built From: pre made image from RetroPie website
      USB Devices connected: N/A
      Controller used: Arcade USB encoder stick
      Error messages received: Update failed error cannot open .git/FETCH_HEAD Read-only file system
      File: (File with issue - with FULL path)
      Attachment of config files: (PLEASE USE PASTEBIN.COM FOR LARGE LOGS)
      How to replicate the problem: Updating the RetroPie setup script

      Basically anything that I try from retropie-setup doesn't work and I get these errors that say it's a read only file system and cannot touch because read only file system. I'm not sure which config files would help to show what is happening. When I'm moving through the menus and opening games I get errors too that say cannot write to config file or along those lines.

      ClydeC 1 Reply Last reply Reply Quote 0
      • ClydeC
        Clyde @funkotron77
        last edited by

        @funkotron77 It may be that your sd card is failing. The controller will mount such a card read-only to protect the data on it.

        You should do a backup as soon as possible, test the card in another system, and migrate to a new card if it shows the same symptom in the other system, too.

        funkotron77F 1 Reply Last reply Reply Quote 0
        • funkotron77F
          funkotron77 @Clyde
          last edited by

          @Clyde hey pal thanks for the response. I actually thought it was related to the SD card so I backed up the image to my PC and re burned it onto a new larger SD card and am still experiencing the same problem. Am I boned and need to start over or is there anything else I can do?

          What would cause something like this anyway??

          1 Reply Last reply Reply Quote 0
          • ClydeC
            Clyde
            last edited by Clyde

            You could try further diagnosis in RetroPie's command shell that you get to either by pressing F4 in Emulation Station or using SSH to log in via network.

            There, you can check the mount parameters of the system partition with this command:

            mount | grep " / "
            

            The spaces before and after / are important. They restrict the output to the root partition. The output shows the mount options of the root partition, e.g. read/write (rw) or read-only (ro).

            To check the system logs for messages about (re-)mounting the medium, you can use these commands, preferably right after booting the system:

            dmesg | grep mount
            
            grep mount /var/log/syslog
            

            Both are needed because they show different logs. If you want to show us the output of these commands, please use a code block for easy readability.

            funkotron77F 2 Replies Last reply Reply Quote 0
            • funkotron77F
              funkotron77 @Clyde
              last edited by

              @Clyde thanks a bunch for your help. Will be posting these logs here shortly. Appreciate you.

              1 Reply Last reply Reply Quote 0
              • ClydeC
                Clyde
                last edited by

                Just to avoid confusion: The two latter commands will show only the lines that contain the word "mount" from the logs. That's what grep does.

                1 Reply Last reply Reply Quote 0
                • funkotron77F
                  funkotron77 @Clyde
                  last edited by

                  @Clyde

                  Hey pal. This is what I got.

                  pi@retropie:~ $ mount | grep " / "
                  /dev/mmcblk0p2 on / type ext4 (ro,relatime)
                  pi@retropie:~ $ dmesg | grep mount
                  [    0.924047] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
                  [    0.930110] devtmpfs: mounted
                  ````pi@retropie:~ $ grep mount /var/log/syslog
                  Sep  3 07:15:30 retropie systemd[1]: Unmounting RPC Pipe File System...
                  Sep  3 07:15:38 retropie systemd[1]: Starting Remount Root and Kernel File Systems...
                  Sep  3 07:15:38 retropie systemd[1]: Started Remount Root and Kernel File Systems.
                  Sep  3 07:15:38 retropie kernel: [    1.002111] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
                  Sep  3 07:15:38 retropie kernel: [    1.002936] devtmpfs: mounted
                  Sep  3 07:15:38 retropie kernel: [    3.378821] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
                  Sep  3 07:15:38 retropie systemd[1]: Starting dphys-swapfile - set up, mount/unmount, and delete a swap file...
                  Sep  3 07:15:38 retropie systemd[1]: Started dphys-swapfile - set up, mount/unmount, and delete a swap file.
                  Sep  3 07:50:57 retropie systemd[1]: Unmounting RPC Pipe File System...
                  1 Reply Last reply Reply Quote 0
                  • ClydeC
                    Clyde
                    last edited by

                    I see nothing unusual there. Can you re-mount the root FS read/write?

                    sudo mount -v -o remount,rw /dev/mmcblk0p2
                    
                    funkotron77F 1 Reply Last reply Reply Quote 0
                    • funkotron77F
                      funkotron77 @Clyde
                      last edited by

                      @Clyde

                      Hi there, tried that and still getting the same issues.

                      ClydeC 1 Reply Last reply Reply Quote 0
                      • ClydeC
                        Clyde @funkotron77
                        last edited by Clyde

                        @funkotron77 Does the mount command give any output? The -v option means "verbose" and should give you some.

                        edit: Did you check the rw mode with mount | grep " / " after it? Does touch work then?

                        mituM funkotron77F 2 Replies Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator @Clyde
                          last edited by

                          Check the dmesg output after trying re-mounting with the rw flag, the card may be reverting to read-only automatically if damaged.

                          funkotron77F 1 Reply Last reply Reply Quote 0
                          • funkotron77F
                            funkotron77 @Clyde
                            last edited by

                            @Clyde

                            this is what I got after I did that thing you asked me to do

                            mount: /dev/mmcblk0p2 mounted on /.
                            1 Reply Last reply Reply Quote 0
                            • funkotron77F
                              funkotron77 @mitu
                              last edited by

                              @mitu said in Update failed error cannot open .git/FETCH_HEAD: Read only file system:

                              Check the dmesg output after trying re-mounting with the rw flag, the card may be reverting to read-only automatically if damaged.

                              this is what i got

                              [    0.907347] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
                              [    0.908441] devtmpfs: mounted
                              [  946.183645] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
                              [  968.445007] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
                              1 Reply Last reply Reply Quote 0
                              • ClydeC
                                Clyde
                                last edited by Clyde

                                In case dmesg shows something without the word "mount" in it, this will print out the last 20 lines of the unfiltered dmesg output:

                                dmesg | tail -n 20
                                

                                Can you show us its output directly after the remount command?

                                Alas, I don't know if or what message we'd have to expect when a damaged sd card remounts the file system as read-only by itself.

                                funkotron77F 1 Reply Last reply Reply Quote 0
                                • funkotron77F
                                  funkotron77 @Clyde
                                  last edited by

                                  @Clyde
                                  Hey pal, will do. Got a brunch to go to then will report back. If you guys think I should just take the L and restart everything from scratch I’ll do it. Just being lazy about transferring Roms and doing my settings and stuff. ;)

                                  Cheers to you guys for your help. Appreciate it :)

                                  ClydeC 1 Reply Last reply Reply Quote 0
                                  • ClydeC
                                    Clyde @funkotron77
                                    last edited by

                                    @funkotron77 Well, since you said that you have a full backup, you could try to install RetroPie from scratch and then do only the bare minimum of setup to see if the card is writable then.

                                    But before something drastic like that, let's see the dmesg output. 🧐

                                    funkotron77F 1 Reply Last reply Reply Quote 0
                                    • funkotron77F
                                      funkotron77 @Clyde
                                      last edited by

                                      @Clyde

                                      For sure. If there is any way to salvage I would definitely like to do that. Thanks pal. :)

                                      dmesg | tail -n 20
                                      [    6.485270] 8021q: adding VLAN 0 to HW filter on device eth0
                                      [    6.698502] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
                                      [    6.722465] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  2
                                      2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2
                                      [    7.155834] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
                                      [    7.155894] brcmfmac: power management disabled
                                      [   13.107996] Bluetooth: Core ver 2.22
                                      [   13.108092] NET: Registered protocol family 31
                                      [   13.108099] Bluetooth: HCI device and connection manager initialized
                                      [   13.108124] Bluetooth: HCI socket layer initialized
                                      [   13.108136] Bluetooth: L2CAP socket layer initialized
                                      [   13.108176] Bluetooth: SCO socket layer initialized
                                      [   13.128848] Bluetooth: HCI UART driver ver 2.3
                                      [   13.128863] Bluetooth: HCI UART protocol H4 registered
                                      [   13.128953] Bluetooth: HCI UART protocol Three-wire (H5) registered
                                      [   13.129158] Bluetooth: HCI UART protocol Broadcom registered
                                      [   13.194504] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
                                      [   13.427863] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
                                      [   13.427873] Bluetooth: BNEP filters: protocol multicast
                                      [   13.427888] Bluetooth: BNEP socket layer initialized
                                      [   15.398452] ICMPv6: process `dhcpcd' is using deprecated sysctl (syscall) net                                                                              .ipv6.neigh.wlan0.retrans_time - use net.ipv6.neigh.wlan0.retrans_time_ms instea
                                      ClydeC 1 Reply Last reply Reply Quote 0
                                      • ClydeC
                                        Clyde @funkotron77
                                        last edited by

                                        @funkotron77 Again, I see nothing. Maybe also check the /var/log/syslog, but without grep to see every message. A simple cat /var/log/syslog will show it, and you could copy & paste the last part of the output. To be sure, you could look at it before and after the remount command, to check for changes (the same goes for dmesg).

                                        After that, alas, I'm out of ideas. I never had to deal with something similar myself yet.

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post

                                        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.