Page 19 of 92 FirstFirst ... 917181920212969 ... LastLast
Results 181 to 190 of 917

Thread: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

  1. #181
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    Quote Originally Posted by DanielBuus View Post
    Question... This doesn't look valid either way. We're talking MBR, i.e. maximum four primary partitions sda1-4 OR three primary partitions (sda1-3) and an extended partitions (sda4) containing the remaining number of logical partitions (sda5...).
    I got the impression that the disk was a hybrid MBR disk -- in other words, a GPT disk with a hacked MBR to enable Windows to boot from it. Linux doesn't require a hybrid MBR (it reads the GPT side just like OS X does), but many Linux installation procedures for Macs create hybrid MBRs anyhow, apparently to get the Mac's BIOS emulation mode to start up. This is confusing and dangerous, but its common.

    In any event, if it's a hybrid MBR, then those are perfectly valid GPT partitions, but only three of them will be copied over into the MBR. (One MBR entry will be a type-0xEE partition to identify the disk as a GPT disk.)

    That is, you can't have a partition containing an FS on sda4 if you also have sda5, as sda4 would then have to be the extended area containing the remaining logical partitions.
    Even in a pure MBR setup, this isn't quite right. Any of the four primary partitions can be an extended partition, not just the fourth one. It's a bit less confusing if the extended partition is the fourth primary and if it (and therefore the logical partitions it contains) occupies the end of the disk, but neither of these is an actual requirement.

    One other comment, since I began by describing hybrid MBRs: Hybrid MBRs should not contain extended or logical partitions. Although it's theoretically possible to create a layout like that, it would be an absolute nightmare to maintain. Fortunately, I don't know of any program that makes the attempt.
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

  2. #182
    Join Date
    Nov 2005
    Location
    Mountain View, CA, USA
    Beans
    261
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    Well the table you quoted me is the table that I found to not work.

    Second, I have been successfully using 6 partitions in both Mac and Linux so your comment about correctness, perhaps true, doesn't seem to matter.

    Thrid, I wasn't able to install an extended partition (which is what I would obviously perfer). Were you?

    Finally its important to note that this process builds a hybrid MBR--I do not know what is "acceptable" for hybrid MBR, but I am certain that it deviates from the conventions of a typical MBR.

  3. #183
    Join Date
    Nov 2005
    Location
    Mountain View, CA, USA
    Beans
    261
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    @srs5694 Thank you for helping us figure things out on the Mac. I spent quite a bit of time on your site and you are doing a great service to the community.

    I wonder if you might help me figure out an alternative to having to wipe everything upon a bad install (ie I've been doing Internet recovery after every gptsync problem--this is slowing my ability to try different configurations). Here is what happens, as best I can account.

    I use Mac "disk utility" to partition the drive into two partitions, one HFS+ and one MSDOS.

    I shutdown, resync (fromm refit), shutdown, and boot into Oneiric LiveCD (using USB).

    I use gparted and delete the MSDOS partition and carve out:
    Code:
    Loc MiB    FS         Label
    4   16384  ext4       "root"
    5    4352  linux-swap "swap"
    6   56009  ext4       "home"

    I prefer to have swap in the middle so that I could, theoretically, reassign it to either root or home as needed.

    I install Oneiric, setting the MBR to sda4. Upon shutdown, refit, shutdown, boot, I check refit again, this time it gives:
    Analysis inconclusive, not touching disk.
    Error: Not found ... from gptysync.efi.
    At this point choosing Mac still boots but choosing Linux hangs at the Tux screen.

    Now running Disk Utility from either the Internet recovery or Mac (which still boots fine) shows the EFI partition (which obviously should be hidden).

    My question: what could oneiric install be doing that natty install didn't? (I know this is a big question to ask, but I'm hoping nonetheless that your experience yields some insight.)

    Second question: what can I do when gptsync status is "inconclusive"? I played with your fixpart and gdisk but I didn't know what I should choose. (I have a moderate amount of nix experience but this whole EFI/Hybrid business is still relatively new to me. Point being--brevity is okay!

    Third question: I have found that oneiric sorts the logical ordering. So life is easier (when using the oneiric install) to simply partition the soon-to-be-MBR partition to be physically located as the fourth partition. A nice feature to add to gdisk might be the ability to specify a particular order (fdisk doesn't have this either I think). I could not find *ANY* tool to do this. (Note: talking about logical order not physical order.) This issue seems surprising to me as you can create partitions out-of-order (in gparted for example) and you can sort in fdisk (gdisk too right?) but you cannot, say, "undo" a sort.

    Cheers
    Last edited by dfacto; September 3rd, 2011 at 03:58 PM. Reason: More details

  4. #184
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    Quote Originally Posted by dfacto View Post
    Thrid, I wasn't able to install an extended partition (which is what I would obviously perfer). Were you?
    As noted in my earlier post, using an extended partition on a hybrid MBR would be a nightmare. Do not attempt it. Period.

    Finally its important to note that this process builds a hybrid MBR--I do not know what is "acceptable" for hybrid MBR, but I am certain that it deviates from the conventions of a typical MBR.
    Technically, a hybrid MBR is illegal -- it violates the GPT specification, and is therefore inherently "unacceptable." As a practical matter, though, hybrid MBRs exist and must be dealt with, warts and all.

    I use Mac "disk utility" to partition the drive into two partitions, one HFS+ and one MSDOS.
    Whenever you use Disk Utility to create a GPT layout with any FAT partitions, it converts the disk to a hybrid MBR form. Most people don't realize this.

    I shutdown, resync (fromm refit), shutdown, and boot into Oneiric LiveCD (using USB).
    The gptsync program (or the rEFIt "resync" option, or whatever it's called) creates a hybrid MBR. In this case, it probably has no real effect, although it might create a slightly different hybrid MBR than what Disk Utility originally created.

    Ii use gparted and delete the MSDOS partition and carve out:
    4 ext4 "root"
    5 swap
    6 ext4 "home"
    Ordinarily, GParted replaces a hybrid MBR with a protective MBR, which is a standard part of a GPT disk. Thus, GParted turns the (illegal) hybrid MBR into a (legal) GPT disk.

    I install Oneiric, setting the MBR to sda4. Upon shutdown, refit, shutdown, boot, I check refit again, this time it gives:
    Analysis inconclusive, not touching disk.
    Error: Not found ... from gptysync.efi.
    I'm not sure what you mean by "setting the MBR to sda4"; interpreted literally, that makes no sense, because the MBR is sector 0 of the disk, and no partition can contain it, in either the MBR or the GPT schemes. I suspect you mean that you install GRUB to /dev/sda4.

    I'm not sure why gptsync is giving you the error. One possibility is that it's confused by GRUB being in /dev/sda4, but that's just a guess.

    It's also possible that there's been a recent change to libparted (upon which both GParted and the Ubuntu installer's partitioning tool are based) that's causing gptsync to be confused. One specific possibility for such a change is a new Linux-specific partition type code, which is in the pipeline for inclusion in libparted. I haven't checked its status, though, and I don't know if it's in the Oneiric alpha or beta or whatever the current version is. You can test this by installing the latest version of GPT fdisk (gdisk), version 0.7.2, and viewing the partition table. If the "Code" for the Linux partitions is "8300", then the Oneiric installer is using this new type code. (Older versions of gdisk will show a code of "FFFF" for this new partition type.) If the type code is "0700", then it's using the old code, and this hypothesis is incorrect. If this hypothesis is correct, then you can either work around it by changing the type code of the Linux partitions to 0700 or by using gdisk itself to create a hybrid MBR. Better yet, you can find a way to get Linux installed and booting that does not involve a hybrid MBR. One possibility is to boot Linux in EFI mode, as described here. Another would be to get the Mac's BIOS emulation active even when there's no hybrid MBR, but I'm not sure how possible that would be.

    Now running Disk Utility from either the Internet recovery or Mac (which still boots fine) shows the EFI partition which should be hidden.
    I'm not sure why that would be, unless the Ubuntu installer is changing its type code. Again, the output of gdisk might provide an answer. The EFI System Partition should have a type code of EF00. If it's something else, changing it back to EF00 should do the trick.

    Second question: what can I do when gptsync status is "inconclusive"? I played with your fixpart and gdisk but I didn't know what I should choose. (I have a moderate amount of nix experience but this whole EFI/Hybrid business is still relatively new to me. Point being--brevity is okay!
    My hybrid MBR page describes how to create hybrid MBRs in gdisk. FixParts is useless on GPT disks (including hybrid MBR disks), and in fact it should terminate immediately when launched on one.
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

  5. #185
    Join Date
    Nov 2005
    Location
    Mountain View, CA, USA
    Beans
    261
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    Thanks srs5694, I believe I have a properly configured hybrid MBR.

    Here are the steps I took to repair the hybrid MBR (hMBR). It seems the new libparted (oneiric) does something to the hMBR that gptsync (e.g., from refit) does not know how to repair. This should solve the refit (permanent) hang after choosing the Linux partition.

    The following procedure will rebuild the hybrid MBR so gptsync (in refit or otherwise) doesn't complain. Everything that follows was done from a Mac OS terminal. You could just as easily do steps 1-8 from the USB Live session; you need to use /dev/sda or the appropriate device instead of /dev/disk0.
    1. Install gdisk and thank srs5694 for this gem!
    2. Run gdisk. We intend to manually create a new hybrid MBR.
      Code:
      sudo gdisk /dev/disk0
    3. Choose 'r' to repair and 'o' and 'p' to see current setup. Later you will need to refer to the current set-up.
    4. Choose 'h' to build a new hybrid MBR.
    5. For my set-up, I chose partitions "2 3 4" which correspond to "Mac OS", "Recovery HD", and "Linux-Root," respectively. Linux-Root should be the partition that contains the grub boot data. Also, if you are not on Mac OS X Lion, you won't(?) have the "Recovery HD" partition.
    6. Accept the default/recommended placement of EFI. This will add another partition to the selected three; hMBR has a maximum of four.
    7. For all but the Linux-Root, accept the defaults and always choose 'N' for not boot. For Linux-Root (the fourth for me), choose "83" (fs-type: Linux) and 'Y' to boot. (*)
    8. Choose 'o' to verify and 'w' to write.
    9. To fix the 30sec hang at tux (not a necessary step in repairing hybrid MBR):
      Code:
      sudo bless --device /dev/disk0s4 --setBoot --legacy --verbose
      where disk0s4 is my Linux partition (yours may differ).


    Relevant documentation:
    Hybrid MBR
    Partition Types

    (*) - If you accept the default "07" then running gptsync (e.g., from refit) will prompt for a table update and then just change it to "83".

    Also, the filesystem for the "Recovery HD" partition (650mb) will be unknown after a clean install (at least for the Macbook Air 4). You must go BACK into the recovery system one more time then the drive will be formatted and loaded with the recovery system.

    Options used in gdisk:

    Code:
    r	recovery and transformation options (experts only)
    o	print protective MBR data
    p	print the partition table
    h	make hybrid MBR
    w	write table to disk and exit
    Options not used but good to know:
    Code:
    ?	print [help] menu
    q	quit without saving changes
    Last edited by dfacto; September 26th, 2011 at 02:00 PM.

  6. #186
    Join Date
    Nov 2005
    Location
    Mountain View, CA, USA
    Beans
    261
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    Also if anyone is interested, here is my partition table information. Note your values will most likely be different; this is for comparison purposes only.

    Here is my GPT:
    Code:
    Number  Start (sector)    End (sector)  Size       Code  Name
       1              40          409639   200.0 MiB   EF00  EFI System Partition
       2          409640        78534639   37.3 GiB    AF00  Mac OS
       3        78534640        79804175   619.9 MiB   AB00  Recovery HD
       4        79804416       113358847   16.0 GiB    0700  
       5       113358848       122271743   4.2 GiB     8200  
       6       122271744       236976127   54.7 GiB    0700
    where 4,5,6 are root, swap, and home (resp.).

    Problematic hybrid MBR after oneiric grub-install. I have no idea why grub-install did this or how to stop it from happening.
    Code:
    Number  Boot  Start Sector   End Sector   Status      Code
       1                     1           39   primary     0xEE
       2                    40       409639   primary     0x0B
       3      *         409640     78534639   primary     0xAF
       4              78534640     79804175   primary     0xAF
    Updated hybrid MBR after using gdisk. This should be the same as if using gptsync (ie from refit).
    Code:
    Number  Boot  Start Sector   End Sector   Status      Code
       1                     1       409639   primary     0xEE
       2                409640     78534639   primary     0xAF
       3              78534640     79804175   primary     0xAB
       4      *       79804416    113358847   primary     0x83
    Last edited by dfacto; September 3rd, 2011 at 09:07 PM.

  7. #187
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    I'm glad you got your system sorted out. I have a couple of observations, just to help fill in some gaps....

    Quote Originally Posted by dfacto View Post
    Also if anyone is interested, here is my partition table information. Note your values will most likely be different; this is for comparison purposes only.

    Here is my GPT:
    Code:
    Number  Start (sector)    End (sector)  Size       Code  Name
       1              40          409639   200.0 MiB   EF00  EFI System Partition
       2          409640        78534639   37.3 GiB    AF00  Mac OS
       3        78534640        79804175   619.9 MiB   AB00  Recovery HD
       4        79804416       113358847   16.0 GiB    0700  
       5       113358848       122271743   4.2 GiB     8200  
       6       122271744       236976127   54.7 GiB    0700
    where 4,5,6 are root, swap, and home (resp.).
    One unusual thing I note here is your partition #3. This has a type code of AB00 ("Apple boot"). I'm guessing this is a recovery partition of some sort, possibly taking the place of a physical installation disc. This is the first time I've heard of this partition type "in the wild," although it's been documented on the Wikipedia page on GPT and on Apple's Tech Note 2166 for quite some time. (It's GUID 426F6F74-0000-11AA-AA11-00306543ECAC, FWIW.) It's possible that gptsync just didn't recognize it; gptsync tends to refuse to touch a disk that holds partition types it doesn't understand.

    One thing I note is that you've got no BIOS Boot Partition, which GRUB (in its BIOS version) uses on GPT disks to improve reliability. It's possible that the lack of this partition is part of the reason for your problems. It's also possible that your problems will return after a kernel or GRUB update if this is the case. If so, you can either install an EFI version of GRUB or some other boot loader (which is likely to be an adventure) or shrink one of your partitions by ~1 MiB and create a BIOS Boot Partition (which may require creating another fresh hybrid MBR).

    Problematic hybrid MBR after oneiric grub-install. I have no idea why grub-install did this or how to stop it from happening.
    Code:
    Number  Boot  Start Sector   End Sector   Status      Code
       1                     1           39   primary     0xEE
       2                    40       409639   primary     0x0B
       3      *         409640     78534639   primary     0xAF
       4              78534640     79804175   primary     0xAF
    In theory, this should work -- as I said, Linux does not refer to the MBR side of a hybrid MBR. Its main purpose on a Linux/OS X dual-boot is to kick the Mac's firmware into BIOS emulation mode, enabling use of the BIOS version of GRUB (in the Ubuntu grub-pc package). That said, the MBR's partition #2 matches the EFI System Partition (ESP), and so would more properly be of type 0xEF. The partition #4's type code is debatable -- it's probably got HFS+, which makes 0xAF correct, but the MBR code 0xAB (which gdisk generated for this partition) is "Darwin boot," but I'm not sure if that's really an equivalent type. (It sounded similar, which is why I assigned the equivalency when I wrote gdisk, but that was just a guess on my part.)

    Updated hybrid MBR after using gdisk. This should be the same as if using gptsync (ie from refit).
    Code:
    Number  Boot  Start Sector   End Sector   Status      Code
       1                     1       409639   primary     0xEE
       2                409640     78534639   primary     0xAF
       3              78534640     79804175   primary     0xAB
       4      *       79804416    113358847   primary     0x83
    If it works, you might as well stick with it. You might also want to back up your GPT data using the "b" option on gdisk's main menu. This will create a binary file containing all the GPT data structures, including the MBR. You can easily restore it using the "L" option on the recovery & transformation menu. Of course, you should store your backup on a USB flash drive, CD-R, or some other disk other than the one you're backing up!
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

  8. #188
    Join Date
    Nov 2005
    Location
    Mountain View, CA, USA
    Beans
    261
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    Thanks again srs5694.

    What I find the most interesting is that things "just worked" for the old libparted. I suspect there will be many upset people in the not-too-distant-future. In any event, gdisk is exceedingly easy to use and the fix is just a matter of accepting some defaults.

    Indeed it is a recovery partition. Lion install carves it out of whatever partition you plop lion in. After booting into Internet recovery on an originally blank drive and installing Lion results in the partition having fs type "unknown" (as per gparted). Booting into Internet recovery a second time results in the fs you saw as well as one directory containing a dozen or so files (one of which is boot.efi another is a large-ish .dmg).

    Oh, and now after understanding more about the hMBR and GPT I see why renumbering partitions really is unnecessary. Its a pity that the refit documentation doesn't refer people to gdisk when gptsync falls short. In fact, gdisk should ship with refit if you ask me.

    Cheers
    Last edited by dfacto; September 4th, 2011 at 06:02 PM.

  9. #189
    Join Date
    Sep 2011
    Beans
    1

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    i've been following this thread waiting for the intel xorg driver fix, and although i'm running a different operating system (openbsd) next to mac os x on my 11" air, i thought i'd mention that it is possible to still use refit if you have encrypted your mac partition with filevault.

    although openbsd (and probably linux) boot fine by just holding down option at boot and selecting the bootcamp partition, with refit, the ssd shows up as a SCSI disk instead of emulated IDE, so i wanted to continue using it.

    when encrypting an hfs partition with filevault, it turns it into a corestorage partition and changes the boot process, disabling refit. to re-enable refit, manually mount the recovery partition (probably /dev/disk0s3) in os x with "mkdir /Volumes/recovery; mount -t hfs /dev/disk0s3 /Volumes/recovery". once mounted, copy your old /efi/{refit,tools} directories from / into /Volumes/recovery/efi/, then run the ./enable-always.sh script from /Volumes/recovery/efi/refit.

    on the next reboot, refit will only show the mac recovery partition and linux (openbsd in my case) partition, though selecting the recovery partition will boot the normal (now encrypted) mac partition, not recovery. recovery is still available through command+r before refit boots (i hope).

    it's also worth noting that after enabling filevault, it wiped out my hybrid MBR and just created one big protective MBR, so openbsd no longer booted through refit. i had to boot into mac os and use gdisk to create a new hybrid MBR with my openbsd partition. my layout now looks like:

    Code:
    jcs@air:~> sudo gdisk /dev/disk0
    GPT fdisk (gdisk) version 0.7.2
    
    Partition table scan:
      MBR: hybrid
      BSD: not present
      APM: not present
      GPT: present
    
    Found valid GPT with hybrid MBR; using GPT.
    
    Command (? for help): p
    Disk /dev/disk0: 236978176 sectors, 113.0 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): B5B2EB0B-58F4-43EF-8422-2AE142433801
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 236978142
    Partitions will be aligned on 8-sector boundaries
    Total free space is 2317 sectors (1.1 MiB)
    
    Number  Start (sector)    End (sector)  Size       Code  Name
       1              40          409639   200.0 MiB   EF00  EFI System Partition
       2          409640       156659639   74.5 GiB    FFFF  mac
       3       156659640       157929175   619.9 MiB   AB00  Recovery HD
       4       157929472       236976127   37.7 GiB    FFFF  OpenBSD
    
    Command (? for help): x
    
    Expert command (? for help): o
    
    Disk size is 236978176 sectors (113.0 GiB)
    MBR disk identifier: 0x00000000
    MBR partitions:
    
    Number  Boot  Start Sector   End Sector   Status      Code
       1                     1       409639   primary     0xEE
       2                409640    156659639   primary     0xFF
       3             156659640    157929175   primary     0xAB
       4      *      157929472    236976127   primary     0xA6
    
    Expert command (? for help):

  10. #190
    Join Date
    Sep 2011
    Beans
    8

    Re: MacBookAir4,1 & MacBookAir4,2 (MBA 2011) support

    Was looking for a fix ...

    Can someone tell me what this means ? Totally new to linux. How can I apply that temporary fix on my ubuntu ?

    https://bugs.freedesktop.org/show_bug.cgi?id=39533

    freedesktop 2011-09-03 00:06:10 PDT Created an attachment (id=50855) [details] script to make the fbdev experience slightly more tolerable The attached script is the result of sitting down for a little while with a new MacBook Air and the Intel HD3000 manual. It doesn't produce real 1440x900 but it does fix the aspect ratio, the blurriness, and the full-intensity backlight. At this point I'm convinced that the mode-setting trouble in the existing Intel driver is simple sloppiness, not something subtle. Doing the Right Thing might take effort, but making a workaround for MacBook Air users should be a tiny patch. A few days from now I'll have time to look at what the driver is doing.

Page 19 of 92 FirstFirst ... 917181920212969 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •