Skip to content

Instantly share code, notes, and snippets.

@knzm
Created October 19, 2011 18:53
Show Gist options
  • Save knzm/1299289 to your computer and use it in GitHub Desktop.
Save knzm/1299289 to your computer and use it in GitHub Desktop.
How to recover grub boot loader on MacBook Air
# Boot from Live CD
root@ubuntu:~# dmesg | grep DMI
[ 0.000000] DMI 2.4 present.
[ 0.000000] DMI: Apple Inc. MacBookAir1,1/Mac-F42C8CC8, BIOS MBA11.88Z.00BB.B03.0803171226 03/17/08
root@ubuntu:~# mount --bind /dev /mnt/dev
root@ubuntu:~# mount --bind /sys /mnt/sys
root@ubuntu:~# mount -t proc none /mnt/proc
root@ubuntu:~# chroot /mnt /bin/bash
root@ubuntu:/# mount -f /
root@ubuntu:/# grub-install /dev/sda
Searching for GRUB installation directory ... found: /boot/grub
Installing GRUB to /dev/sda as (hd0)...
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0) /dev/sda
root@ubuntu:/# exit
root@ubuntu:~# umount /mnt/sys
root@ubuntu:~# umount /mnt/proc
root@ubuntu:~# umount /mnt/dev
root@ubuntu:~# umount /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment