2

Recently, I accidentally screwed up /etc/passwd/ and I thought that I could use an sd card reader. Turns out, I can only access boot and RECOVERY. The computer we are using is a Mac. Is this the only folders the sd card allows us to access, and how do you get into etc?

2
  • 1
    You can mount the ext4 filesystem, but you need some additional program, explanation can be found here apple.stackexchange.com/questions/29842/…
    – MatsK
    Commented Nov 23, 2017 at 17:12
  • @MatsK That link MAY have worked in 2011, but SIP prevents this from working.
    – Milliways
    Commented Nov 23, 2017 at 23:23

2 Answers 2

3

The boot directory is formatted with the FAT file system. I guess RECOVERY is as well. That means the contents are readable and writable by Windows, Macs, Linux as they all support FAT.

The other directories will be formatted as ext4 which is a Linux file system. You will probably need to find (i.e. web search) an add-on to allow this file system to be read by non-Linux systems.

1

The simple answer is you Can't - it used to be possible with 3rd party add-on, but since Apple introduced SIP all the external programs fail.

Your best bet is to use a live Linux CD or similar.

You can boot the Pi into the root shell and fix/change password

See

https://raspberrypi.stackexchange.com/a/15601/8697

or

https://raspberrypi.stackexchange.com/a/50467/8697

I should add that there is NO REASON to edit /etc/passwd

1
  • 1
    Hey, for what it's worth Paragon ExtFS for Mac 11 (or the 10-day trial of it) works for me to read/write the ext4 root partition on macOS 10.13 High Sierra. Though I'm sure plenty of the alternative programs are now broken as you say.
    – jdonald
    Commented Nov 24, 2017 at 4:39

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.