Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Fix disks not mounting problem Desktop
Having problems mounting disks? Both .img files and removable media? Take a look at your /etc/hostconfig file. It should be about 27 lines or so. Does it contain the line "AUTODISKMOUNT=-REMOVABLE-"? If the file fails either of these tests, it may be corrupt. How might this happen? Probably due to a System Preferences crash or general disk corruption. If you'd like a clean copy to restore with, along with instructions on how to do so, read the rest of this article.

You'll have to have root privileges to fix this file. The easiest way to do this is to first 'cd /etc' then type 'sudo cp hostconfig hostconfig.bad' (in case we want to go backwards, we'll make a copy) then 'sudo rm hostconfig' (to get rid of the bad one), and finally, 'sudo pico hostconfig' (you'll need to enter your password on the first 'sudo'). This will put you in pico, the simplest of the command line editors. Once there, copy and paste the following text, save the change, and quit pico. I'm not sure whether you'll need to logout and/or restart, but it can't hurt.

COPY EVERYTHING BELOW THE DOTTED LINE:
--------------------------------------
##
# /etc/hostconfig
##
# This file is maintained by the system control panels
##

# Network configuration
HOSTNAME=-AUTOMATIC-
ROUTER=-AUTOMATIC-

# Services
AFPSERVER=-NO-
APPLETALK=en0
AUTHSERVER=-NO-
AUTOCONFIG=-YES-
AUTODISKMOUNT=-REMOVABLE-
AUTOMOUNT=-YES-
CONFIGSERVER=-NO-
IPFORWARDING=-NO-
MAILSERVER=-NO-
MANAGEMENTSERVER=-NO-
NETBOOTSERVER=-NO-
NISDOMAIN=-NO-
TIMESYNC=-NO-
QTSSERVER=-NO-
SSHSERVER=-NO-
WEBSERVER=-NO-
APPLETALK_HOSTNAME="My Mac"
    •    
  • Currently 2.00 / 5
  You rated: 2 / 5 (4 votes cast)
 
[18,236 views]  

Fix disks not mounting problem | 15 comments | Create New Account
Click here to return to the 'Fix disks not mounting problem' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
This is also how you set your hostname
Authored by: Anonymous on Apr 13, '01 07:13:01PM

For those of you who are annoyed at the seeming inability to change your hostname to something besides 'localhost' through standard tools, this is the non-standard tool you must use. Change the line "HOSTNAME=-AUTOMATIC-" to "HOSTNAME=<myhost>", replacing <myhost> with whatever you want.
There are no GUI tools to do this, not even NetInfo manager. This has worked fine for me so far.
One final note - if your machine is a server with a static IP and an entry in a DNS, leaving it as -AUTOMATIC- is OK. -AUTOMATIC- causes a reverse DNS lookup for the machine's IP.



[ Reply to This | # ]
Doesn't seem to work
Authored by: UtSupra on Apr 14, '01 10:50:13AM

Changing this file doesn't seem to do anything...
Certain things can be done thru System Preferences (eg., want to activate ssh server? just allow remote login in sharing preferences, if you already have it (previous to the update) then deactivate and activate it again).
If you want to change the localhost name, you need to do it in NetInfo and reboot (Ugly: rebooting is for installing new hardware!)



[ Reply to This | # ]
Disk Copy error .img & .dmg files
Authored by: mark on Apr 14, '01 02:26:47PM

I can't install any new software, I am getting the following Disk Copy error on all .img & .dmg files:

"You have inserted a disk containing volumes that macosx can't read. To use the unreadable volumes, click initialize. To use only the rest of the disk, click continue."

My "etc/hostconfig" file looks exactly like the one shown above, so that doesn't seem to be the problem.

HELP....



[ Reply to This | # ]
console log for DiskCopy failure
Authored by: mark on Apr 18, '01 12:45:51PM

Here is my console log showing the failure to install 3 files [logged in as root]: TinkerTool, XOptimize, Sharity.

Apr 18 10:02:19 localhost WindowServer[51]: MPHWBlit Composite: surface copy fails (-536870201) ... disabling.

file://localhost/System/Library/Extensions/msdosfs.kext/ is not a valid kernel extension bundle.
file://localhost/System/Library/Extensions/msdosfs.kext/ is not a valid kernel extension bundle.
file://localhost/System/Library/Extensions/webdav_fs.kext/ is not a valid kernel extension bundle.
file://localhost/System/Library/Extensions/webdav_fs.kext/ is not a valid kernel extension bundle.
/dev/disk1
hfs: unknown user id: unknown
Apr 18 10:02:39 localhost autodiskmount[78]: DiskVolume_mount_foreign: There is a filesystem error with the device disk1 which was attempting to mount at /Volumes/TinkerTool12a

Apr 18 10:02:39 localhost autodiskmount[78]: disk1 ??? hfs no no TinkerTool12a [not mounted]

/dev/disk1
hfs: unknown user id: unknown
Apr 18 10:03:20 localhost autodiskmount[78]: DiskVolume_mount_foreign: There is a filesystem error with the device disk1 which was attempting to mount at /Volumes/TinkerTool12a

Apr 18 10:03:20 localhost autodiskmount[78]: disk1 ??? hfs no no TinkerTool12a [not mounted]

/dev/disk1
hfs: unknown user id: unknown
Apr 18 10:05:31 localhost autodiskmount[78]: DiskVolume_mount_foreign: There is a filesystem error with the device disk1 which was attempting to mount at /Volumes/Xoptimize v0.1

Apr 18 10:05:31 localhost autodiskmount[78]: disk1 ??? hfs no no Xoptimize v0.1 [not mounted]

/dev/disk1
hfs: unknown user id: unknown
Apr 18 10:06:55 localhost autodiskmount[78]: DiskVolume_mount_foreign: There is a filesystem error with the device disk1 which was attempting to mount at /Volumes/Sharity.2.4

Apr 18 10:06:55 localhost autodiskmount[78]: disk1 ??? hfs no no Sharity.2.4 [not mounted]



[ Reply to This | # ]
Mounting media
Authored by: ascorbic on Apr 23, '01 08:34:22AM
To mount the disks without restarting type:
sudo autodiskmount -v -a
It should mount all volumes and list them too. They don't seem to show up in the finder right away, but you can force them to by then typing:
open /Volumes/* 
which should open them all.
It'd been driving me mad for days!

[ Reply to This | # ]
Mounting media
Authored by: olealf on Apr 25, '01 09:26:58AM

Are you sure that this isn't another problem that has been there before you changed the hostconfig file? I ask this because for me it had been the case.



[ Reply to This | # ]
Fix Worked, Caused Problem?
Authored by: macvantage on Apr 23, '01 09:47:37PM

Pasting in the hostconfig file worked for solving my problems with the disk images not mounting. Being a rookie with the terminal it took me a couple of trys to get things in right.

After restarting to use the new hostconfig, now I can't access the Sharing settings in the System Preferences. Whenever I choose them, System Preferences quits. Any ideas on how to fix this?



[ Reply to This | # ]
Fix Worked, Caused Problem?
Authored by: see on Jun 29, '01 08:26:47AM

check the file access settings:
ls -al /etc/hostconfig
should be:
-rw-r--r-- 1 root wheel 472 Jun 29 14:07 /etc/hostconfig
if its not like that then do:
chmod 644 /etc/hostconfig
(as root ofcourse)
hope this helps



[ Reply to This | # ]
yey! it works!
Authored by: Ranger Nik on Apr 24, '01 04:27:31AM

my hostconfig file had about 4 entries... i just replaced it with yours, restarted, and... bingo! it works! ripping a CD in the background as i type this :-)

this is one if the reasons i will never be able to go back to OS 9. it drives me crazy when the system comes to a crunching halt every time the CD spins up. but i disgress...

thanks so much!

nik



[ Reply to This | # ]
yay it doesn't work.
Authored by: Anonymous on Apr 28, '01 12:06:38PM

i've tried every remedy i can find out there -including all of these and one from macfixit.

nothing works.

cannot mount .img or .dmg.

i hope this gets more airplay.



[ Reply to This | # ]
yay it doesn't work.
Authored by: beatnik23 on Aug 15, '01 08:52:33PM

I too am in the same rowboat brother. If you find a fix email me at lost_n_mad@yahoo.com.Please.



[ Reply to This | # ]
I want 10.1.5 back!
Authored by: bclink on Sep 16, '02 03:08:57PM

None of the methods above have worked for me. After 'upgrading' to 10.2 my Firewire HD would not mount. Nothing would change that, so I did a clean install and everything worked fine- for 1.5 days. iPhoto crashed my system (another poor app I believe) and when I restarted I was back to not having a Firewire drive.

Replacing the contents of hostconfig had no effect, and the autodiskmount -v -a command produces this output:
Some fsck failed!
DiskDev FileSys Fixed Write Volume Name Mounted On
disk0s2 hfs yes yes Shaguar /
disk0s3 hfs yes yes WTC /Volumes/WTC
disk1 hfs yes yes The Boot [not mounted]


I have no idea what to do and am very close to installing 10.1.5 on my free partition and getting rid of 10.2

Any help is greatly appreciated.
Digi



[ Reply to This | # ]
It works!
Authored by: andrewz on Oct 20, '03 08:43:06AM
I accidentally cut power to a FireWire drive, which brought my PowerBook to a grinding halt. When I restarted, Mac OS X (10.2.8) wouldn't mount optical discs or disk images.

Indeed, my /etc/hostconfig file was missing an AUTODISKMOUNT line. Replacing it and restarting fixed the problem.

Thank you, thank you, thank you!

[ Reply to This | # ]

Fix disks not mounting problem
Authored by: leica on Oct 14, '04 04:16:18AM

I was missing lines from hostconfig as well, great stuff thanks -- worked a treat.



[ Reply to This | # ]
Fix disks not mounting problem
Authored by: nancy86 on Feb 10, '10 01:53:44AM
Your file system might have corrupted due to which disk is unable to mount data and not able to access any record. Disk Utility will be benificial but of it fails you need to reinstall the OS X but before that make sure that you recover your data successfully. That can be doen using OS X Data Recovery software. I am sure it will help you out.

[ Reply to This | # ]