GRUB won't start on Macbook 2,1; Unsynced GPT/MBR table

Help with issues regarding installation of Debian

GRUB won't start on Macbook 2,1; Unsynced GPT/MBR table

Postby kioma » 2015-04-29 05:41

Hello everyone,

I did an install of Jessie on a Macbook 2,1 to be the machine's only operating system, but it won't boot, showing only a black screen with a blinking cursor. I think the problem is caused by a mistake I made during the installation process, where I selected yes for the prompt:

This machine's firmware has started the installer in UEFI mode but it
looks like there may be existing operating systems already installed
using "BIOS compatibility mode". If you continue to install Debian in
UEFI mode, it might be difficult to reboot the machine into any
BIOS-mode operating systems later.

If you wish to install in UEFI mode and don't care about keeping the
ability to boot one of the existing systems, you have the option to
force that here. If you wish to keep the option to boot an existing
operating system, you should choose NOT to force UEFI installation
here.

Force UEFI installation?


Booting from a CD with rEFIt, I'm able to boot into Debian (where everything works perfectly), but rEFIt is unable to sync partition tables to repair it. How do I fix this?

Image
Last edited by kioma on 2015-04-29 11:18, edited 4 times in total.
kioma
 
Posts: 5
Joined: 2015-04-28 02:41

Re: Debian won't boot on Macbook 2,1: Unsynced GPT/MBR table

Postby wayne128 » 2015-04-29 07:35

Once running in installed Debian, please check partition table with
Code: Select all
parted -l


at the same time, check if debian boot code is in the boot entry with
Code: Select all
efibootmgr
wayne128
 
Posts: 89
Joined: 2011-03-30 15:16

Re: Debian won't boot on Macbook 2,1: Unsynced GPT/MBR table

Postby kioma » 2015-04-29 07:53

I get following output:

parted -l

Code: Select all
Model: ATA FUJITSU MHV2080B (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  538MB   537MB   fat32                 boot, esp
 2      538MB   10.5GB  10.0GB  ext4
 3      10.5GB  12.6GB  2104MB  linux-swap(v1)
 4      12.6GB  80.0GB  67.4GB  ext4


efibootmgr

Code: Select all
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000,0080
Boot0000* debian
Boot0080* Mac OS X
Boot0081* Mac OS X
BootFFFF*
kioma
 
Posts: 5
Joined: 2015-04-28 02:41

Re: Debian won't boot on Macbook 2,1: Unsynced GPT/MBR table

Postby wayne128 » 2015-04-29 08:03

all information seems normal.

perhaps just reinstall grub-efi


1. boot with rEFIt
2. while running Debian, just do this code, in the hope that it reinstall grub fine
Code: Select all
apt-get install --reinstall grub-efi


copy and paste what the terminal output .



If still cannot work, then I would suspect something went wrong with grub-efi during installation,
the next level is to purge grub-efi , update your system , then install grub-efi.
wayne128
 
Posts: 89
Joined: 2011-03-30 15:16

Re: Debian won't boot on Macbook 2,1: Unsynced GPT/MBR table

Postby kioma » 2015-04-29 08:19

Wonderful! That did it. Thank you so much.
kioma
 
Posts: 5
Joined: 2015-04-28 02:41

Re: [SOLVED] Debian won't boot on Macbook 2,1

Postby wayne128 » 2015-04-29 09:05

Welcome.
Enjoy Debian 8
wayne128
 
Posts: 89
Joined: 2011-03-30 15:16

Re: GRUB won't load upon on Macbook 2,1; Unsynced GPT/MBR ta

Postby kioma » 2015-04-29 11:16

I'm sorry to report that after everything booting up properly once after reinstalling grub-efi-ia32, it's gone back to as it was before. I've tried purging and reinstalling it as well. Upon boot, I only get a black screen and a blinking cursor. Through rEFIt, GRUB will load immediately however.

EDIT:
I've since noticed that the reason why I initially reported success is because I don't have any of these problems when rebooting. They only come up when the computer has been powered off.

The output that I get from reinstalling grub-efi-ia32 is:
Code: Select all
Setting up grub-efi-ia32 (2.02~beta2-22) ...
Installing for i386-efi platform.
Installation finished. No error reported.
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.16.0-4-686-pae
Found initrd image: /boot/initrd.img-3.16.0-4-686-pae
done
kioma
 
Posts: 5
Joined: 2015-04-28 02:41

Re: GRUB won't start on Macbook 2,1; Unsynced GPT/MBR table

Postby wayne128 » 2015-04-29 12:14

Well, go full steps:

1. Boot and run installed Debian

2. Mount the ESP partition
Code: Select all
mount /dev/sda1 /boot/efi



3. Reinstall the grub-efi package
Code: Select all
apt-get install --reinstall grub-efi-ia32


4. Put the debian bootloader in /boot/efi and create an appropriate entry in the computer NVRAM
Code: Select all
grub-install /dev/sda


5. Re create a grub config file based on your disk partitions
Code: Select all
update-grub


6. check that the debian boot files is in
Code: Select all
file /boot/efi/EFI/debian/grubia32.efi


it should return a line that is similar to below ( since yours is Mac, it should be different)

/boot/efi/EFI/debian/grubia32.efi: PE32+ executable (EFI application) Intel 80386 (stripped to external PDB), for MS Windows

7. check again with efibootmgr
Code: Select all
efibootmgr --verbose | grep debian
wayne128
 
Posts: 89
Joined: 2011-03-30 15:16

Re: GRUB won't start on Macbook 2,1; Unsynced GPT/MBR table

Postby kioma » 2015-04-29 20:36

It's still as it was before. The output for efibootmgr --verbose is:

Code: Select all
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000,0080
Boot0000* debian   HD(1,800,100000,dea24544-665c-4989-99d0-3d8be22917ea)File(\EFI\debian\grubia32.efi)
Boot0080* Mac OS X   MM(b,ffe00000,fff9ffff)FvFile(2b0585eb-d8b8-49a9-8b8c-e21b01aef2b7)H.D...
Boot0081* Mac OS X   ACPI(a0341d0,0)PCI(1f,2)SATA(2,0,0)HD(1,28,64000,0000222c-1c42-0000-b712-000008310000)File(\EFI\APPLE\FIRMWARE\EfiUpdaterApp2.efi)".-.x. .e.f.i.-.a.p.p.l.e.-.p.a.y.l.o.a.d.0.-.d.a.t.a."...
BootFFFF*    ACPI(a0341d0,0)PCI(1f,2)SATA(2,0,0)HD(2,64028,946b860,fe96e803-b914-43cb-a337-1c555be823c1)File(\efi\refit\refit.efi)


Here it says File(\EFI\debian\grubia32.efi). What's bizarre is that using rEFIt, I'm able to boot perfectly using either of the options "Boot EFI\debian\grub.efi from" or "Boot EFI\debian\grubia32.efi from."

When it comes to the GPT and MBR not being in sync, what puzzles me is that when I've installed Debian on this computer in the past, that being the case has yielded a different problem, namely the error message of the flashing question mark in the Mac BIOS (meaning it can't locate a boot directory). This could then be simply fixed by syncing the partition tables in rEFIt.

My particular model has EFI as firmware, and as I mentioned in the original post, I at one point chose the option to force UEFI installation. The Debian installation image I used (debian-8.0.0-i386-netinst.iso) refers to itself as the Debian GNU/Linux UEFI Installer in its menu too. Is this what's causing the problem?
kioma
 
Posts: 5
Joined: 2015-04-28 02:41

Re: GRUB won't start on Macbook 2,1; Unsynced GPT/MBR table

Postby wayne128 » 2015-04-30 05:50

My particular model has EFI as firmware, and as I mentioned in the original post, I at one point chose the option to force UEFI installation. The Debian installation image I used (debian-8.0.0-i386-netinst.iso) refers to itself as the Debian GNU/Linux UEFI Installer in its menu too. Is this what's causing the problem?


Not sure since I have yet to try on debian-8.0.0-i386-netinst.iso on a mac.

Looking at their website
http://cdimage.debian.org/debian-cd/cur ... 86/iso-cd/

I think you should try the mac version.
[ ] debian-8.0.0-i386-netinst.iso 2015-04-25 13:44 315M
[ ] debian-8.0.0-i386-xfce-CD-1.iso 2015-04-25 13:46 641M
[ ] debian-mac-8.0.0-i386-netinst.iso 2015-04-25 13:44 316M
wayne128
 
Posts: 89
Joined: 2011-03-30 15:16


Return to Installation

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable