Hackintosh Single User Mode Install Kexts

Kext files are basically the drivers for macOS. The word “Kext” is short for Kernel Extension. Kexts are an extension of the macOS kernel. When you boot up your machine the code contained in these kexts is atomically injected into the operating system. It’s like having drivers contained in a single file without having to install them like on Windows. When you want to uninstall a kext all. Mainly add IntelMausi.kext to support most of the Intel onboard wired network cards used by Z490, and add LucyRTL8125Ethernet.kext to support 2.5G network cards such as RTL8125B. Note that you need to set the working mode of the network card to Gigabit mode for normal use. The above drivers are enabled at the same time by default.

Installer

Wednesday lunch time, I opened up my laptop and in the middle of writing an email my machine froze and after a few seconds rebooted. Uh oh, the system sat at the grey screen for a few seconds and then the dreaded folder with a question mark began flashing which means there was no bootable disk found.

Turned the machine off, turned it back on again, ah, a message that the machine had crashed and restarting once more it booted as usual, making it back into macOS before it did the same freeze and reset again. I ended up spending the rest of the day trying various things to get my data off the disk before the SSD stopped responding all together Wednesday night.

I thought to rule out file system issues first.
Booting single user mode and running fsck_apfs(8) didn’t get very far when I first tried. SIGINFO reported that bash was waiting meaning that it never got to executing fsck_apfs.
Restarting and trying to boot in recovery mode to run the file system check using Disk Utility didn’t work out too well. Upon reaching the GUI, recovery mode began to spin, if things worked ok I would have been greeted with a file vault encrypted disk to unlock but it didn’t and the spinning spiral would go around endlessly, so it was back to single user mode.

In single user mode all data is accessible but the file systems are mounted read only with the exception of /private/var/vm which is writable. At the end of booting into single user mode, the system reports:
To mount the root device as read-write:
$ /sbin/mount -X /

But the mount command on Catalina 10.15.7 has no such option, the old advised method of using -uw instead of -X still worked however.

While I was experimenting I noticed that I had spent a considerable amount of time in single user mode and the system never hard reset like when I booted normally.
I intended to copy the data to another machine, however ifconfig reported no interfaces.
I mistakenly thought that I could load the relevant kernel extensions and could slowly bring things up bit by bit that way. Except can’t do any of that because SIP prevents you.
localhost:/ root# kextload /System/Library/Extensions/some.kext
/System/Library/Extensions/some.kext has invalid signature: Trust code is disabled.
Untrusted kexts are not allowed
Kext rejected due to invalid signature: <OSKext 0xSOMEHEX [0xSOMEHEX]> { URL = 'file:///System/Library/Extensions/some.kext', ID = 'com.apple.foo.bar' }
/System/Library/Extensions/some.kext failed security checks; failing.

I tried several times again to get back into recovery mode environment in order to disable SIP using csrutil disable from the terminal there, out of sheer luck the disk behaved long enough one time that I managed to get the disk unlocked and make it in. I disabled SIP and while I was there I checked the disk with Disk Utility. Things started off ok and while it was spending some time checking the Data volume it hard reset. This definitely wasn’t a file system issue and an indicator that the hardware is misbehaving, which meant it probably wouldn’t be long before I lost access to the data on there.

Back in single user mode I confirmed SIP was disabled
localhost:/ root# csrutil status
System Integrity Protection status: disabled.

After working my way through loading what I thought were relevant extensions I gave up and started looking up how to bring up the system, I was trying to get either an Apple USB Ethernet adapter, Thunderbolt Gigabit adapter or the builtin Airport card to work.

Install

To get the baseline system going you need to start kextd(8), notifyd(8), configd(8). Once diskarbitrationd(8) is loaded, it pulls the relevant dependencies to get networking running.

4.6 ford timing marks. These are basic instruction for the timing and installation of the Delphi (C.A.V., Lucas) DPA model pump. Since the procedure may vary depending on the engine please refer to the correct engine service manual for your engine. In an emergency however, if the timing marks are clearly marked on the engine and pump mounting flange, most. The idea of the timing pin was an advanced idea by the CDC engine designers to assist doing this type of job. The pin would lock the engine at TDC, the pump would be fitted with it's timing marks aligned, also locked in place. When the pump was securely mounted both locking pins would be released - prime & play.

launchctl load /System/Library/LaunchDaemons/com.apple.kextd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.notifyd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.configd.plist
launchctl load /System/Library/LaunchDaemons/com.apple.diskarbitrationd.plist

To configure your wireless card use airport(8) which can be found at /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

I opted for the Thunderbolt Gigabit adapter as that was my fastest option, the interface would autoconf with DHCP/RS, and could be configured with just ifconfig(8) but I couldn’t get an NFS share mounted which I now suspect was because I did not specify the use of a reserved port when mounting the share on the Mac.
localhost:/ root# mount_nfs -o resvport my-nfs-server:/share /net
As I was racing against time I ended up cobbling together a USB disk which was HFS+ formatted and used rsync to clone my home directory. Since the system was in single user mode, new disks would not be auto mounted (that’s what diskarbitrationd does normally) and issuing diskutil list would not work. Without diskarbitrationd loaded it complains
Unable to run because unable to use the DiskManagement framework.
Common reasons include, but are not limited to, the DiskArbitration framework being unavailable due to being booted in single-user mode.

and with diskarbitrationd loaded it complains
Could not start up a DiskManagement session
You can instead use fstyp(8) by pointing it at device nodes to find out the file system type on the other side of the device node.
Before connecting a disk, run ls /dev/disk* to see what’s there already, attach the disk, repeat ls /dev/disk* to see which new nodes have been created. Point fstyp at those device nodes to find the correct one with the filesystem, in this case it was HFS.
localhost:/ root# fstyp /dev/disk2s2
hfs

localhost:/ root# mount_hfs /dev/disk2s2 /net
I then began to rsync my data to the external disk with rsync -av /Users/sme /net/ and after a while the disk I/O stopped and the kernel reported
IOAHCIBlockStorageDrive: could not recover SATA HDD after 5 attempts. terminating
completionRead: 1598: Failed read request b88146000, 4096: e00002c0
disk1s1: no such device.

Well, there’s the hardware misbehaving.

apfs_vnop_read: 7261: ### obj-id longnumber/anotherlongnumber retval 6 filesize 16388 offset 0 resid 16388 ###
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync54.120.1/rsync/rsync/rsync.c(244) [sender=2.6.9]
rsync: writefd_unbuffered failed to write 185 bytes [generator]: Broken pipe (32)
disk1s5: media not present.
nx_buf_bread:592: buf_biowait() failed, error = 6, b_error = 6, buf_flags_after_io = 0x101, crypto = [encrypted composite]
_vnode_dev_read:811: *** got err 6 reading blknum 54480 (num read errs: 1)
localhost:/ root# apfs_vfsop_sync:3357: /dev/disk1: failed to finish all transactions to sync() - Device not configured(6
)

Ruger 22 revolver serial number lookup. With products made in America, Ruger offers consumers almost 700 variations of more than 40 product lines. For more than 70 years, Ruger has been a model of corporate and community responsibility.


At this point there was nothing else possible to do but power cycle.
Over several iterations I managed to get most of my home directory copied across to the external disk with rsync before the SSD stopped responding all together.

-->
Single user mode mac os x
  • Super speed repair permissions for all system folders: /System/Library/Extensions and /Library/Extensions.
  • Starts a update (rebuild) system caches.
  • Starts a update (rebuild) system kernelcache_* for OS X with Extensions.mkext standard cache file (OS X 10.6).
  • Install multiple kext files simultaneously.
  • Kext Utility.app/Contents/Resources/KU_config.plist for ON OFF some KU functions.
  • KU can automatically add/remove boot args: '-v' for verbose boot, 'kext-dev-mode=1' for load unsigned kexts in MAC OS X 'Yosemite' and 'rootless=0' for perform any repair permissions operation for system files in MAC OS X 'El Capitan' in com.apple.Boot.plist and Unbelievable! in NVRam.
  • Patch msdosfs.kext Info.plist for add OSBundleRequired='Console'. That provides access to an EFI partition in single user mode (disabled for 10.10 and up).
  • Update a records about the unsigned installed kexts in the AppleKextExcludeList.kext (disabled for 10.10 and up).
  • Pack kext files to mkext cache file.
  • UnPack mkext cache files.

Hackintosh Single User Mode Install Kexts Mac

Note: You must disable SIP in order to open Kext Utility Application.

Comments are closed.