Skip to content

Instantly share code, notes, and snippets.

@kilburn
Created February 9, 2014 07:32
Show Gist options
  • Save kilburn/8895643 to your computer and use it in GitHub Desktop.
Save kilburn/8895643 to your computer and use it in GitHub Desktop.
# Load environment if available
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
# See if we are trying to reload a failed boot
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
# Records the new default option
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
set gfxpayload="text"
# Timeout for menu
set timeout=5
#########################################################
# Puppy linux
menuentry "Lucid Puppy 5.2.8" {
fakebios
set isofile="/isos/lupu-528.005.iso"
loopback loop (${root})/$isofile
bootoptions="loglevel=7 findiso=$isofile"
echo Loading Linux...
linux (loop)/vmlinuz $bootoptions
echo Loading initrd...
initrd (loop)/initrd.gz
echo And launch (this may take a short while, be patient)...
}
#########################################################
# Kali linux
menuentry "Kali Linux 1.5 amd64" {
fakebios
set isofile="/isos/kali-linux-1.0.5-amd64.iso"
loopback loop (${root})/$isofile
bootoptions="findiso=$isofile boot=live noconfig=sudo username=root hostname=kali"
echo Loading Linux...
linux (loop)/live/vmlinuz $bootoptions
echo Loading initrd...
initrd (loop)/live/initrd.img
echo And launch (this may take a short while, be patient)...
}
#########################################################
# Talis linux
menuentry "Talis Linux 0.21 x86" {
fakebios
set isofile="/isos/tails-i386-0.21.iso"
loopback loop (${root})/$isofile
bootoptions="findiso=$isofile boot=live config live-media=removable nopersistent noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash nox11autologin module=Talis quiet"
echo Loading Linux...
linux (loop)/live/vmlinuz2 $bootoptions
echo Loading initrd...
initrd (loop)/live/initrd2.img
echo And launch (this may take a short while, be patient)...
}
menuentry "Talis Linux 0.21 x86 failsafe" {
fakebios
set isofile="/isos/tails-i386-0.21.iso"
loopback loop (${root})/$isofile
bootoptions="findiso=$isofile boot=live config live-media=removable nopersistent noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 splash nox11autologin module=Talis noapic noapm nodma nomce nolapic nomodeset nosmp vga=normal"
echo Loading Linux...
linux (loop)/live/vmlinuz2 $bootoptions
echo Loading initrd...
initrd (loop)/live/initrd2.img
echo And launch (this may take a short while, be patient)...
}
#########################################################
# Ubuntu linux
menuentry "Ubuntu linux 13.10 Desktop (mac version)" {
fakebios
set isofile="/isos/ubuntu-13.10-desktop-amd64+mac.iso"
loopback loop (${root})/$isofile
bootoptions="boot=casper iso-scan/filename=$isofile noprompt"
echo Loading Linux...
linux (loop)/casper/vmlinuz $bootoptions
echo Loading initrd...
initrd (loop)/casper/initrd.lz
echo And launch (this may take a short while, be patient)...
}
menuentry "Ubuntu linux 13.10 Desktop (standard 64bits)" {
set isofile="/isos/ubuntu-13.10-desktop-amd64.iso"
loopback loop (${root})/$isofile
bootoptions="boot=casper iso-scan/filename=$isofile noprompt"
echo Loading Linux...
linux (loop)/casper/vmlinuz.efi $bootoptions
echo Loading initrd...
initrd (loop)/casper/initrd.lz
echo And launch (this may take a short while, be patient)...
}
menuentry "Ubuntu linux 12.10 Desktop (mac version)" {
fakebios
set isofile="/isos/ubuntu-12.10-desktop-amd64+mac.iso"
loopback loop (${root})/$isofile
bootoptions="boot=casper iso-scan/filename=$isofile noprompt"
echo Loading Linux...
linux (loop)/casper/vmlinuz $bootoptions
echo Loading initrd...
initrd (loop)/casper/initrd.lz
echo And launch (this may take a short while, be patient)...
}
@iTh3End
Copy link

iTh3End commented Feb 21, 2014

thanks for this grub
i want add backtrack to this grub what should i do?
is this correct?

Backtrack

menuentry "BT5R3-KDE-64" {
fakebios
set isofile="/isos/BT5R3-KDE-64.iso"
loopback loop (${root})/$isofile
bootoptions="findiso=$isofile boot=live noconfig=sudo username=root hostname=kali"

echo Loading Linux... 
linux (loop)/live/vmlinuz $bootoptions
echo Loading initrd...
initrd (loop)/live/initrd.img
echo And launch (this may take a short while, be patient)...

}

@bigthinkweb
Copy link

Many hours and now days have passed in my quest to install Linux (of ANY kind) on my Macbook Pro 3,1. I have been led to your door but have yet to make anything work.

I have been trying to install ANY of the versions from your grub.cfg file only to have each of them hang and stop installation.

I tried using Linux Mint with the MAC USB Loader from SevenBits but continue to get stuck and the Grub prompt each time.

It does concern me that these posts all seem to stem from at least four years ago so I do fear that there is an easier way to get this done but I have yet to stumble upon it.

So my question is this: what do you suggest will be the best way to install ANY kind of Linux on my MacBook Pro 3,1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment