Hi there,

today I’m gonna present the update for my script that allows you to change the openELEC/LibreELEC root password. Now on macOS, too!

For the usage on the Mac you do need some more perquisites however.
This script was tested on macOS 10.10 and with and without BerryBoot, on macOS 10.11 only without BerryBoot.
Required software

  • Homebrew
  • Python
  • pip
  • passlib
  • FUSE for OS X
  • FUSE-Ext2
  • squashfs
Installing homebrew

Homebrew is the missing package manager for macOS
Open a terminal and type

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then update Homebrew

brew update
brew upgrade

 

Either install python from Homebrew or use the built in version

Pip is the package manager of Python

Use homebrew’s python
Install some new python with bundled pip

brew install python

 
Use the built in python and just install pip
Download this file (e.g. with wget)
and then run

python get-pip.py

Now you have pip installed.

 

Install passlib

Why is passlib needed?
Because OS X and Linux behave differently with the crypt algorithm, see e.g. this answer on stackoverflow.

You can now easily install it with pip

pip install passlib

 

Install squashfs

squashfs is needed to unsquash and make the new squash filesystem.
Luckily it’s shipped with homebrew

brew install squashfs

 

You only need to follow this steps if you use BerryBoot

BerryBoot stores the images which are booted on a second partition, which is formatted as ext4.
Sadly OS X can’t mount these and you need to download and install FUSE for OS X and FUSE-Ext2 with write support.

For El Capitan and newer, use these package instead, it fixes issues with rootless/sip: https://github.com/gpz500/fuse-ext2/releases
Go and grab FUSE for OS X from here https://osxfuse.github.io/ and make your to check MacFUSE Compatibility Layer

Now go ahead and download FUSE-Ext2, too.

You need to enable write support which is experimental!
Type this into your terminal

sudo sed -e 's/OPTIONS="auto_xattr,defer_permissions"/OPTIONS="auto_xattr,defer_permissions,rw+"/' -i .orig /System/Library/Filesystems/fuse-ext2.fs/fuse-ext2.util

Now you are good to go!

Go on and read about the usage of my script here: https://dustpla.net/NyvMK

 

Troubleshooting

If the mounting of the openELEC partition fails with

mount_msdos: /dev/diskXs1: Resource busy

You need to unmount it first with

diskutil unmountDisk diskX

Replace X with the disk number!

 

Sources // Thanks to

https://github.com/osxfuse/osxfuse/wiki/Ext
https://stackoverflow.com/a/17992126/1902598
https://github.com/plougher/squashfs-tools/pull/3

 
As always, thanks for reading and write a comment if you need any assistance!

HowTo – Replace your openELEC/LibreELEC root password on macOS, too

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.