Bootable Linux / Ubuntu USB Flash Drive
I’ve often been stuck between different operating system needs, Windows vs. Linux. Not everything works the same on those two system (nevermind the Mac/iOS stuff). I was normally a Windows developer, until I got burnt hard trying to use Meteor.js on a critical project. At that time, you couldn’t use Meteor and a remote database on a Windows machine without crashing. On the other hand, a tool I often use is Solidworks for CAD design, and there is no way to run that on Linux. You just can’t win.
So now that solid state USB drives have come down in price considerably, I thought I’d leave my laptop computer in Windows 10 and create a handy bootable 128GB USB flash drive with Ubuntu Linux. I’ve tried this before with very mixed results. I did see this recent posting over at askUbuntu.
The steps were pretty straightforward:
- Create a bootable Live Ubuntu USB installer tool. I downloaded Ubuntu 15.10 desktop/laptop 64bit version to my desktop computer. I then copied that .iso file over to a flash drive using unetbootin for windows. The unetbootin tool is very handy for pushing any .iso file onto a USB flash drive.
- Format a 128 USB flash drive as a single partition NTFS. I got stuck here on other things, the NTFS worked very smoothly. Definite No Go on exFAT… the linux live boot wouldn’t recognize the drive in that format.
- Boot the laptop to the live Ubuntu install drive.
- The next step is pretty important. Since native Windows 8 machines, the Windows hardware world has shifted from BIOS to UEFI for boot up control. I will admit, I really don’t understand the details, but I know I’ve wasted a whole lot of time doing things wrong. I was convinced for my machine, I wanted to be fully UEFI compatible.
- Start the drive with the selection “Try Ubuntu”. After Ubuntu loads, open up a terminal window:
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
- Verify you have a UEFI response.
- Insert your 128GB NTFS USB drive
- When you’re ready to install Ubuntu, double-click on the icon on your desktop: ‘Install Ubuntu’.
- At some point in the process you will be prompted for “Installation type”. Choose “Something Else”. When asked for a target device choose the 128GB flash drive.
- IMPORTANT: In the option labelled location to install bootloader don’t forget to set it to your flash drive.
- I’ve had issues before when doing this, where during the install to the USB drive, the grub will also detect all OS kernels on all attached devices (like your HDD) and add them to grub. This means an (unintended) modification to the hard drive. The only way I know to prevent this is to remove the hard drive from the laptop before performing the USB installation.
- Note: for my install to prevent a black screen on initial startup, I had to add the ‘nomodeset’ option right before ‘quiet splash’ for my startup options.
I’ve now got a handy bootable Operating System that I can use almost anyplace.