PDA

View Full Version : Linux on a Mac question.




Avizzv92
Jan 10, 2009, 10:01 AM
Sorry if this post is in the wrong forum, I figured this would be the best area.

Can I boot and run Linux from a USB flash drive on my Intel Mac? I have Windows XP installed from Boot Camp and works great. I was just wondering before I try, if it is possible and safe too do this.



Killthee
Jan 10, 2009, 10:59 PM
AFAIK, No and yes.

Short answer: No, you cannot run a USB Linux Distro by just installing it to a USB drive and rebooting your Mac, but you can run a Linux distro off USB when you use a bootloader on the internal drive or on a CD/DVD to boot the USB drive.

Long answer: The EFI on Intel Mac's refuses to boot off USB what it considers a legacy OS, i.e. Windows & Linux. You can bypass this issue and run Linux off a USB drive by either first running a Linux Boot CD that will allow you to boot a linux image on a USB drive (I've done this with a Backtrack CD that contained LILO to boot a copy of Backtrack on a USB flash card) or you can install a boot loader on a partition in the internal drive so you can boot the USB drive (I've done this with GRUB to boot a copy of Backtrack on my iPod). If you choose to install a bootloader on the internal drive, do a backup first and be very careful before you start partitioning/formating the drive ;) Also keep in mind that you have to install the bootloader to the partition in which it will reside in, not to the MBR and you'll also need to install rEFIt if you do a bootloader install and you want to jump between Windows and Linux without chainloading.

twoodcc
Jan 10, 2009, 11:16 PM
AFAIK, No and yes.

Short answer: No, you cannot run a USB Linux Distro by just installing it to a USB drive and rebooting your Mac, but you can run a Linux distro off USB when you use a bootloader on the internal drive or on a CD/DVD to boot the USB drive.

Long answer: The EFI on Intel Mac's refuses to boot off USB what it considers a legacy OS, i.e. Windows & Linux. You can bypass this issue and run Linux off a USB drive by either first running a Linux Boot CD that will allow you to boot a linux image on a USB drive (I've done this with a Backtrack CD that contained LILO to boot a copy of Backtrack on a USB flash card) or you can install a boot loader on a partition in the internal drive so you can boot the USB drive (I've done this with GRUB to boot a copy of Backtrack on my iPod). If you choose to install a bootloader on the internal drive, do a backup first and be very careful before you start partitioning/formating the drive ;) Also keep in mind that you have to install the bootloader to the partition in which it will reside in, not to the MBR and you'll also need to install rEFIt if you do a bootloader install and you want to jump between Windows and Linux without chainloading.

interesting. thanks for that info! now, what about triple and quadruple booting? like leopard, xp, vista, and ubuntu? is this possible?

costabunny
Jan 10, 2009, 11:19 PM
You could try installing the rEFIt bootloader for Mac - that will pickup pretty much anything and boot from it (Its how I tripple boot my Mac Pro)

Just an idea.... (I havent tried it with USB Key baesed distros but Id suggest putting slax on it as a tester)

Killthee
Jan 10, 2009, 11:47 PM
interesting. thanks for that info! now, what about triple and quadruple booting? like leopard, xp, vista, and ubuntu? is this possible?

Don't get me started on triple booting, that was such a headache X_X Mostly because most of the information on it was so freaking scattered and inadequate.

It's possible, but everything has to be done in a certain order and on a certain partition. First of all you need to install rEFIt if you want to boot without chainloading. Secondly, the Windows & Linux installation have to be on the MBR partition table which means a max of three of any Windows OS or Linux Distro (in any combination) installations since the MBR partition table can only contain 4 entries and the EFI partition takes the first entry. Thirdly, AFAIK, the XP bootloader and the Vista bootloader don't get along so you have to install XP before Vista or something like (I haven't tried installing XP ;)) The only OS that doesn't give a damn where its located is OS X :p

The way my MBP is currently setup, I have the EFI partition first on my internal drive, followed by my Vista install, then a NTFS partition holding all my Music, then Ubuntu installed with GRUB on the same partition and with a entry to chainload Windows just in case something goes wrong, followed by OS X (which is inaccessible in Windows with Macdrive because it falls out of the MBR table), followed by my Linux swap. It's a freaking mess, but it all works :D

You could try installing the rEFIt bootloader for Mac - that will pickup pretty much anything and boot from it (Its how I tripple boot my Mac Pro)

Just an idea.... (I havent tried it with USB Key baesed distros but Id suggest putting slax on it as a tester)

It won't work. The EFI crashes when booting a USB drive directly, he needs to boot into another bootloader to boot the USB drive.

dividido
May 7, 2009, 02:07 PM
great info Killthee...I also want to run backtrack off usb on my macbook. Could you elaborate on your grub setup.

Are you using grub or grub2?
How did you compile it? - 32 or 64?
How did you configure your grub.conf to boot off the usb stick for backtrack?

I'm running into some problems doing it myself and can't seem to find the info I need to get it working.

Thanks in advance!

Daveoc64
May 7, 2009, 04:32 PM
I found that a reasonable triple boot solution is to use Wubi (http://wubi-installer.org/) with Ubuntu.

You use Boot Camp to install Windows in the normal way, and then Wubi to install Ubuntu on a file in your Windows installation.

There are small performance losses doing it this way, but it's really easy to set up if you're ok with just using Ubuntu (or one of its variants).

dividido
May 7, 2009, 04:34 PM
thanks for your reply, but what I really wanted was how he was able to setup the mac to boot a portable linux distro installed on a usb stick.

Daveoc64
May 8, 2009, 06:47 AM
thanks for your reply, but what I really wanted was how he was able to setup the mac to boot a portable linux distro installed on a usb stick.

I forgot to mention, that I tried the Wubi method with a USB stick and it didn't work.

I was a little surprised really because I thought it would given that the EFI had handed control to the bootloader in Windows.