15

Hello I have actually successfully created a live Ubuntu USB (12.04.3 64-bit on 8GB LiveUSB) using unetbootin, however it is not persistent and will not boot on a Mac.

Or, if anyone has any suggestions on how to edit the .iso file so it boots from a Mac and is persistent, that would be great too. I am running OSX Mavericks so the application would have to run on Mavericks too.

I tried following http://ubuntuforums.org/showthread.php?t=2174630 ans, as suggested below, chose GUID partition (not MBR) and then add persistent word in grub.cfg file. and after I booted and changed a few settings, I tried to reboot using the restart option in the ubuntu menu, and it didn't work. I manually powered my computer off and on, but when I tried to boot the second time, I got past the Ubuntu logo and then my screen went black. I tried this some more times and got the same result. here is my text from the grub.cfg file:

if loadfont /boot/grub/font.pf2 ; 
then set gfxmode=auto insmod efi_gop insmod efi_uga insmod gfxterm terminal_output gfxterm 
fi 

set menu_color_normal=white/black   
set menu_color_highlight=black/light-gray 

menuentry "Try Ubuntu without installing" 
{ set gfxpayload=keep linux /casper/vmlinuz.efi persistent file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash -- 
initrd  /casper/initrd.lz } 

menuentry "Install Ubuntu" 
{ set gfxpayload=keep linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash -- 
initrd  /casper/initrd.lz }


menuentry "Check disc for defects" 
{ set gfxpayload=keep linux /casper/vmlinuz.efi boot=casper integrity-check quiet splash -- 
initrd  /casper/initrd.lz }
Seth
  • 59,332

6 Answers6

1

You should be able to accomplish this using diskutil. I last used this method on Sierra, so ymmv on anything later.

$ diskutil list
$ diskutil eraseDisk FAT32 UBUNTU /dev/<YOUR USB DISK ID>
$ diskutil unmountDisk /dev/<YOUR USB DISK ID>
$ sudo dd if=<path to ubuntu live iso> of=/dev/<YOUR USB DISK ID>

Once that completes you need to restart and boot from the live usb.

Once it boots start gparted from the terminal.

Select the USB drive and select the Unallocated partition on it.

Create a new partition, label it ext3/ext4(unsure if other filesystems will work. never tried.) with the label persistence

Exit gparted

Create a mountpoint for your new persistence partition.

$ mkdir -p /mnt/ubuntu_usb $ mount <USB DRIVE> /mnt/ubuntu_usb

TO enable the persistent storage you need a persistence.conf.

$ echo "/ union" > /mnt/ubuntu_usb/persistence.conf
$ umount <DISK>

Restart the mac and hold down the Option key. You should hopefully have an option for Ubuntu (persistence) to boot from now

1

Cloning and maybe a second step

You can use a one-step or two step procedure. dd is a powerful but also dangerous tool, that is 'always' available in a MacOS. Be very careful, check and double-check, that everything is correct, before you start the cloning process.

  • One step: If you find a [compressed] image file of an Ubuntu [based] system, that is persistent live, and can do what you want, clone it to a USB pendrive or a memory card. If the downloaded file is compressed, you need to extract it before cloning, for example

    file.img.zip --> file.img

    file.img.xz --> file.img

    Unmount all partitions on the target drive and run dd

    sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskn
    

    where n is a number (for example, /dev/rdisk4).

    There are tips in this link.

  • Two steps: Download and clone a [compressed] image file of an Ubuntu [based] system, that is persistent live, and contains mkusb.

    Boot from from the USB pendrive or memory card which was made bootable by cloning.

    Download an iso file of the Ubuntu version and flavour, that you want to install as persistent live.

    Run mkusb-dus and create a persistent live drive in another USB drive or memory card.

  • Links

    Installing operating system images on Mac OS (www.raspberrypi.org)

    help.ubuntu.com/community/mkusb

    help.ubuntu.com/community/mkusb/persistent

    Compressed image file with a persistent live system and mkusb

sudodus
  • 47,684
0

TLDR; Adding "persistent" to grub.cfg is what broke the boot for me (hung at the same black screen). Adding a casper-rw file fixed it and now I have persistence:)

Background: I'm running High Sierra, installing Ubuntu 16.04, 64 bit. Erased the USB with Disk Utility and set up as MS-DOS(FAT32). Downloaded Ubuntu ISO, installed to USB with UNetbootin. Had a working boot but wanted linux to recognize my trackpad and keyboard on my Macbook. Did the setup and rebooted and all the setting were lost--no persistence:(

Added "persistent" to grub.cfg and the boot hung after the Ubuntu logo screen. Turns out I needed to create a casper-rw file in the root of my USB stick by running

dd if=/dev/zero of=casper-rw count=3500

Replace 3500 with the size storage you want your live usb to have. I read that FAT32 only supports file transfers under 4GB so you might want to keep that in mind.

I've only tested with a couple files on my desktop but it both boots and persists.

Got the idea here.

0

I followed following link to create live linux USB: http://ubuntuforums.org/showthread.php?t=2174630 Instead of MBR choose GUID partition and then add persistent word in grub.cfg file. It worked for me.

0

Actually, I'm using Mac Air 2013, which is 64 bit.I've installed ubuntu 13.10 64-bit version. I exactly followed same instructions, and in fact i've used it for so many times. At this point what you can try is follow what is says and this time follow as it is. I mean select MBR not GUID. If you don't have grub.cfg file in your boot folder, that's fine. But, check syslinux.cfg file for the word persistent. If it's there, that should work perfectly. I mean it did work for me, I hope that would work for you as well. Try to play with .cfg files and you'll sure can do it.

0

If you need your Mac to boot from the Ubuntu USB, the Ubuntu website has a detailed guide explaining how to dd the disk image onto a USB.

Alternatively, if you have access to Windows, download Rufus. When selecting the image type, choose DD and select your desired ISO file (Ubuntu ISOs are hybrid, meaning they can either be copied in ISO or DD mode). DD's the one you want, that's the important thing. Also make sure you set the partition scheme/target system type to MBR for BIOS AND UEFI.

As for persistence, if anyone else can add to/improve my answer, please do so as I've never had experience setting up persistent volumes.