Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Command Line Expert Needed: Deleted hostconfig (+ others) - boots to single user mode only !

Mac OS X Tiger 10.4.11


Deleted folders/files when logged in as root user. (don't ask!)

On restart , wont boot up , get grey screen with white apple logo the black screen with command line: localhost:/ root#

Started up from install cd - repaired permissions (ran twice) & verified hard drive . All okay.

Restarted but still goes back into command line with same localhost:/ root prompt

Tried a bunch of different things as per advice on these boards - discovered that there is no hostconfig file.


Restarted into verbose mode.

Here are the lines that i think may reveal exactly what I messed up - and hopefully someone out there has an idea how I can try to fix without having to do an archive/install.


BSM auditing present

disabled

rooting via boot-uuid from /chosen: (here a very long string of numbers and letters looks like a password)


Then a long line about

"got boot device = IOService:/MacRISC2PE ........."


Then, the following


"BSD root: disk0s3, major 14, minor 2"

"CSRHIDTransitionDriver::stop"

"IOBluetoothHCIController::start Idle Time Stopped"

(AND HERE'S THE BIGGIE:)

/etc/rc: line 93: /etc/hostconfig: No such file or directory

Apr 1. 06:01:44 launched: /bin/sh on /etc/rc terminated abnormally, going into single user mode

localhost:/ root#


I'm pretty sure I messed thing up pretty well - was mainly network/server folders and files - definitely samba, which I think I deleted, and under "network" in the finder, I also might have deleted my computer from the server list


As an aside in case this provides any insight, when I go to the terminal app when starting up from install cd, the prompt reads :

"bash-2.05b"

I'm also able to see the contents of my hard drive when using disk utility from install cd and and trying to "mount image" ---

Everything looks intact in terms of folders/files in my user account, but in the /root folder, there's only /library - which is empty.


Any help, insight, troubleshooting and even scolding - will be welcome! I need this thing booted

Cheers

PowerBook, Mac OS X (10.4.11), G4 1.5ghz ...on its' last leg...

Posted on Jul 25, 2012 1:40 PM

Reply
7 replies

Jul 25, 2012 3:12 PM in response to karin1968

No amount of command-line skills will help if you've deleted random files and don't have a backup.


Your solution is going to hinge around either restoring content from backup, or reinstalling your OS (which does not necessarily mean wiping everything and starting again - your apps and user content should stay intact, as long as you haven't trashed that part of the system too.


So, to cut a very long discussion short: Do you have a recent backup of your entire drive? If not, grab the install disk and reinstall.

Jul 25, 2012 8:23 PM in response to Keith Barkley

Thanks Keith/Camelot


I do not have a backup. Should I back up before I try doing a reinstall of the os x?


Keith: sounds like you are saying i wont be able to archive/install user files/settings if I do a reinstall?

in terms of target disk mode....yes, I have an even older PowerBook - has a dead batter (actually both do) and I only have 1 power cord (which I can pick up easily enough tomorrow).....


Camelot: when you say "apps and user content should stay intact" - doesn't sound very definitive. Are there any variables that come into play?



Question: I do have a start up disk along with some apps that I created in retrospect many years ago ....(I think it's os x 10.2.8) Can I use this to boot up and then just navigate to my user files so I can get some things done that I need to?


As a note: in terms of "random deleted files" : not entirely random. Was trying to stop my computer from possibly broadcasting (what I thought of as serving) info to someone on my wifi network (the admin) who I suspected of having gained access to my computer. Used netinfo manager and turned on system logging and kept getting all kinds of "unauthorized access" messages and so was sort of on a paranoid mission. Basically was trying to get rid of server stuff that was referenced in system logs ....


Definitely deleted samba

Deleted mycomputername-local-host in /network folder

Possibly deleted apache

And yes, likely some others as well


Not sure if that info makes any difference....


Thanks again

Jul 25, 2012 11:40 PM in response to karin1968

I do not have a backup. Should I back up before I try doing a reinstall of the os x?


That's also known as shutting the barn door after the horse has bolted. 🙂

It can't hurt, but it's not going to help much.


Camelot: when you say "apps and user content should stay intact" - doesn't sound very definitive. Are there any variables that come into play?


No.. generally it's pretty reliable, but yours is an odd situation. I wouldn't expect to lose any user data, just CYA 🙂


I do have a start up disk along with some apps that I created in retrospect many years ago ....(I think it's os x 10.2.8) Can I use this to boot up and then just navigate to my user files so I can get some things done that I need to?


Unlikely. For one have you even tried restoring from your Retrospect backup? (it's not the most reliable system).

Secondly, you can't boot from your Retrospect backup, so you'll need to restore that system to boot from it. Have you got a second disk to restore to (you do NOT want to restore 10.2.x over your 10.4.x system).


in terms of "random deleted files" : not entirely random


Ok, maybe not entire random, but it's also somewhat unknown. You need to have some idea of what files you're trying to restore, but if you haven't got them in a backup where are you going to get them from?

You cannot just take old copies from your 10.2.x system and hope they'll work (in case that's what you're thinking).


The BEST solution is to boot from the 10.4.x installer disk and let it do its thing.


And for what its worth, Unauthorized access attempts, in and of themselves, are not a cause for concern since they were clearly caught by the OS. It's the access attempts that succeed (and are not logged) which are more of an issue.

Jul 29, 2012 8:31 PM in response to Camelot

Hi Camelot - thanks for the info.....yes, shutting barn door after horse has bolted. I got it.


So, i still haven't done the resinstall of the os x, but i did get my [even] old[er] Powerbook G4 out of storage [867 MHz, PPC G4, 1MB L3 cache, 768 MB SDRAM]. I installed Tiger and then ran all the updates so that Im now running 10.4.11 [same as machine we've been discussing].


Before i go ahead with the resinstall, Is there anything i can do using this old[er] machine to try and fix the broken down newer one??

cheers!

Jul 29, 2012 8:35 PM in response to Camelot

ie. could i at least access my files if i burned a boot cd of my os 9 start up disk from the old g4 and used that to get into my busted one?


as an aside -


1. i am planning on getting a new[er] mac book pro within the next week or so -

if it comes preinstalled with lion, will i be able to migrate over to the new machine from tiger? [assuming i get my current g4 in operating condition].?

Command Line Expert Needed: Deleted hostconfig (+ others) - boots to single user mode only !

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.