An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Disk Utility output in All Messages log
#17098 08/19/11 11:55 PM
Joined: Aug 2009
OP Offline

Joined: Aug 2009
Recently, I turned on the debug menu in Disk Utility by using this command in Terminal:

defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

After enabling the debug menu, Disk Utility sends output to the All Messages log when you launch it. The interesting detail is the very clear identification of the active boot volume:

Code:

I just noticed that the All Messages log in Lion shows a lot of detail about the mounted volumes if you simply launch Disk Utility and let it gather information about the disks. 

The All Messages log can be read with the Console application, located in /Applications/Utilities. Do not be alarmed about all the error messages you will see from all aspects of the operating system. Unix does a lot of talking to itself.

[code]
8/17/11 08:40:25.497 PM Disk Utility: Disk Utility started.
8/17/11 08:40:25.626 PM Disk Utility: module: Restore - loaded
8/17/11 08:40:25.633 PM Disk Utility: module: First Aid - loaded
8/17/11 08:40:25.651 PM Disk Utility: module: Erase - loaded
8/17/11 08:40:25.664 PM Disk Utility: module: Information - loaded
8/17/11 08:40:25.666 PM Disk Utility: DUDiskController needed [DMManager sharedManager], thread = 0x7fc381c19400 
8/17/11 08:40:25.688 PM Disk Utility: preBootEnvironmentFlag: DMPreBootEnvironmentEFI
8/17/11 08:40:25.688 PM Disk Utility: module: Partition - loaded
8/17/11 08:40:25.696 PM Disk Utility: module: RAID - loaded
8/17/11 08:40:25.707 PM Disk Utility: ## rebuildMasterList ##
8/17/11 08:40:26.904 PM Disk Utility: **********
8/17/11 08:40:27.068 PM Disk Utility: 		Disk:	disk0 (WDC WD1001FALS-40Y6A0 Media) - 0x7fc381c5ece0
8/17/11 08:40:27.075 PM Disk Utility: 			Partition:	disk0s1 (disk0s1) - 0x7fc383059c90
8/17/11 08:40:27.082 PM Disk Utility: 			Partition:	disk0s2 (Macintosh HD)    [* boot volume] - 0x7fc38305a220
8/17/11 08:40:27.088 PM Disk Utility: 			Partition:	disk0s3 (Recovery HD) - 0x7fc38305ad60
8/17/11 08:40:27.091 PM Disk Utility: 		Disk:	disk1 (G-TECH) - 0x7fc383029e00
8/17/11 08:40:27.098 PM Disk Utility: 			Partition:	disk1s1 (disk1s1) - 0x7fc381e72340
8/17/11 08:40:27.104 PM Disk Utility: 			Partition:	disk1s2 (Super_Duper_Clone) - 0x7fc381e72780
8/17/11 08:40:27.111 PM Disk Utility: 			Partition:	disk1s3 (Recovery HD) - 0x7fc381e72ee0
8/17/11 08:40:27.118 PM Disk Utility: 			Partition:	disk1s4 (eDrive) - 0x7fc381e736d0
8/17/11 08:40:27.121 PM Disk Utility: 		Disk:	disk2 (G-TECH) - 0x7fc381cb2990
8/17/11 08:40:27.121 PM Disk Utility: 		Optical Device: SuperDrive - 0x7fc38302ad70
8/17/11 08:40:27.122 PM Disk Utility: 		Disk:	disk0 (WDC WD1001FALS-40Y6A0 Media) - 0x7fc381c5ece0
8/17/11 08:40:27.122 PM Disk Utility: 			Partition:	disk0s1 (disk0s1) - 0x7fc383059c90
8/17/11 08:40:27.122 PM Disk Utility: 			Partition:	disk0s2 (Macintosh HD)    [* boot volume] - 0x7fc38305a220
8/17/11 08:40:27.123 PM Disk Utility: 			Partition:	disk0s3 (Recovery HD) - 0x7fc38305ad60
8/17/11 08:40:27.123 PM Disk Utility: 		Disk:	disk1 (G-TECH) - 0x7fc383029e00
8/17/11 08:40:27.123 PM Disk Utility: 			Partition:	disk1s1 (disk1s1) - 0x7fc381e72340
8/17/11 08:40:27.124 PM Disk Utility: 			Partition:	disk1s2 (Super_Duper_Clone) - 0x7fc381e72780
8/17/11 08:40:27.124 PM Disk Utility: 			Partition:	disk1s3 (Recovery HD) - 0x7fc381e72ee0
8/17/11 08:40:27.125 PM Disk Utility: 			Partition:	disk1s4 (eDrive) - 0x7fc381e736d0
8/17/11 08:40:27.125 PM Disk Utility: 		Disk:	disk2 (G-TECH) - 0x7fc381cb2990
8/17/11 08:40:27.131 PM Disk Utility: 			Partition:	disk2s1 (disk2s1) - 0x7fc381cbf2f0
8/17/11 08:40:27.138 PM Disk Utility: 			Partition:	disk2s2 (H_G_Wells) - 0x7fc383326e50
8/17/11 08:40:27.139 PM Disk Utility: 		Optical Device: SuperDrive - 0x7fc38302ad70


The words "boot volume" will not display inside brackets in the MicroMat forums unless the "code" tag is used. You can scroll the window horizontally.


MicroMat Inc
Makers of TechTool
Re: Disk Utility output in All Messages log
MicroMatTech3 #17130 08/21/11 09:36 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Or more concisely, without needing to enable any hidden menus:

Code:
for i in /Volumes/*; do
    bless --info "$i"
done | sed -ne 's/.*blessed folder is //p'
 
gets a list of blessed folders on currently mounted volumes. (It's the presence of a blessed folder that makes the volume bootable.)

Note that MacOS 9 blessed folders, if any, will be included in the list. If you need to distinguish them in the output:
Code:
for i in /Volumes/*; do
    bless --info "$i"
done | sed -ne 's/.*\(OS .\) blessed folder is /\1: /p'
 
(Code tested under Tiger and Lion.)

To get just the list of mount points of OS-X bootable volumes:
Code:
for i in /Volumes/*; do
    bless --info "$i"
done | sed -ne 's/.*OS X blessed folder is \(.*\)System\/Library\/CoreServices$/\1/p'
 


Moderated by  alternaut, dkmarsh, joemikeb 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.015s Queries: 18 (0.012s) Memory: 0.5785 MB (Peak: 0.6339 MB) Data Comp: Zlib Server Time: 2024-04-19 14:29:59 UTC
Valid HTML 5 and Valid CSS