Menu

Duplicate Windows Icon

2015-01-25
2016-04-23
  • Patrick Moy

    Patrick Moy - 2015-01-25

    I'm dual booting Mac Os X 10.7.5 (Lion) with Windows 7/64bits on my MacPro 1.1 computer. I have two disks installed. The first disk contains Mac Os X. The 2nd disk contains Windows 7, installed using the default Windows installer. Initially, I have 2 primary partitions on the Windows 7 disk. One partition contains the Windows files (named Win7-64). The other partition is a 100MB partition created automatically by the windows installer (named System Reserved). With this configuration, I get one Mac icon and 2 Windows icon in the rEFInd startup screen. I then added an extended partition containing a single logical drive (named Data) in the remaining unallocated space on the windows disk. After that, I got 3 more Windows icons in the rEFInd screen. So now I have 6 icons total. Hovering the mouse over each icon, I get the following respectively:

    1) Boot Mac OS x from Lion
    2) Boot Windows from FAT Volume
    3) Boot Windows from FAT Volume
    4) Boot Legacy OS from FAT Volume
    5) Boot Windows from FAT Volume
    6) Boot Windows from Partition 5

    Doing "diskutil list" from "Terminal" on MacOS shows the following:

    /dev/disk0
       #:        TYPE NAME                     SIZE       IDENTIFIER
       0:        GUID_partition_scheme        *250.1 GB   disk0
       1:        EFI                           209.7 MB   disk0s1
       2:        Apple_HFS     Lion            249.2 GB   disk0s2
       3:        Apple_Boot    Recovery HD     650.0 MB   disk0s3
    /dev/disk1
       #:        TYPE NAME                         SIZE       IDENTIFIER
       0:        FDisk_partition_scheme           *500.1 GB   disk1
       1:        Windows_NTFS    System Reserved   104.9 MB   disk1s1
       2:        Windows_NTFS    Win7-64           125.7 GB   disk1s2
       3:        Windows_NTFS    Data              374.3 GB   disk1s5
    

    I've tried modifying the parameter "dont_scan_volumes" in refind.config to try to fix this problem with no luck.

    What's the proper way to configure rEFInd so that I see one Mac icon, and only one Windows icon when I start the computer?

     

    Last edit: Patrick Moy 2015-01-25
    • Patrick Moy

      Patrick Moy - 2015-01-30

      Does anyone have a suggestion on how to solve this?

      I can eliminate the first duplicate by re-installing Windows 7 to get rid of the 100MB primary partition. But the 3 additional Windows icon resulting from adding an extended partition consisting of a single logical drive confuses me.

       
  • Roderick W. Smith

    As a partial solution, try this:

    dont_scan_volumes "Legacy OS","Partition 5"
    

    You could then try adding volume labels, if they don't exist, to other volumes. If this changes the labels shown by rEFInd, you may then be able to edit them out in a similar manner.

    That said, the detection of legacy OSes by rEFInd seems to have gone a bit wonky in recent releases -- or maybe more people are encountering a bug that's existed for a while. I intend to look into this soon.

     
  • Patrick Moy

    Patrick Moy - 2015-02-03

    Roderick, thanks for your reply.

    Adding

    dont_scan_volumes "Legacy OS", "Partition 5"
    

    got rid of icons 4) and 6) as expected. But I don't understand your comment regarding volume labels. I named all the partitions when they were first created (e.g., Win7-64, data, etc.). These names do appear when I do "diskutil list" (please see above). They also show up in the Mac OSX Finder as well as in Windows 7. But these names are not picked up by rEFInd for some reason. Are volume labels something different than these names?

     
  • Roderick W. Smith

    I've discovered a bug that caused whole disks to be misidentified as FAT filesystems. I believe I've fixed it. The source code is in git and here's a binary package:

    http://www.rodsbooks.com/refind-bin-0.8.5.4.zip

    If you care to test it, I'd appreciate hearing back. My expectation is that you'll get a wider variety of descriptions, but it might just change them all to something else that's the same so it might not actually help.

     
  • Roderick W. Smith

    Actually, try this one, which is a further refinement:

    http://www.rodsbooks.com/refind-bin-0.8.5.5.zip

     
  • Roderick W. Smith

    One more thought: If you install the NTFS driver that comes with rEFInd 0.8.5 (and the test packages referenced above), you may get proper filesystem names that you can use to differentiate the partitions.

     
    • Patrick Moy

      Patrick Moy - 2015-02-04

      I've tried 0.8.5.5. Here are the results:

      * The rEFInd logo comes up a lot slower, but I no longer have to
         use "scan delay 1", so elapsed time is around same as before.
      
      * The 6 icons now show the following names:
      
          1) Boot Mac OS x from Lion
          2) Boot Windows from NTFS Volume
          3) Boot Windows from NTFS Volume
          4) Boot Legacy OS from FAT Volume
          5) Boot Windows from NTFS Volume
          6) Boot Windows from Partition 5
      
        As before, I can remove icons 4 & 6 by using:
          dont_scan_volumes "Legacy OS", "Partition 5"
      

      As mentioned in one of my prior post, icons 4, 5, and 6 appeared when I added the extended partition consisting of a single logical drive. My understanding is that extended partitions don't have bootloaders. If this is the case, why is rEFInd still seeing it as a bootable volume?

      How do I install the NTFS driver, and which driver should I install? I'm installing from OSX Lion, which I believe is 32 bits, but I'm dual booting with 64-bit Windows 7.

       

      Last edit: Patrick Moy 2015-02-04
  • Roderick W. Smith

    You can install the NTFS driver from the rEFInd archive. Assuming you've got a 64-bit EFI, you'd want the ntfs_x64.efi file from the refind/drivers_x64 subdirectory. To install it, you'll need to mount your ESP and copy the file to the EFI/refind/drivers_x64 (or possibly EFI/BOOT/drivers_x64) directory on the ESP. The first couple of steps under the manual OS X installation instructions detail how to find and mount your ESP.

    The extended partition does not contain boot loaders. Unfortunately, it looks from your output as if your extended partition contains an NTFS identifier -- even diskutil seems a little confused. (Your /dev/disk1s2 must be your extended partition, but your diskutil list output claims that it's NTFS. Fortunately, it at least seems to correctly find the one logical partition contained in that extended partition, so this is a cosmetic problem at worst.) The NTFS signature is difficult to distinguish from executable code, so it's hard to tell an NTFS volume that has a boot loader from one that doesn't. I'm continuing to look into this to see if I can automatically eliminate non-bootable NTFS volumes. Given that you have only two partitions (plus the extended partition) on /dev/disk1, you could probably convert the one logical partition (/dev/disk1s5) to a primary partition with my FixParts program. This would eliminate the extended partition confusion. This approach is not 100% risk-free, though; any partition manipulation runs the risk of mucking up your partition table and losing your data.

     
  • Roderick W. Smith

    A correction: I misinterpreted your diskutil list output. I assumed it would show the extended partition, but it's not doing that -- you've actually got three NTFS partitions, not two NTFS partitions and an extended partition that's being misidentified as an NTFS partition. rEFInd is showing the extended partition and labeling it "Partition 5" because of the way the EFI enumerates partitions, which doesn't match their numbering in the partition table. None of this affects my recommendation to use the NTFS driver, which should at least give you unique names for each of your NTFS volumes (assuming they have unique filesystem names, as set in Windows).

    Also, from what I can tell, all NTFS volumes have BIOS boot code that, if it doesn't find a bootable file later in the filesystem, displays a message to the effect that the volume is unbootable. This makes it impossible for rEFInd to distinguish a bootable NTFS volume from a non-bootable one -- at least, short of trying to find that bootable file in the filesystem. That could conceivably be done when an NTFS driver is loaded, but I'll need to research the issue some more.

     
  • Patrick Moy

    Patrick Moy - 2015-02-04

    I'm running a Mac Pro 1.1, which cannot be upgraded past Mac OSX Lion without some non-Apple-supported modifications. I think the major reason may be because Mac Pro 1.1s have a 32-bit EFI. If this is the case, should I load ntfs_ia32.efi instead? I assume loading the wrong driver is easily reversible since I can just copy in a different one if the first doesn't work - correct?

    disk1s2 was already there before I added the extended partition. disk1s1 is the 100MB primary partition created by the Windows 7 installer; disk1s2 is the primary partition I created to contain the Windows 7 system files; disk1s5 is the extended partition. I speculate icon 6 represents the extended partition since extended partitions do not have a file-format association, icon 5 represents the single logical drive in the extended partition (I formatted my logical drive in NTFS). I'm clueless on origin of icon 4.

    Since this is a relatively new installation and doesn't contain much user data, I can just delete the extended partition, and create a primary partition in its space. If I did that, I think I would end up with 3 Windows icon, one for each of my 3 primary partitions (same number of icons as what I have now with the extended partition and using the dont_scan_volume statement in the rEFInd configuration file).

    I was under the impression that rEFInd displays only partitions that contain a bootloader, so created the extended partition to ensure no bootloader is installed. My understanding seems to be incorrect.

     

    Last edit: Patrick Moy 2015-02-04
  • Roderick W. Smith

    Yes, if you've got a 32-bit EFI, use the *ia32.efi file rather than *x64.efi. You can check the extension of the existing rEFInd to see which you need. (If both are present, then create both drivers_x64 and drivers_ia32 subdirectories and put matching driver files in each one.)

    The trouble is that detecting whether a partition is bootable under BIOS is trickier than it sounds. The first sector of a partition may contain boot code, but similar or identical boot code is sometimes present even on unbootable partitions -- if the partition can't be booted, the boot code just displays a message to that effect. This is true, I suspect, of all NTFS partitions, so they all show up as bootable under rEFInd. In theory, an extended partition should not show up as bootable, but in practice, they sometimes look like they've got boot code, too, and distinguishing one case from another requires some deep and error-prone checks.

    It's possible to weed out unbootable partitions that contain boot code if you can read the filesystem and check for valid boot files. As a general case, this is a monumental task, since boot files could, in principle, be anything. Fortunately, NTFS boot volumes will almost certainly be Windows systems, which have just a few types of identifying boot files. Thus, if an NTFS driver is loaded, rEFInd can check for those boot files -- now. That code is brand new, and is here:

    http://www.rodsbooks.com/refind-bin-0.8.5.6.zip

    Previous versions did not do this check, largely because there was no NTFS driver in rEFInd prior to 0.8.5. Also, most people have much simpler setups than yours, with just one NTFS volume, so seeing non-bootable NTFS volumes is a non-issue for most people. Thus, I've given this problem little attention until now.

    Note that 0.8.5.6 does nothing new to weed out your extended partition, but you should be able to remove it by using dont_scan_volumes in refind.conf.

    Also, be aware of some terminology: An extended partition is a placeholder for one or more logical partitions. rEFInd is detecting, and presenting as bootable, both your extended partition and the one logical partition it contains. The logical partition is an NTFS volume and should be weeded out by the combination of rEFInd 0.8.5.6 and the NTFS driver, but the extended partition will remain visible as a (non-functioning) boot option.

     
  • Patrick Moy

    Patrick Moy - 2015-02-04

    Using 0.8.5.6 with appropriate NTFS drivers loaded (and leaving "dont_scan_volumes" set as before), rEFInd shows two icons:

    1) Boot Mac OS x from Lion
    2) Boot Windows from Win7-64
    

    But selection 2 is not bootable. I get the error message "BOOTMGR is missing" when I tried to boot from 2).

    Even though most of the Windows files are in the Win7-64 partition, looks like the Windows installer puts the bootloader only in the 100MB primary partition it creates. So for Windows 7 to boot, rEFInd needs to show the 100MB partition name "System Reserved."

     
  • Patrick Moy

    Patrick Moy - 2015-02-04

    Roderick, everything's working perfectly now. Thank you very much for your help.

     
  • Kyle

    Kyle - 2016-03-20
     

    Last edit: Kyle 2016-03-21
  • Kyle

    Kyle - 2016-03-20

    this is the only thread i could find that had any similarity to my issues. Adding my labels to dont_scan_volumes doesn't work.

    Where would i find the 32-bit ntfs driver for refind? Since i ran the refind installer from a 64-bit El Capitan install, i had to manueall bless the 32-bit refind loader, so how do i go about setting up the driver for ntfs? it's wierd, because tho i use a 32bit efi, my ext4 64 driver seems to work just fine..

    leep in mind this is all using legacy OS, with the exception of my OS X pikeralpha El Capitan install

     
  • Kyle

    Kyle - 2016-03-21
     

    Last edit: Kyle 2016-03-21
  • Roderick W. Smith

    Kyle, from your description, something is not adding up. A 64-bit EFI driver will not work on a 32-bit EFI, period. I recommend you start a new thread and provide additional details, including the output of the following command, typed in an OS X Terminal window:

    ioreg -l -p IODeviceTree | grep firmware-abi
    

    Also, please show a screen shot of the rEFInd about/information screen.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.