PDA

View Full Version : Tech Help Linux, LiveUSB, and GRUB



Psionic Dog
2014-06-02, 09:57 PM
Hey. Has anyone managed to make a Linux LiveUSB that will run on an intel iMac?

Basically, I need to run some software that requires OpenGL 3.0 and either Linux or Windows. I thought I'd try to get a linux live USB to work on a $20 usb pendrive before spending $150 on parallels + Windows to run one piece of software.

I found a live-distro of Debian that works in Virtual Box, but I've struck out thrice on getting the thing to boot from a usb drive. Three strikes and it is time to go looking for help.

Copying the .iso directly to the drive doesn't work. Something about EFI.

My second attempt, using a 1-click compiler utility, ended with the text "error no suitable video mode found."

My third attempt, using manual director changes and file additions, is dumping me into GNU Grub Version 1.99. So I think I am getting closer.

Alternatively, does anyone know their way around Grub who can point me to the needed commands to setup whatever root directory mapping or boot paths are possibly missing?

Whoracle
2014-06-03, 02:03 AM
Haven't tried it myself, because I almost exclusively use Arch Linux*, and those USB sticks boot on the 2 Macs in the company, but this guide (http://www.makeuseof.com/tag/how-to-boot-a-linux-live-usb-stick-on-your-mac/) looks pretty solid.

*which, since you're only trying to run one specific tool, is DEFINITELY not the right choice for your use case

Psionic Dog
2014-06-03, 07:09 AM
Yah, that guide did look pretty solid. That was my second attempt.

My third attempt was this guide (http://studyblast.wordpress.com/2011/08/14/guide-mac-os-x-lion-how-to-boot-a-linux-live-system-from-a-usb-drive-how-to-update-any-ocz-ssds-firmware/).

Since both were were tested by their creators on MacBooks, and neither has worked yet on my iMac I'm suspicious that apple might be doing something different between the two.

Max™
2014-06-03, 04:04 PM
I helped talk a friend of mine through this a while back on his iMac (one of the 21 inch sandy bridge models I think), and the tricks were to use this: http://www.rodsbooks.com/refind/ and to copy the .iso to the usb stick with dd rather than unetbootin.

valadil
2014-06-08, 09:18 PM
I almost tried at my new job, but opted to play it safe and got a Thinkpad instead. UEFI still gave me trouble and I ended up disabling it entirely. Do you have an option like that on a Mac?

FLHerne
2014-06-09, 04:11 AM
I almost tried at my new job, but opted to play it safe and got a Thinkpad instead. UEFI still gave me trouble and I ended up disabling it entirely. Do you have an option like that on a Mac?
You don't. Apple have been using EFI boot from years before UEFI even existed - they don't have a BIOS to fall back to. :smallwink:

Is this some early Intel one, pre-2007 or so? Some of those had 32-bit EFI firmware despite the hardware itself being 64-bit, which is kind of a pain if you want to install a 64-bit version of a distro. Can be worked around, though.

If you were using MacOS Classic on something 90sish, it would be a lot simpler because you can ignore the bootloader. Just install a program that runs on boot and overwrites the OS with your kernel, and it works. And then crashes, because things aren't written for 64MB of RAM anymore and no-one really cared about the drivers for ancient Apple stuff. But whatever. :smallbiggrin:

Psionic Dog
2014-06-09, 06:39 AM
Mid 2011 iMac. So far the only thing that worked has been booting from a Live-CD/DVD. That was painless, but was missing an essential package for my application.


So, back to USB with persistence. My latest 'success' has been getting the USB-EFI GRUB/Boot file to complain that my 64-bit linux iso is not a valid 32-bit linux kernel. I think I downloaded a bad or mis-named EFI-boot loader.


Well, back to the internet. I'm still trying to avoid all the solutions that say "caution: may fry firmware," but those are looking more attractive each day.

Max™
2014-06-09, 05:22 PM
Did you check out the http://www.rodsbooks.com/refind/ method and using dd to copy the iso to the usb stick?

That worked for a friend with one of the 21 inch iMacs from 2011 or 2012 I think.

Psionic Dog
2014-06-10, 07:40 AM
Apparently the things that Rob guy knows and takes for granted are significantly different than the things I know and take for granted. As a result that guide comes across as simultaneously comprehensive, convoluted, and incomplete. I'm not quite sure what I did wrong, but now the partition I dd'd to won't mount.

Do you have any idea which combination of downloads/installations/usages outlined in that guide were used successfully by your friend?

Max™
2014-06-10, 07:49 AM
Whoa, you did the dd to a usb stick right, with a bootable iso, I thought that was implied.

Psionic Dog
2014-06-10, 08:13 AM
Yep. Toke one linux-64 bit iso. Used hdiutil to convert to a .img, and then used dd to send that to the disk1s1 partition.

Any idea where I went wrong?

Edit: I tried sending the original .iso first, but that kept aborting with "resource in use" messages.

Whoracle
2014-06-11, 02:13 PM
Yep. Toke one linux-64 bit iso. Used hdiutil to convert to a .img, and then used dd to send that to the disk1s1 partition.

Any idea where I went wrong?

Edit: I tried sending the original .iso first, but that kept aborting with "resource in use" messages.

Again, not tried that, but fron other unices it goes like this:
- Unmount the USB stick
- open a terminal
- dd if=/path/to/image.iso of=/dev/disk1
- if you're getting permission errors: su to root (su - then enter root password, or sudo su - and enter yours. however OSX handles that...)

Assuming /dev/disk1 is your USB stick. Do not DD to a partition on said stick. Do not dd if the stick is mounted.
You want to write to a device, bit by bit, from said iso. The iso should contain any neccessary partitions etc.