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?

InteXX
  • 145
  • 3
  • 10
  • 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 Aug 25 '22 at 01: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 Aug 25 '22 at 01: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 Aug 25 '22 at 01:31
  • @NomadMaker — Turns out all he had was a 2GB card, which of course isn't enough. I'm headed into town tomorrow and I'll pick one up at the local Office Depot and then climb back up in this saddle on Friday. But I gotta tellya... much more of this and I believe I'll be starting to cast my gaze in the general direction of the scorched earth solution. Especially since I kinda think I remember installing NOOBS on it way back when. – InteXX Aug 25 '22 at 01:35
  • 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 Aug 25 '22 at 01:36
  • @Milliways — Righto. – InteXX Aug 25 '22 at 01:37
  • @Milliways — I tossed in the towel. Too much grief. I'm now running a spankin' new arm64 install. I bit the bullet and decided it'd be easier to just reinstall my apps. – InteXX Aug 25 '22 at 03:42
  • "... edit the file with a Windows text editor, ..." You know that's a problem, right? Your text must conform to Unix/Linux conventions for the newline - Windows uses CR-LF, Linux uses LF (now NL/newline) only (ref). – Seamus Aug 29 '22 at 18:08
  • 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 Aug 30 '22 at 19:28

0 Answers0