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


Click here to return to the 'Unmount a volume at startup' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Unmount a volume at startup
Authored by: bdm on Jun 15, '05 07:33:54PM

It is not true that disk0 is always the boot disk. Mine is disk1 right now. I'm guessing that the startup code assigns numbers in some sort of hardware order: my two internal hard disks are numbered in the order that they appear on the ATA bus and the numbering was constant over many restarts. However, you are right in that we shouldn't assume anything not clearly documented. The solution is to use the mount point name, as jitterbugboy suggested. So the diskutil line in the original hint can be changed to

/usr/sbin/diskutil unmount "/Volumes/Whateveritscalled"

I knew there were possible solutions using fstab and similar, but fiddling with things like that will just give trouble at the next OS upgrade.

Brendan.

[ Reply to This | # ]
Unmount a volume at startup
Authored by: TigerKR on Jun 15, '05 11:56:07PM

You're absolutely right. Looking now at df my boot drive is /dev/disk2s12



[ Reply to This | # ]
Unmount a volume at startup
Authored by: g00ner on Jun 18, '05 06:11:08AM

Many thanks for this tip guys it works well.

After reading through this thread and looking at the 'man diskutil' commands in Terminal I've now modified the script slightly by using 'eject' rather than 'unmountDisk'. This works better for me as It now also stops my LaCie FW drive's fan (which is noisier than my G4 MDD!)

Many thanks for all the info.

g00ner.



[ Reply to This | # ]