How to set sudo /usr/etc path; or making a Bootable Installer from Recovery mode

Discussion in 'macOS' started by optimoose, Jan 22, 2016.

  1. optimoose macrumors newbie


    Jan 22, 2016

    My main OSX partition seems to be fried - gets stuck in endless rainbow wheel. Have tried disk repair, safe mode login, and several OSX reinstalls to no avail. My Windows partition seems to be working fine so I think the hard drive is physically ok.

    I can access documents via terminal from Recovery mode so I've copied documents I want to an external drive and am currently trying to create an El Capitan Bootable Installer using terminal then wipe the partition clean, but am having trouble with the former.

    First issue was I could not execute nor locate the sudo command, but then I realized that my PATH was set at "/usr/bin" while my sudo now resides in "/volumes/macintosh hd/usr/bin". So I $PATH'ed the correct directories and could now execute sudo... but sudo now cannot find /etc/sudoers ("no such file or directory; no valid sudoers sources found"), presumably because my sudoers is also in "/volumes/macintosh hd/etc/sudoers".

    Question is can I somehow trick the whole system so that these binaries execute with the prefix "/volumes/macintosh hd/", not only when I execute them but when they execute each other? Better yet, is there a more straightforward way of achieving the above, i.e. creating the Bootable Installer? I can always give up and create the installer on another computer, but I would really like to solve it somehow internally if possible. Any help would be much appreciated.
  2. JohnDS macrumors 65816

    Oct 25, 2015
    Why not just boot into the recovery partition and use it to install a bootable system on an external USB drive that has been formatted as Apple Extended Format (Journalled)?
  3. chrfr macrumors 604

    Jul 11, 2009
    You can erase that partition from Recovery and reinstall OS X there without having to make a USB installer; this will be the simplest process with your computer being so broken.
  4. BLUEDOG314 macrumors 6502


    Dec 12, 2015
    If you got past your current issue, what would you be doing next? Because the only way I know how to make install media is with the createinstallmedia tool in the El Cap installer. You have to use sudo but I don't know what other binaries it will use. I assume it has to use anything related to formatting and mounting external media as using create install media will work on a drive that is initially MBR and FAT formatted.

    Do you already have the installer also?

Share This Page