0

I try to setup Linux on a MacBook (13in, mid 2009). I created an Ubuntu Live USB stick (ubuntu-13.04-desktop-amd64+mac) and installed Refind (0.10.8). Booting into the live environment works, also creation of the partitions with gparted. But as soon as the swap partition is formated with linux-swap the computer hangs at the next reboot: Refind lets me select the Ubuntu Live USB, but instead of the Ubuntu boot menu only a blank screen with a blinking cursor appears.

The reason for this behavior is definitely the creation of the swap partition. As long as the partitions are formatted differently (HFS+, FAT32, ext3,..) the boot menu appears immediately. I tried different suggestions I found (e.g. press Shift or Escape) but without any effect. Solutions with different boot options are useless because I don't even see the boot menu.

Any ideas what could cause this problem?

Thanks, Stefan

SteSol
  • 1

2 Answers2

0

My initial thought is that this may be related to a hybrid MBR. Depending on how you create the partitions, the total number of partitions may be important in determining which ones are in a hybrid MBR, or even in whether a hybrid MBR is created at all. This in turn could affect the boot process, particularly if you install Ubuntu in BIOS/CSM/legacy mode rather than in EFI mode. I have some thoughts about how to work around this problem:

  • Use rEFInd's EFI filesystem drivers -- If you're trying to boot Ubuntu by using a BIOS-mode GRUB, you may be able to install an EFI filesystem driver for whatever filesystem holds your kernel (ext4fs by default). This will enable rEFInd to boot the Linux kernel directly, which will bypass GRUB and whatever problem it's encountering.
  • Install Ubuntu in EFI mode -- If you re-run the installation in EFI mode rather than in BIOS mode, you might bypass the problem. The trick here is to figure out how to launch the installer in EFI mode. See this page of mine for information on the CSM; but that page is written mainly for UEFI-based PCs -- there are some Mac-specific quirks.
  • Omit the swap partition, and instead use a swap file -- You can install without a swap partition but still use swap space; see this question and its answers, to name just one reference, for information on how to do this.

Note that the first two options assume you've got a 64-bit EFI in your Mac. I suspect this is the case, based on the specs listed here; but if they're in error or (more likely) if I've misidentified your computer, you might have one of the few Macs with a 64-bit CPU and a 32-bit EFI. In this case, installing in EFI mode becomes much more complex, and some methods require installing a 32-bit version of Ubuntu, rather than a 64-bit version. The rEFInd about/info screen should tell you whether you've got a 32-bit or a 64-bit EFI.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
0

I figured it out by now. I found some posts suggesting to remove any connected hardware (e.g. also the internal optical drive). Therefore I tried to boot without the Ubuntu Live USB stick:

  • Copy the content of the stick to a free partition (it has to be of a type that Refind can read, I chose FAT32, Name "Ubuntu")
  • Modify refind.conf:

menuentry "Ubuntu Recovery" {
    icon EFI/refind/icons/os_ubuntu.png
    volume "Ubuntu"
    loader /casper/vmlinuz
    initrd /casper/initrd.lz
    options "live-media-path=/casper/ ignore_uuid boot=casper --"
}

Remove the USB stick and reboot - works without any issues by now.

Nevertheless I also switched from a SWAP partition to a SWAP file as suggested.

Best regards, Stefan

SteSol
  • 1