Booting to UNIX

Discussion in 'Mac Basics and Help' started by thunderclap, Aug 11, 2005.

  1. thunderclap macrumors 6502a

    thunderclap

    Joined:
    Nov 8, 2003
    Location:
    Chicago
    #1
    I tried fixing a problem with Compressor and in so doing messed up my Mac. The recommended solution was to rename the hostconfig file in /etc/ to hostconfig.old. I assume a new hostconfig file should have been created at boot but no luck. Now my Mac opens to a UNIX shell.

    I tried going into /etc/ and renaming the hostconfig file but it won't let me as it is read-only. How can I rename this file? I'm not very familiar with Unix but I assume it's a chmode command. Also, I assume I'll need to log in as a root user but when I try that it won't accept my password.

    Please help!
     
  2. superbovine macrumors 68030

    superbovine

    Joined:
    Nov 7, 2003
    #2
    goto to terminal

    Code:
    cd /etc/
    sudo mv hostconfig hostconfig.bak
    
     
  3. thunderclap thread starter macrumors 6502a

    thunderclap

    Joined:
    Nov 8, 2003
    Location:
    Chicago
    #3
    Don't have access to Terminal. It boots directly to the UNIX command prompt.

    I tried "sudo mv hostconfig.old hostconfig" as I want to rename the .OLD file. I get the error "mv: rename hostconfig.old to hostconfig: Read-only file system"

    How do I change the permission of this file?
     
  4. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #4
    Ahhhh, it sounds like, when you say boots to UNIX, you mean it's in single user mode. And the disk is being mounted as read-only by the filesystem -- it's done this way so that fsck can fix disk problems.

    First thing you should try is to run fsck -fy to make sure that it isn't really another filesystem problem that's causing this.

    I dunno how to mount the disk read-write manually...

    EDIT: if that doesn't help (you should do that anyway), then try this:

    Use the command:

    mount -u /

    at the UNIX prompt, and then do the commands previously recommended. You might need to sudo mount instead.
     
  5. thunderclap thread starter macrumors 6502a

    thunderclap

    Joined:
    Nov 8, 2003
    Location:
    Chicago
    #5
    I saw that command on another post somewhere and tried it. Nothing is wrong with the system so far as that command can tell. Tried rebooting and it just dropped to UNIX.

    Well, thanks for trying to help. I can't even get my copy of Tiger to boot from the DVD. Sheesh.
     
  6. superbovine macrumors 68030

    superbovine

    Joined:
    Nov 7, 2003
  7. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #7
    Eeep, you replied while I was editing. Please try what I wrote at the end of the previous message. :eek:
     
  8. thunderclap thread starter macrumors 6502a

    thunderclap

    Joined:
    Nov 8, 2003
    Location:
    Chicago
    #8
    Yep... just sitting hear waiting for good folks like you to give suggestions. :) I need this computer back up.

    Okay... did "sudo mount -u /"
    Then... "fsck -fy"
    Get the message everything appears to be okay.
    Typed... "reboot"

    Drops back to UNIX. I did those steps again minus the reboot and then did the "sudo mv hostconfig.old hostconfig" and get the same error as before: the file is read-only.
     
  9. thunderclap thread starter macrumors 6502a

    thunderclap

    Joined:
    Nov 8, 2003
    Location:
    Chicago
    #9
    On a side note, I'm convinced it's because the "hostconfig" file is missing. Is there a way to recreate that file from within UNIX? If not, how can I change the "read-only" permission so I can rename the file?
     
  10. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #10
    Eeep... no. I'm sorry, I'm not being clear. sudo mount the root partition. Then, you should be able to go in and use mv to put your old hostconfig back. Mount makes the disk read/write, which it wasn't, which is why you could not use mv to put your old hostconfig back. I don't think it was a permissions issue.

    But if it is a permissions issue, try

    sudo chmod 666 [filename]

    on both of the files before you replace the file. It's overkill, but then permissions would definitely not be an isssue then.
     
  11. thunderclap thread starter macrumors 6502a

    thunderclap

    Joined:
    Nov 8, 2003
    Location:
    Chicago
    #11
    You're a genius Mkrishnan. It worked! Thanks for the tips on how to get my system back up and running. Much appreciated!
     
  12. ITASOR macrumors 601

    ITASOR

    Joined:
    Mar 20, 2005
    Location:
    Oneida, NY
    #12
    I think you could also have tried booting it into firewire target mode maybe and accessing the HD from another Mac. Glad you got it working, that must have been scary!
     

Share This Page