1

There seem to be quite few tutorials for that but they are either for having both live and installed, or supporting old 32 bit systems and so on and have some complicated steps. I simply want to install it on a USB drive like I would install it on a HDD and have it boot on both UEFI (my macbook pro) and BIOS systems (desktop PCs).

I just tried that by booting from live install pendrive and installing to the other, but since the laptop had HDD with its own install, the installation process was offering to install on just that. When I choosed to do something else from the install, and selected the usb drive, it installed it but didn't work. I have no idea how to create the necessary partitions on my own, so that might be the reason. So, is there an easy way to do this since i'm really unexperienced?

1 Answers1

1

I am assuming you are booting a PC in BIOS mode.

When running the Live CD/USB, choose "Try ubuntu"

Then run gparted and:

  • create a GPT partition table (Device > Create partition table) on your pendrive

  • create an ESP, fat32, 512MB, with esp flag.

  • create also a BIOS boot partition, unformatted, 32Mb, with bios_grub flag

Then click on install Ubuntu to install ubuntu on your pendrive, choosing "Something else" to select the correct drive.

Check that the bios boot partition is selected as Reserved BIOS boot area in the partitionning tool.

Be carefull to install grub on your pendrive by choosing the pendrive for bootloader isntallation.

Once the installation is completed, reboot into your new Ubuntu install, and open a terminal, and type:

sudo -i
mkdir /boot/efi
mount /dev/sdx1 /boot/efi     # where sdx1 is your efi partition

If your mac use 32 bit EFI then

apt-get install grub-efi-ia32
grub-install --target=i386-pc /dev/sdx

else

apt-get install grub-efi-amd64
grub-install --target=x86_64-efi /dev/sdx

then

cd /boot/efi/EFI/
mkdir boot

If your mac use 32 bit EFI then

cp ubuntu/grubia32.efi boot/bootia32.efi
cp boot/bootia32.efi boot/boot.efi

else

cp ubuntu/grubx64.efi boot/bootx64.efi
cp boot/bootx64.efi boot/boot.efi

umount /boot/efi

And try to boot on your mac. this might not work (I have not tested it). If not you will need to follow the instruction from there: http://glandium.org/blog/?p=2830 to change your ESP.

solsTiCe
  • 9,515