Due to some unfortunate configuration settings, I kludged my raspberry pi into not having a terminal (it normally boots into an app, which still works fine) nor having network access.

I can no longer access the filesystem nor the terminal so I can't actually fix the problem.

Essentially, I was trying to enable wifi and in doing so, disabled network services. When I restarted my Pi, my ethernet cable no longer provided a connection, and that was the only way I was able to remote into the pi to develop on it.

I've tried resetting the cmdline.txt and config.txt files to enable simple access to the terminal, but nothing I'm trying works. What should I do?

Here is my cmdline.txt

console=tty1 root=PARTUUID=41b52e18-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait video=HDMI-A-1:1080x1920M@60,rotate=90

and config.txt

# uncomment if you get no picture on HDMI for a default "safe" mode

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border

# uncomment to force a console size. By default it will be display's size minus
# overscan.

# uncomment if hdmi display is not detected and composite is being output

# uncomment to force a specific HDMI mode (this will force VGA)

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display

# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# Uncomment some or all of these to enable the optional hardware interfaces

# Uncomment this to enable infrared communication.

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)

# Enable DRM VC4 V3D driver on top of the dispmanx display stack


# Waveshare Edits #
hdmi_timings=1080 0 112 16 160 1920 0 4 10 10 0 0 0 60 0 140000000 3


  • 1
    yank the sd and put it in something else. most linux should be able to read the filesystem (use a live cd/usb if you dont have one)
    – Abel
    Commented Aug 17, 2021 at 23:53

2 Answers 2


Your SD card (or whatever media you boot from) has two partitions - one is ext4 filesystem (/); the other is FAT32 filesystem (/boot). You may remove the SD card, then mount and edit anything in /boot on virtually any computer (Windows, Mac, Linux, Unix, etc). The ext4 partition can typically only be mounted on a Linux system.

Your config.txt and cmdline.txt files are located in the FAT32 partition (/boot/config.txt) - therefore you may edit it, and correct your errors on virtually any computer.

Make sure you use an editor that does not use CR-LF to end a line (i.e. no Windows Notepad)

  • I did have access to config and cmdline, but wasn't sure how to gain access to ext4. It really wasn't difficult, I just mounted it to another linux machine. My issue was I had 2 SD cards and only 1 SD card slot, but ended up finding an SD card to USB stick and mounted it that way. Is there 0 way to edit the ext4 partition without a linux machine?
    – Mdev
    Commented Aug 19, 2021 at 0:45
  • @Matthew: There may be some tools for Windows, but why spend money on that? Instead get a version of Linux on a USB drive & boot to Linux on a Windows machine - for example
    – Seamus
    Commented Aug 19, 2021 at 5:23
  • Yea, that's what I did, I just needed it very quickly and wasn't sure if there was a different way. I really just needed a quick way to edit one file to undo what I did, but I ended up booting into another linux box with the SD card inserted into the USB drive to edit the file. Just wasn't sure at the time if I'd be able to do that in time
    – Mdev
    Commented Aug 19, 2021 at 20:44
  • @Matthew: Glad to hear you overcame this. Please read this, and follow up when you've made a decision.
    – Seamus
    Commented Aug 19, 2021 at 21:03
  • I believe I figured it out before you posted, but your answer would have helped me figure it out- the issue I was having at first was gaining access to the ext4 filesystem. I knew there was a filesystem that was Windows compatible but wasn't sure where the other was and your answer explained that, so I'll accept yours. Thanks for the help!
    – Mdev
    Commented Aug 19, 2021 at 21:33

Try adding rw init=/bin/bash to the cmdline.txt: that should unconditionally boot your system into a root terminal, which allows you to edit the configuration files you have messed up (re-enabling the network services).

  • I'll try this and see what it does. I got it to work by chance - I had a startup script on boot and got into the ext4 filesystem by mounting the filesystem to another pi and then edited that file to add the bash commands to re-enable networking to it)
    – Mdev
    Commented Aug 19, 2021 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.