Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: [Updated] How to create a live USB with or without persistence for mac and pc

  1. #1
    Join Date
    Mar 2010
    Beans
    57

    [Updated] How to create a live USB with or without persistence for mac and pc

    This is an updated version of my tutorial.

    Screwed this guide up, now read:
    http://ubuntuforums.org/showthread.php?t=1683062


    First things first, you will need:
    • 1GB or larger flash drive
    • rEFIt (Link at the bottom)
    • A linux installation, virtual machine, or live cd
    • A Mac OS X installation/installation disk
    • Administrator permissions
    • gparted (comes on most linux live cd's)
    • hfsplus/hfsprogs for hfs+ support in linux


    Alright

    Step one (in linux):
    1. Format your USB key with an MBR partiton table.
    2. Add an 8MB ext3 partition named "GRUB" for simplicity.
    3. Add a 16MB hfs+ partiton.
    4. Use the rest of your disk as FAT32.


    Step two (also in linux):
    1. Mount your ext3 GRUB partiton
    2. Open terminal and do "sudo grub-install --root-directory=<mountpoint> /dev/myusb", of couse replacing <mountpoint> with the mount point and myusb with the correct sdX.
    3. If you get an error saying that there is no bios boot partition (which you shouldn't), open gparted and select the grub partition and select the flag "bios_grub".
    4. Close GParted if it is open and reopen it.
    5. Set the boot flag on the GRUB partition.
    6. Copy all of the contents of your live cd iso or cd (including the hidden folder ".disk") to your fat partiton.
    7. Skip the following steps in the step two if you don't want persistence
    8. In terminal create a zero'd out file called casper-rw in the fat partiton with "dd if=/dev/zero of=/media/LIVE/casper-rw". Replace the /media/LIVE with the mountpoint again.
    9. Now type "mkfs.ext4 /path/to/casper-rw" and follow the instructions if there are any


    Step three (in mac):
    1. Open the rEFIt dmg and copy the "efi" folder to the hfs+ partiton.
    2. Locate the file called "enable.sh" in the efi folder
    3. Open a terminal and type "sudo " and then the path to the enable.sh. (You can find it by dragging the file into the terminal)


    Step four:
    1. Reboot your computer holding the option key
    2. Select rEFIt on your USB drive (If it doesn't appear take it out and plug it back in or boot all the way up and then reboot again)
    3. Select "Linux on HD" that has a picture of a flash drive on it.
    4. You will now be at the GRUB prompt, so type the following:
      Code:
      root (hd0,3)
      linux /casper/vmlinuz boot=casper persistent
      initrd /casper/initrd.lz
      boot
      Of course take out the persistent part if you didn't use the persistence file.


    LINKS
    rEFIt: http://refit.sourceforge.net/
    Ubuntu live cd: http://www.ubuntu.com/desktop/get-ubuntu/download
    Last edited by Neds Moar Salt; February 7th, 2011 at 11:47 PM.

  2. #2
    Join Date
    Oct 2008
    Beans
    27
    Distro
    Ubuntu

    Re: [Updated] How to create a live USB with or without persistence for mac and pc

    This guide is great, but can someone add instructions to make a usb bootable of ubuntu server?

  3. #3
    Join Date
    Jan 2010
    Location
    Australia
    Beans
    45
    Distro
    Ubuntu 10.04 Lucid Lynx

    Smile Re: [Updated] How to create a live USB with or without persistence for mac and pc

    Thanks for this great tutorial, I will try it soon and add another post when I have completed it.
    Just thought I would notify anyone reading this tutorial of two things:

    Persistence: "Persistence" in this case means the ability of the live cd to save settings/programs etc to the USB it's running off so that when you, shutdown it doesn't delete all changed settings and added data.
    e.g. I install google chrome, and delete sample files off the desktop. With persistence built in, after I restart the OS those changes will still be there Chrome will be installed and working and the sample files will still be non-existent.
    Without persistence built in, after restarting, there would'nt even be a trace of chrome and the sample files would be back again.
    e.g Persistence is, generally, GOOD.

    when Needs more salt says
    First things first, you will need:
    1GB or larger flash drive
    rEFIt (Link at the bottom)
    A linux installation, virtual machine, or live cd
    A Mac OS X installation/installation disk
    Administrator permissions
    gparted (comes on most linux live cd's)
    hfsplus/hfsprogs for hfs+ support in linux
    by hfsplus/hfsprogs he means that you need to have BOTH installed not one or the other.

    That's all, hope I helped clear any confusions up.

  4. #4
    Join Date
    Jan 2010
    Location
    Australia
    Beans
    45
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: [Updated] How to create a live USB with or without persistence for mac and pc

    I get the following error upon entering the command to install grub:
    Code:
    alex@Alex-Linux:/media/GRUB$ sudo grub-install --root-directory=</dev/sdb1> /dev/sdb1
    bash: /dev/sdb1: Permission denied
    when I login into root using
    Code:
    sudo su
    it spits out the following message:
    Code:
    root@Alex-Linux:/media/GRUB# grub-install --root-directory=</media/GRUB> /dev/sdb1
    install_device not specified.
    Any help would be much appreciated...

  5. #5
    Join Date
    Dec 2005
    Location
    Italy
    Beans
    216
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [Updated] How to create a live USB with or without persistence for mac and pc

    Quote Originally Posted by hydrox24 View Post
    I get the following error upon entering the command to install grub:
    Code:
    alex@Alex-Linux:/media/GRUB$ sudo grub-install --root-directory=</dev/sdb1> /dev/sdb1
    bash: /dev/sdb1: Permission denied
    <..> is meant to be substituted with your path, for example:

    Code:
    alex@Alex-Linux:/media/GRUB$ sudo grub-install --root-directory=/media/sdb1 /dev/sdb
    assuming that you mounted the grub partition /dev/sdb on the folder /media/sdb1
    Last edited by zasf; January 7th, 2011 at 01:55 PM.

  6. #6
    Join Date
    Dec 2005
    Location
    Italy
    Beans
    216
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [Updated] How to create a live USB with or without persistence for mac and pc

    Quote Originally Posted by Neds Moar Salt View Post
    Step four:
    1. Reboot your computer holding the option key
    2. Select rEFIt on your USB drive (If it doesn't appear take it out and plug it back in or boot all the way up and then reboot again)
    3. Select "Linux on HD" that has a picture of a flash drive on it.
    4. You will now be at the GRUB prompt, so type the following:
      Code:
      root (hd0,3)
      linux /casper/vmlinuz boot=casper persistent
      initrd /casper/initrd.lz
      boot
      Of course take out the persistent part if you didn't use the persistence file.
    See http://dl.dropbox.com/u/964347/Foto199.jpg

    I followed the guide but I'm stuck at step four. I have rEFIt installed on my system and when booting with the usb stick in, it show two new options:
    1. Boot Linux from partition 1 (linux logo with orange usb symbol)
    2. Boot legacy OS from (grey squares logo with orange usb symbol)

    neither of the two works. The linux logo brings to a blinking cursor that doesn't load anything.

    Are you sure that no steps are missing with grub? How is it possible that grub loads without creating a config (with update-grub)?

    When doing the enable.sh command, what is it meant for? Enabling rEFIt on the usb stick?

    Thanks for the guide, I really would like to get this running
    Last edited by zasf; January 7th, 2011 at 01:02 PM. Reason: added picture

  7. #7
    Join Date
    Jan 2010
    Location
    Australia
    Beans
    45
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: [Updated] How to create a live USB with or without persistence for mac and pc

    Quote Originally Posted by zasf View Post
    <..> is meant to be substituted with your path, for example:

    Code:
    alex@Alex-Linux:/media/GRUB$ sudo grub-install --root-directory=/media/sdb1 /dev/sdb
    assuming that you mounted the grub partition /dev/sdb on the folder /media/sdb1
    thanks!
    Last edited by hydrox24; January 7th, 2011 at 10:13 PM.

  8. #8
    Join Date
    Jan 2010
    Location
    Australia
    Beans
    45
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: [Updated] How to create a live USB with or without persistence for mac and pc

    Having similar problem
    This showed up the first time after booting legacy OS and is extremely similar to the screen that came up the first time I booted the Linux bit:
    http://dl.dropbox.com/u/6833827/P1070001.JPG

    the second time I booted linux this shows up for an indefinite amount of time till I force shut down...
    http://dl.dropbox.com/u/6833827/P1070002.JPG

    And I have the same screen as zasf:

  9. #9
    Join Date
    Dec 2005
    Location
    Italy
    Beans
    216
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [Updated] How to create a live USB with or without persistence for mac and pc

    I managed to boot Ubuntu on my MacBookPro7.1 on a usb stick but in a different way. There are parts of this howto that I don't understand (rEFIt for example) and other things that I changed. I'm not 100% happy with this solution yet, so I need to work a bit more on it but will post again soon

  10. #10
    Join Date
    Jan 2011
    Location
    Earth
    Beans
    3
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: [Updated] How to create a live USB with or without persistence for mac and pc

    I get really far with this tutorial:

    I plug in my flash drive, and when I hold down Alt/Option on boot, I'm presented with Macintosh HD and rEFIt. When I click rEFIt, I'm then asked to:
    1 - Boot Mac OSX from Macintosh HD
    2 - Boot Linux from GRUB
    3 - Boot Linux from

    As well as with buttons for the standard EFI Shell, Partitioning Tool, Shut Down, and Restart.

    Point is, I can't boot Linux from any of the options.
    When I click option 2, it eventually loads a page that says that Macs don't boot Legacy OSes very well.
    When I click option 3, I'm given a small yellow and black square that doesn't go away unless I manually reboot.
    I'm glad that rEFIt is showing up from the flash drive at the very least, but I don't know why Linux isn't booting and how to get it working.

    Help?!?!?


    **EDIT: If I boot this on the latest generation macbook pro, option two eventually brings be to the grub shell, but then tells me that root (hd0,3) doesn't exist...
    Last edited by speedskater114; January 30th, 2011 at 09:26 PM. Reason: updated circumstances

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •