Ubuntu – Install Ubuntu 17.04 Desktop on 8GB USB Stick

bootsystem-installationusb

I need a bootable (with UEFI Support), persistent System that I can configure (install packages, programs, toolchains) that I will need to deploy on hundreds of 8 GB USB-Sticks.

Simply starting the 17.04 Install ISO and telling it to install the basic system onto the USB-Stick tells me though that the USB Stick is too small for a Ubuntu installation (8.6 GB are needed).

I read up on making a persistent Live USB Stick, that basically still has the "Try Ubuntu" stuff, but with persistent data, but a simple, small, bootable installation of Ubuntu onto that small device that I can customize until everything works like I need it to and then simply copy the Stick with dd onto it's brethren is all I need.

How do I do that?

I need a desktop environment, browser, file browser, nothing more, most system tools or usability services (cloud storage, auto update, backup etc.) are not needed.

Here is what I did so far:

I created a new virtualbox VM with a 16 GB virtual hard drive. I loaded up the Ubuntu 16.04 (because of respin) and installed a normal system on it.

I removed all applications I deemed unnecessary for our use-case: libreoffice, all gnome-games, checkbox, diagnostic-tools, ubuntu-software-center, webbrowser-app, etc.

I then installed respin with all dependencies that were mentioned in some posts here on askubuntu.

I then used the ubuntu system disk creator thingy program to write the .iso to the usb-stick.

Booting from that usb-stick neither works for a custom bootloader-VM nor for my own laptop. I had to activate legacy boot options and even then I only reached the Ubuntu-Boot-Progress-Bar where the system froze.

At least the Ubuntu 17.04 Install .iso boots on my EFI System without any hickups. How do I create an iso that does that?

Best Answer

Mkusb will produce a flash drive with FAT32 boot partition, ISO9660 read only OS partition, EXT4 casper-rw persistence partition and a NTFS Linux/Windows data partition, that will fit on a 4GB drive

After making a drive to suit your requirements you can make a .img clone of your drive and install it using image writer in Windows or mkusb/dd in Ubuntu.

Link - https://help.ubuntu.com/community/mkusb