Disk IDs inconsistent / change between boots?

Discussion in 'Mac OS X Lion (10.7)' started by spacewrench, Sep 30, 2011.

  1. spacewrench macrumors newbie

    Sep 30, 2011
    I have a 2011 MBP-15 that came with Lion-10.7. I recently installed an OptiBay and SSD, with the 60GB SSD in the normal laptop HD slot and the magnetic disk in the OptiBay (in the CDROM slot). Everything works OK, except:

    On reboots, the system assigns disk0 and disk1 apparently randomly. It works either way because the Mac bootloader can find the system partition and use it, but my Parallels (PD7) virtual machines (which use raw partitions) get confused when their partitions switch from /dev/disk0s3 to /dev/disk1s3.

    Here's a script from a terminal, taken before and after a reboot, showing the disk IDs changing. No other monkey business going on, just "df", reboot, "df" again. (The scrollback into the last session that Terminal provides is kinda creepy, but it sure was handy in this case!)

    Last login: Thu Sep 29 23:13:06 on console
    user@system:~$ df [COLOR="Red"](before reboot)[/COLOR]
    Filesystem                        512-blocks      Used Available Capacity  Mounted on
    [COLOR="RoyalBlue"]/dev/disk1s2[/COLOR]                       115552184  77606568  37433616    68%    /
    devfs                                    386       386         0   100%    /dev
    /dev/disk0s4                       113281248    306416 112974832     1%    /Volumes/Spare
    /dev/disk0s5                        97656248  22693312  74962936    24%    /Volumes/Mersenne
    map -hosts                                 0         0         0   100%    /net
    map auto_home                              0         0         0   100%    /home
    localhost:/oUocRgCoedIF3u3LsZiQ8Z  115552184 115552184         0   100%    /Volumes/MobileBackups
    Last login: Thu Sep 29 23:39:42 on ttys000
    user@system:~$ df [COLOR="Red"](after reboot)[/COLOR]
    Filesystem                        512-blocks      Used Available Capacity  Mounted on
    [COLOR="RoyalBlue"]/dev/disk0s2[/COLOR]                       115552184  77647240  37392944    68%    /
    devfs                                    386       386         0   100%    /dev
    /dev/disk1s4                       113281248    306432 112974816     1%    /Volumes/Spare
    /dev/disk1s5                        97656248  22703752  74952496    24%    /Volumes/Mersenne
    map -hosts                                 0         0         0   100%    /net
    map auto_home                              0         0         0   100%    /home
    localhost:/Wh5vX7CWR-Z6W0lcB38ctg  115552184 115552184         0   100%    /Volumes/MobileBackups
    Is there any way to fix disk enumeration? (In the Old Days, you'd do it with a primary/secondary or master/slave jumper, but there must be something better now...)
  2. Partron22 macrumors 68020


    Apr 13, 2011
    I was digging around at this today, for my own purposes, and came up empty. As Apple says, DiskIDs can and do change unpredictably.
    A disk's universally unique identifier doesn't often change, but it's not obvious how to get those to work in your situation. There doesn't seem to be any way to reset diskIDs based on UUID values.
  3. spacewrench thread starter macrumors newbie

    Sep 30, 2011
    Whoa, that's terrifying (to somebody who's been using unix for decades). I wouldn't even have thought to look for information like "we know about this, but we're not even going to bother pretending it's a problem."
    I guess I'll have to try to fix it from the Parallels side somehow...

  4. digitaldreamer macrumors newbie

    Aug 20, 2010
    Yes, this is perfectly normal.

    I use a hackintosh (Lion on a Gigabyte UD5 board) and drive IDs are known to change. I believe it is based on a first-come-first-serve process at boot - whichever drive is ready first is the one that gets tagged first. No sense waiting for "#1" to spin up if it isn't ready, yet - ID them as they come.

    The OS uses either the drive name or drive UUID for identification. If a drive/partition ID is required, then you can use mount, diskutil list or diskutil info "/Volumes/drive_name" and parse the stdout.

    Is the drive ID the only way Parallels identifies the HDs?
    If Parallels can be scripted via Applescript, one could write a combo BASH/Applescript script for it, I suppose.

  5. spacewrench thread starter macrumors newbie

    Sep 30, 2011
    Not sure...the /dev/disk0s3 names appear in the config file and raw-partition-picker dialog, but there are also UUIDs in the file. I'm reluctant to fiddle with it, since it seems to be a little fragile. (E.g., every time you open the partition picker, it auto-selects the first partition, even though I've already configured the VM not to use that partition.)

    The thing I'm really worried about is the interaction between partitions, the GPT, and the protective MBR that's on the disk, which is apparently essential for Windows to boot correctly. There's so much Friendly UI between me and what really happens at the OS level that it's hard to say whether a configuration can be expected to work right.
  6. EuropeanLynx macrumors newbie

    Jun 14, 2012
    I have the exact same problem!
    Spacewrench, did you manage to find some solution?

Share This Page