Menu

#97 After Ubuntu install fail, external disks gone from rEFIt

open
nobody
None
5
2014-08-25
2011-11-14
Andreas M.
No

Hi,

this is about two different problems, that arose, after an unsuccessful Ubuntu 11.10 install.

The machine this is happening on is a 2006 white MacBook 1,1, 32bit. The disk I installed is an internal 500GB, which was partitioned so, that I could triple boot WinXP, Linux and OS X. Therefore the disk was already having a hybrid MBR and rEFIt was installed. It worked without any trouble for all the time I had it like this, upon boot th rEFIt menu would mostly show up (not always) and include any external disk, that I had attached. It would also show all the paritions on the internal disk along with the right fs types.

Now things have changed. No externally attached disks show up in the rEFIt menu. This is the first thing, that bothers me. The second one is, that after the Ubuntu isntall failed, I do not get the Ubuntu partition visible neither in OS X, not in the rEFIt menu. Here is what happened:

Upon the end of the Ubuntu install, the installer errored out noticing, that it failed to install GRUB. I would have the choice to install to another partition or do so later manually. Not wanting to install to another partition I chose the latter.

When I booted next time, rEFIt would neither show the partition, that had Ubuntu on it, nor any external USB disks. Also, the Linux disk would not show up on the Mac OS X desktop, as it did before.

Here is rEFIt's output:

*** Report for internal hard disk ***

Current GPT partition table:
# Start LBA End LBA Type
1 40 409639 EFI System (FAT)
2 409640 35565888 Basic Data
3 35565889 37519013 Linux Swap
4 37519014 350019006 Basic Data
5 350019007 976510990 Mac OS X HFS+

Current MBR partition table:
# A Start LBA End LBA Type
1 1 39 ee EFI Protective
2 40 409639 0b FAT32 (CHS)
3 * 409640 35565888 ef EFI System (FAT)
4 35565889 37519013 82 Linux swap / Solaris

MBR contents:
Boot Code: Unknown, but bootable

Partition at LBA 40:
Boot Code: None (Non-system disk message)
File System: FAT32
Listed in GPT as partition 1, type EFI System (FAT)
Listed in MBR as partition 2, type 0b FAT32 (CHS)

Partition at LBA 409640:
Boot Code: None
File System: btrfs
Listed in GPT as partition 2, type Basic Data
Listed in MBR as partition 3, type ef EFI System (FAT), active

Partition at LBA 35565889:
Boot Code: None
File System: Unknown
Listed in GPT as partition 3, type Linux Swap
Listed in MBR as partition 4, type 82 Linux swap / Solaris

Partition at LBA 37519014:
Boot Code: Unknown, but bootable
File System: NTFS
Listed in GPT as partition 4, type Basic Data

Partition at LBA 350019007:
Boot Code: None
File System: HFS Extended (HFS+)
Listed in GPT as partition 5, type Mac OS X HFS+

Here is 'sudo fdisk /dev/rdisk0'

Disk: /dev/rdisk0 geometry: 60801/255/63 [976773168 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - 39] <Unknown ID>
2: 0B 1023 254 63 - 1023 254 63 [ 40 - 409600] Win95 FAT-32
*3: EF 1023 254 63 - 1023 254 63 [ 409640 - 35156249] <Unknown ID>
4: 82 1023 254 63 - 1023 254 63 [ 35565889 - 1953125] Linux swap

Here is 'diskutil list'
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Microsoft Basic Data 18.0 GB disk0s2
3: Linux Swap 1000.0 MB disk0s3
4: Microsoft Basic Data Windows XP 160.0 GB disk0s4
5: Apple_HFS Mac OS X 320.8 GB disk0s5

Here is gdisk's partition print:

Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 35565888 16.8 GiB 0700 Linux
3 35565889 37519013 953.7 MiB 8200 LINUXSWAP
4 37519014 350019006 149.0 GiB 0700 Windows XP
5 350019007 976510990 298.7 GiB AF00 Mac OS X

And last, the 'info' output per partition of 'diskutil'.

coca:~ sfamix$ diskutil info /dev/rdisk0
Device Identifier: disk0
Device Node: /dev/disk0
Part Of Whole: disk0
Device / Media Name: Hitachi HTS545050B9A300 Media

Volume Name:
Escaped with Unicode:

Mounted: No

File System: None

Partition Type: GUID_partition_scheme
Bootable: Not bootable
Media Type: Generic
Protocol: SATA
SMART Status: Verified

Total Size: 500.1 GB (500107862016 Bytes) (exactly 976773168 512-Byte-Blocks)
Volume Free Space: Not Applicable

Read-Only Media: No
Read-Only Volume: Not applicable (no filesystem)
Ejectable: No

Whole: Yes
Internal: Yes
OS 9 Drivers: No
Low Level Format: Not Supported

coca:~ sfamix$ diskutil info /dev/rdisk0s1
Device Identifier: disk0s1
Device Node: /dev/disk0s1
Part Of Whole: disk0
Device / Media Name: EFI System Partition

Volume Name:
Escaped with Unicode:

Mounted: No

File System: None

Partition Type: EFI
Bootable: Not bootable
Media Type: Generic
Protocol: SATA
SMART Status: Verified

Total Size: 209.7 MB (209715200 Bytes) (exactly 409600 512-Byte-Blocks)
Volume Free Space: Not Applicable

Read-Only Media: No
Read-Only Volume: Not applicable (no filesystem)
Ejectable: No

Whole: No
Internal: Yes

coca:~ sfamix$ diskutil info /dev/rdisk0s2
Device Identifier: disk0s2
Device Node: /dev/disk0s2
Part Of Whole: disk0
Device / Media Name: Linux

Volume Name:
Escaped with Unicode:

Mounted: No

File System: MS-DOS
Type: msdos
Name: MS-DOS (FAT)

Partition Type: Microsoft Basic Data
Bootable: Not bootable
Media Type: Generic
Protocol: SATA
SMART Status: Verified

Total Size: 18.0 GB (17999999488 Bytes) (exactly 35156249 512-Byte-Blocks)
Volume Free Space: 0 B (0 Bytes) (exactly 0 512-Byte-Blocks)

Read-Only Media: No
Read-Only Volume: Not applicable (not mounted)
Ejectable: No

Whole: No
Internal: Yes

coca:~ sfamix$ diskutil info /dev/disk0s3
Device Identifier: disk0s3
Device Node: /dev/disk0s3
Part Of Whole: disk0
Device / Media Name: LINUXSWAP

Volume Name:
Escaped with Unicode:

Mounted: No

File System: None

Partition Type: Linux Swap
Bootable: Not bootable
Media Type: Generic
Protocol: SATA
SMART Status: Verified

Total Size: 1000.0 MB (1000000000 Bytes) (exactly 1953125 512-Byte-Blocks)
Volume Free Space: Not Applicable

Read-Only Media: No
Read-Only Volume: Not applicable (no filesystem)
Ejectable: No

Whole: No
Internal: Yes

coca:~ sfamix$ diskutil info /dev/disk0s4
Device Identifier: disk0s4
Device Node: /dev/disk0s4
Part Of Whole: disk0
Device / Media Name: Windows XP

Volume Name: Windows XP
Escaped with Unicode: Windows%FF%FE%20%00XP

Mounted: Yes
Mount Point: /Volumes/Windows XP
Escaped with Unicode: /Volumes/Windows%FF%FE%20%00XP

File System: UFSD_NTFS_COMPR
Type: ufsd_NTFS
Name: Windows NT Filesystem (compressed)

Partition Type: Microsoft Basic Data
Bootable: Not bootable
Media Type: Generic
Protocol: SATA
SMART Status: Verified

Total Size: 160.0 GB (159999996416 Bytes) (exactly 312499993 512-Byte-Blocks)
Volume Free Space: 143.7 GB (143691321344 Bytes) (exactly 280647112 512-Byte-Blocks)

Read-Only Media: No
Read-Only Volume: No
Ejectable: No

Whole: No
Internal: Yes

coca:~ sfmix$ diskutil info /dev/disk0s5
Device Identifier: disk0s5
Device Node: /dev/disk0s5
Part Of Whole: disk0
Device / Media Name: Mac OS X

Volume Name: Mac OS X
Escaped with Unicode: Mac%FF%FE%20%00OS%FF%FE%20%00X

Mounted: Yes
Mount Point: /
Escaped with Unicode: /

File System: Journaled HFS+
Type: hfs
Name: Mac OS Extended (Journaled)
Journal: Journal size 24576 KB at offset 0x958000
Owners: Enabled

Partition Type: Apple_HFS
Bootable: Not bootable
Media Type: Generic
Protocol: SATA
SMART Status: Verified
Volume UUID: C96DD885-036E-3A82-A189-DA4A5C5119C1

Total Size: 320.8 GB (320763895808 Bytes) (exactly 626491984 512-Byte-Blocks)
Volume Free Space: 19.0 GB (18969161728 Bytes) (exactly 37049144 512-Byte-Blocks)

Read-Only Media: No
Read-Only Volume: No
Ejectable: No

Whole: No
Internal: Yes

So, basically I am left with a functioning Mac OS X install, that just boots fine from the rEFIt menu. No problems. Just the Linux parition does not show up, neither in rEFIt, not on the OS X desktop (it used to do so before, alas, it was NTFS formatted, now it is btrfs). However, no externally attached disks show up in the rEFIt menu and the Parition Inspector in the rEFIt menu errors out with

"Error: Not Found returned from gptsync.efi", just as the person had in http://sourceforge.net/tracker/?func=detail&aid=3433023&group_id=161917&atid=821765

Discussion

  • Andreas M.

    Andreas M. - 2011-11-14

    I forgot to add, that prior to the failed Ubuntu install I only had OS X installed, the paritions for Linux and WinXP were empty.

     
  • joevt

    joevt - 2011-11-17

    1) Unless there's something on the EFI partition that you want Windows to see, it should not be listed in the MBR. Instead, the EFI Protective partition should cover the EFI partition, (start at block 1 and end at block 409639).

    2) The partition type on the Linux partition in the MBR seems wrong. Try 83 for Linux native partition instead of EF.

    3) I think the Linux Swap partition doesn't need to be in the MBR since Linux will see it in the GPT. If you remove the swap partition from the MBR, make sure Linux is still using it properly.

    4) The Windows partition should be in the MBR. I think Windows XP requires that it be the last partition in the MBR (It doesn't need to be physically last on the disk, just last in the MBR. The MBR does not need to be sorted by partition location).

    Check your refit.conf file to make sure it doesn't have any of the "disable" options specified. There is an option to disable booting of external disks.

    If you want to boot into Windows directly, make sure the MBR contains standard boot code that boots the partition with the active partition flag set in the MBR. The Windows MBR boot code will do that. Same for the MBR boot code that rEFIt installs if there is no boot code. When you use rEFIt to select an MBR partition to boot, rEFIt sets the active partition flag of that partition in the MBR and then tells the Mac to use BIOS to boot the hard disk containing the partition. If the MBR contains Linux specific boot code that ignores the active partition flag, then you'll also need to make sure the Linux partition or a dedicated Linux boot partition has Linux boot code. Since your using Ubuntu, then you're probably using GRUB2. GRUB2 has options to install GRUB2 boot code to the MBR of the disk or to a partition.

    The Linux partition won't appear in Mac OS X unless you have a btrfs file system driver for Mac OS X installed. I don't know if that exists yet.

     

Log in to post a comment.