0

I added init=/bin/sh to my cmdline.txt in an attempt to troubleshoot this problem, but upon booting I land at the normal credentials prompt.

I'm using a MicroSD adapter to edit the file with a Windows text editor, as that's the only other running OS I have available to me. The card apparently contains two partitions, as one is mounted (FAT32) but not the other (probably ext4). DISKPART doesn't show the second one either, nor does Disk Management.

Should I be editing a cmdline.txt file on the ext4 partition as well?

9
  • 1
    You can burn a second SD Card, put the USB adapter in the Raspi, and boot from the new SD card. Mount the old card and then you can edit the ext4 partition of the original disc.
    – NomadMaker
    Commented Aug 25, 2022 at 1:04
  • 1
    Frankly, if you correctly added added init=/bin/sh to … cmdline.txt using Raspberry Pi OS (and not NOOBS) this is IMPOSSIBLE! I don't doubt you have a problem, but without more information no one can help.
    – Milliways
    Commented Aug 25, 2022 at 1:25
  • @Milliways — I added init=/bin/sh to cmdline.txt in the root of the FAT32 partition. I double- and triple-checked it, as well as booted several times after the edit. No sauce. I'm at a loss as to what information I can give that I already haven't, but now that you mention it I do seem to remember having installed NOOBS on it all those many moons ago. Would that explain this whole mashup, do you think?
    – InteXX
    Commented Aug 25, 2022 at 1:31
  • 1
    If you have NOOBS the boot process is totally different. It is not impossible for an expert user to fix, but ultimately NOOBS is a dead end. The best solution is to do a fresh install and then you can recover your files from old card.
    – Milliways
    Commented Aug 25, 2022 at 1:36
  • 1
    @Seamus — You know that's a problem, right? Yes, I'm aware (I mentioned it briefly here). However, I'm convinced now that I was editing the wrong file to begin with—the cmdline.txt file in the root of the FAT32 partition, not the one in /boot. I was about to try @NomadMaker's suggestion, so I could get at /boot/cmdline.txt, when the recollection of my having installed NOOBS at the time hit me. That's when I threw in the towel and decided to reformat. I'm much better off for it, as I'm now running 64-bit. But thanks for reaffirming it!
    – InteXX
    Commented Aug 30, 2022 at 19:28

0

Your Answer

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

Browse other questions tagged or ask your own question.