Announcement

Collapse
No announcement yet.

(Solved) another grub2 issue; booting HFS+ partition (no EFI)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    (Solved) another grub2 issue; booting HFS+ partition (no EFI)

    The last distro I successfully installed was Hardy, due to problems with the included ATI driver in later versions. I was very happy to see that Lucid installed so easily, and seems relatively bug free.

    My problem is with Grub2, which I have very little experience with.

    I have an OSX partition (Tiger), which Grub2 identified & added the relevant entry. When I try boot from it my system reboots.

    The grub-legacy entry to boot this partition was very simple:

    title chainload Mac OSX no_efi
    root (hd0,2)
    makeactive
    chainloader --force +1


    the entry that grub2 has added is quite complex:


    menuentry "Mac OS X (32-bit) (on /dev/sda3)" {
    insmod hfsplus
    set root='(hd0,3)'
    search --no-floppy --fs-uuid --set 2f2550fb6cd195eb
    insmod vbe
    set do_resume=0
    if [ /var/vm/sleepimage -nt10 / ]; then
    if xnu_resume /var/vm/sleepimage; then
    set do_resume=1
    fi
    fi
    if [ $do_resume == 0 ]; then
    xnu_uuid 2f2550fb6cd195eb uuid
    if [ -f /Extra/DSDT.aml ]; then
    acpi -e /Extra/DSDT.aml
    fi
    xnu_kernel /mach_kernel boot-uuid=${uuid} rd=*uuid
    if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
    xnu_mkext /System/Library/Extensions.mkext
    else
    xnu_kextdir /System/Library/Extensions
    fi
    if [ -f /Extra/Extensions.mkext ]; then
    xnu_mkext /Extra/Extensions.mkext
    fi
    if [ -d /Extra/Extensions ]; then
    xnu_kextdir /Extra/Extensions
    fi
    if [ -f /Extra/devprop.bin ]; then
    xnu_devprop_load /Extra/devprop.bin
    fi
    if [ -f /Extra/splash.jpg ]; then
    insmod jpeg
    xnu_splash /Extra/splash.jpg
    fi
    if [ -f /Extra/splash.png ]; then
    insmod png
    xnu_splash /Extra/splash.png
    fi
    if [ -f /Extra/splash.tga ]; then
    insmod tga
    xnu_splash /Extra/splash.tga
    fi
    fi
    }


    I have added an entry to my 40_custom file to try and boot, so far without success:

    menuentry "MacOS X Tiger" {
    insmod hfsplus
    set root='(hd0,3)'
    makeactive
    chainloader --force +1
    }

    which gives an "HFS+ Partition error" message

    I have spent several hours on this without success. I can boot my partition using a "super grub boot disk" by just selecting "boot partition" and pointing it at "Tiger".

    I have the feeling the this might a very simple problem to solve, would anybody be kind enough to suggest a solution, or translate the old entry into Grub2 correctly for me please?

    If I could just boot this partition with Grub2, I would be happy to continue learning how to use lucid properly , and figure out my Leopard partition in due course.

    #2
    Re: another grub2 issue

    Originally posted by jonthomas
    The grub-legacy entry to boot this partition was very simple:

    title chainload Mac OSX no_efi
    root (hd0,2)
    makeactive
    chainloader --force +1

    I have added an entry to my 40_custom file to try and boot, so far without success:

    menuentry "MacOS X Tiger" {
    insmod hfsplus
    set root='(hd0,3)'
    makeactive
    chainloader --force +1
    }

    which gives an "HFS+ Partition error" message
    Change your 40_custom to reflect:
    menuentry "MacOS X Tiger" {
    insmod hfsplus
    set root='(hd0,2)'
    makeactive
    chainloader --force +1
    }
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: another grub2 issue

      Thanks for your quick reply snowhog.

      I have tried your suggestion, unfortunately it still won't boot. I just get a blinking cursor when I use (hd0,2) as you suggest.

      I had noticed the the (hd0,3) reference in Grub2 as compared to the (hd0,2) used in the grub-legacy version (that works); but I thought it was due to the different partition numbering system in grub2 (1 higher than in grub-legacy I think).
      I got this info from the "ones and zeros" section of this post:
      http://kubuntuforums.net/forums/inde...opic=3110850.0

      I didnt mention it in my original post as it was long enough already, but I think there is also another bootloader (darwin) involved -maybe that is causing problems, but i dont see why.

      Specifically, when I successfully boot the "Tiger" partition it first asks me which partition I want to boot, listing all the NTFS and HFS+ partitions on the drive it can see. Unfortunately the default is set to an "XP Pro" partition. Not very elegant I know, but I have never managed to find a way to change the default, and I did try.

      Seriously, thanks for trying to help me though...I appreciate it

      Comment


        #4
        Re: another grub2 issue

        Originally posted by jonthomas
        Thanks for your quick reply snowhog.

        I have tried your suggestion, unfortunately it still won't boot. I just get a blinking cursor when I use (hd0,3) as you suggest.
        My post said to change that to (hd0,2).
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: another grub2 issue

          Apologies Snowhog, that was a typo...oops

          I meant (hd0,2), that gives me a blinking cursor. (hd0,3) gives me the "HFS+ Partition error"

          I have altered my last reply to correct the typo, hopefully it will now make more sense to anyone reading it.

          Comment


            #6
            Re: another grub2 issue

            I'm at work, not at home on my laptop, so....

            There is a difference in the way Grub Legacy and Grub 2 enumerate drives and partitions. I'll look myself when I get home - I have notes/links to goodies - and find what needs to be known on this.

            You need to reference the partition that your Mac OSX is installed on 'using Grub 2 enumeration syntax.'
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: another grub2 issue

              yes, thats what i was trying to say. Specifically that grub-legacy numbers partitions starting from 0 and grub2 starting from 1. So in my case my "Tiger" partition is (hd0,2) in grub-legacy and (hd0,3) in grub2.

              I have made some progress...

              I found out that the "makeactive" comand has been replaced in grub2 by parttool.

              So my 40_custom entry now reads:

              menuentry "MacOS X Tiger" {
              insmod hfsplus
              set root='(hd0,3)'
              parttool (hd0,3) boot+
              chainloader --force +1
              }


              still getting the "HFS+ Partition error" though...

              thanks again.

              Comment


                #8
                Re: another grub2 issue

                I think that the problem is in the syntax of the 40_custom entry, specifically, the set root= line. You have (hd0,3) in single quotes. I don't think those quotes are supposed to be there.

                See GRUB2 as the only boot loader: it's possible! from the InsanelyMac web sight.
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  Re: another grub2 issue

                  While written for Grub Legacy, see also Installing the bootloader where it says:
                  If you have an "HFS+ partition error", copy all the files from /usr/standalone/i386 of the Darwin CD to a partition in NTFS, FAT or ext but not hfs on your hard disk, and put this in menu.lst :

                  title OSX_X86
                  rootnoverify (hd0,2) <- replace hd0,2 by the partition where you have copied chainloader files.
                  makeactive
                  chainloader /chain0
                  It might be helpful in at least directing you in the right direction.
                  Windows no longer obstructs my view.
                  Using Kubuntu Linux since March 23, 2007.
                  "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                  Comment


                    #10
                    Re: another grub2 issue

                    I've done it both with and without the quotes and it seems to make no difference.

                    On my system, the 9.10 grub-pc version (1.96) didn't have the quotes, but the 10.04 version (1.98) did have the quotes.

                    I'm currently booting with the 1.98 version but my hand-made grub.cfg does not have the quotes. This is the basis for my conclusion.

                    Please Read Me

                    Comment


                      #11
                      Re: another grub2 issue

                      I found this on Ubuntu forums

                      Try these stanzas:

                      menuentry "MacOS X, tiger" {
                      insmod hfsplus
                      set root=(hd0,3)
                      multiboot /boot
                      }

                      Or if you have several renamed boot files in OS X's partition root you try this:

                      menuentry "MacOS X, tiger" {
                      insmod hfsplus
                      search --file --set=root /tiger.rc3.boot
                      multiboot /tiger.rc3.boot
                      }

                      edit to fit your boot file and version

                      Please Read Me

                      Comment


                        #12
                        Re: another grub2 issue

                        many thanks guys. It will take me a day, perhaps two, to work through those references & suggestions -some of them look quite interesting.

                        now im off for some exercise (cycling) -trying for a balance of mind and body 8)

                        Comment


                          #13
                          Re: another grub2 issue

                          good news, I booted my Tiger partition. woohoo

                          I tried all the code suggested here without success. Then I used your grub-legacy reference from Snowhog(Installing the bootloader), translated it into grub2 as best I could, a bit of random tweaking & It booted.

                          For anyone else in the same situation I'll lay out the steps I took to get it to boot:

                          heres my partition layout:

                          (hd0,1) NTFS Win XP Pro
                          (hd0,2) NTFS Data Storage
                          (hd0,3) OS X Tiger (no EFI)
                          (hd0,4) Kubuntu Lucid


                          1) I downloaded the Darwin bootloader CD .iso from apple, its free:
                          http://www.opensource.apple.com/darw...x86-801.iso.gz
                          My reference said that you have to enter your apple ID to download, I have one but wasnt asked for it.

                          2) I used Winrar to extract the files from the downloaded archive listed above.

                          3) I copied the files from /usr/standalone/i386/ (just a few hundred k) to the root of my NTFS data partition (hd0,2)

                          4) I edited my 40_custom file (sudo nano /etc/grub.d/40_custom) by adding the following entry:

                          menuentry "MacOS X Tiger" {
                          insmod hfsplus
                          set root=(hd0,2) #<- this is where I copied the darwin files
                          parttool (hd0,3) boot+ #<- this sets my Tiger partition to Active
                          chainloader /chain0 #<- this boots it using those (Darwin) files
                          }


                          5) I updated Grub2 to incude the new entry (sudo update-grub)

                          et voila - bob's your uncle

                          Note:that I wiped my Leopard partition for now (I have a backup), but the Darwin bootloader lists all the NTFS or HFS+ partitions it finds & asks which you would like to boot.

                          Many thanks guys, we cracked it. Now I can go back to my usual state of moderate confusion & learn Lucid whilst I iron out the few small bugs in my install(s)

                          Comment


                            #14
                            Re: another grub2 issue

                            Very good. I know how it feels when you figure it out.
                            Windows no longer obstructs my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment

                            Working...
                            X