8 Replies Latest reply: Sep 23, 2008 6:53 AM by Kappy
Cauliflowerbob Level 1 Level 1 (0 points)
I have been trying to get this to work for a while now but it appears with the current firmware it is just not possible to boot a Linux OS from a usb drive.

Is this true? or is there a way it can be done?

Basically I work in a forensic computing lab and as our portable forensic machines we have a total of 16 MacBook Pro's all the same spec set up to dual boot WinXP and Leopard.
So far they've been excellent giving us the benefits of both OS's to run the different forensic tools on.

My problem is i need to boot a linux distro from a portable drive (USB or Firewire is fine but USB would be better) for a particular purpose.

As you can imagine, our system gets filled with loads of rubbish and we need to clean them regularly so i have created an install from a wiped drive containing everything we need on the drive. I have then created some scripts in Linux that use dcfldd to create an image of the entire drive and compress it to about 13GB.
I also created another script that puts the image back on the internal drive.

This basically allows me to put clean "forensically" secure images back on the laptops within about an hour. i can also then update any software etc before creating a new up to date image.

Currently I have to use a Linux boot CD to start the laptop with an external drive attached holding the scripts and image. i would like to just have a bootable thumb drive that holds everything and be able to start from it by holding the option key, put the image on the internal drive and reboot. its very quick except from the booting and running from CD whereas a small puppy linux build or similar would be very quick. And because we sometimes have to do this onsite speed is a major issue.

Am i correct in thinking that the firmware just doesn't allow it or has anyone managed to get this to work?

If it is the firmware, does anyone know if there is an update on the horizon that will remedy this problem?

I should state i have tried many linux builds (using MBR and GPT options etc) and refit and nothing allows the drive to boot with refit stating the firmware has limited support for legacy systems on USB.

I also know that I CAN (and have tried) using a Mac OS installed on the USB drive but it appears to have its own problems. it is fine when the internal drive is empty but because in my case it has an OS on it the system actually seems to use some of the components of the internal drive so when trying to image over it i get conflicts. The Mac OS also takes a lot of room on the drive when i just want a stream lined OS for this job.

The main reason i don't want to use Mac OS though is that i plan to later add images for our doing our lab machines which are PCs and would therefore not boot the Mac OS.

If anyone can help with this I would be grateful.



MacBook Pro 15", Mac OS X (10.5.5), WinXP boot camp
  • Kappy Level 10 Level 10 (257,975 points)
    The problem is that Linux doesn't work with EFI or Intel Macs as-is. You must do some special modifications in order to get the EFI to use a Linux boot loader such as Grub. I suggest that you go to the user forums of the Linux flavor you are using to find out how this is accomplished. You should find some helpful tutorials or discussions explaining the process. A good starting place is the Ubuntu Linux forums. Another good place for info is the MacTel Wiki. Google searching will likely find many more helpful sites.

    You will need to download the Open Source rEFIt utility - VersionTracker or MacUpdate.
  • Cauliflowerbob Level 1 Level 1 (0 points)

    thanks for quick reply. I realise that Linux does not work natively with EFI but neither does Windows XP and boot camp allows me to start windows. In fact i'm currently typing on the macbook pro in ubuntu because i have set this machine up as a triple boot and use refit to manage the EFI.

    I think i know what you are saying though and it is indeed the biggest problem.

    i have tried to use refit by having a small refit partition at the beginning of the usb device. i then boot with the option key and get the mac, windows and refit option.
    selecting the refit partition starts refit and lists my linux partition correctly but then cannot boot it giving me the error regarding limited firmware support.

    It appears refit will allow me to boot windows and Linux no problem from the internal drive just not from a usb or firewire, even when i recognises the OS correctly.
  • Kappy Level 10 Level 10 (257,975 points)
    Most Linux distros will not boot from USB devices as is. I believe you're in luck with Ubuntu because there are some methods of running it from USB flash drives that just may do the trick for you. I ran across this when looking into putting Ubuntu on my MSI Wind.

    Boot and run Linux from a USB flash memory stick | USB Pen Drive Linux.webloc;

    On the Ubuntu site look for information in the documentation for installing on pendrives.

    I'm pretty sure that the methods for booting from USB flash drives will apply to any USB drive. From what I learned Linux simply isn't set up to boot from a flash drive or USB drive without some effort on the part of the installer. I've never done this myself so I can't tell you what to do only some pointers to where you may find how to do it.

    After my experience using Ubuntu on my Wind I decided it wasn't worth the effort involved. OS X is simply much better than Linux in every respect. I just wasn't interested in becoming any geekier than I already am. I had enough of that 20 years ago!
  • Cauliflowerbob Level 1 Level 1 (0 points)

    i have experience with using Linux distros to boot from thumb drives including some such as ubuntu and suse etc. but in this case i've also tried puppy and **** small linux which are designed for this purpose.

    all the ones i have created boot fine from a PC so it is only the EFI is getting in the way here. i hoped rEFIt would help me out as it passes the EFI onto the boot loader (as it does with legacy systems on the internal hard drive) however. its not working here and its rEFIt themselves that state its due to the firmware not supporting it.

    I agree that OS X is a great system and it was what i first tried to do this with but I found that even when booting from an external drive it locks down the internal and will not allow me to do what i need to do. for this specific task i need linux's ability to do "whatever you want but except the consequences"

    Mac OS tries very hard to stop you destroying the OS and in this case its exactly what i want to do.
  • Kappy Level 10 Level 10 (257,975 points)
    Well, I'm sorry I can't help more. I don't know what you need to do that requires Linux. Of course you know OS X is Unix, so whatever you need to do in Linux you may also be able to do from the Unix command line. Surely if anyone knows what is possible using rEFIt it would be its developer.

    You might consider asking your question in a different forum, BTW. The Unix, Developer, and Software Development forums can be accessed here. I would also keep looking in the Ubuntu forums, particularly the Macintosh or Apple sections, for assistance. I found them particularly helpful during my experiments with Ubuntu on my Wind netbook.
  • Cauliflowerbob Level 1 Level 1 (0 points)
    Your right Kappy

    i should be able to use the terminal in OS X and in fact when i first tried all my commands it works great. i then had a bootable OS X on USB which also works not problem.

    i ran the commands again in terminal and it works great ALMOST.

    basically i was trying to use DCFLDD (an advanced DD command) to put an image back on the internal drive Disk0

    the problem came because it wouldn't allow me to do it with sudo. everything else worked fine but to access disk0 directly i had to su to root.

    this was ok in terminal but caused havoc with my scripts. then when it accepted the command i was getting errors because the DD wasn't completing properly. it seemed the OS was still trying to access the internal drive even though it shouldn't.
    so perhaps if someone can tell me how to SU to root using a shell script command that would fix the problem too.
  • Cauliflowerbob Level 1 Level 1 (0 points)
    But really my main reason for wanting to boot linux off usb is as i said in my very first post.

    i want to be able to use it to boot both our mac laptops and our lab PC's to do imaging and restoring.

    At the moment it looks like i will just have to stick with my bootable CD and separate hard drive and put up with the slow loading.
  • Kappy Level 10 Level 10 (257,975 points)
    Post the question in one of the developer forums. I put the link in my previous post. You're more likely to find the expertise there than in this forum. I know a little Unix, but not enough to help you further.