2

friends.

I wanted to ask you how to create a completely universally bootable full ubuntu installation. I am a programming professor and wanted all of my students to be able to have a portable workstation, located in an USB drive. Also, I know that you can install Ubuntu on a USB, but it is not completely universal. I want to be able to boot from any place, at any time, with minimal or no effort (after all, some middle school kids should be able to do it at their home without any help).

Thank you all, and take care.

7
  • 5
    Does this answer your question? How to make a persistent live Ubuntu USB with more than 4GB – Pizza Sep 27 '20 at 22:59
  • 1
    It might help if you tell us what was wrong with what you've done already. I gather you installed Ubuntu (or flavor) to a thumb-drive, was that a live ISO (which isn't an install), live with persistence (near-install), or a real-install. What were the issues? Booting live or installed systems located on thumb-drives can vary on machines due to different setup/security settings on the actual hardware/firmware so completely universel is difficult to achieve. You also didn't mention release details (some releases boot differently on BIOS compared to uEFI, later releases look the same)... – guiverc Sep 27 '20 at 23:23
  • 2
    What exactly is not universal with the liveUSB? (The "Try Ubuntu" option with installation media) Do you need persistence? – Nmath Sep 27 '20 at 23:42
  • 5
    The problem you describe happens most often when you install your bootloader to your HDD instead of your USB. A portable USB of any kind cannot hijack the BIOS, and BIOS determines where to look for the bootloader, which in turn determines which OS will load. – user535733 Sep 27 '20 at 23:48
  • 2
    For a Full install of Ubuntu to USB that will boot in both UEFI and Bios modes, on any computer with suitable hardware , see askubuntu.com/questions/1217832/… The option by Sudodus that uses an image file would be the easiest to implement. This image could be further modified to suit the course requirements. – C.S.Cameron Sep 30 '20 at 3:06
5

Universal Ubuntu Installation for University Course.

There are several requirements for creating a USB that will run on any X86-64 computer

  1. The USB must be able to boot in either BIOS mode or in UEFI mode.

  2. The USB must not contain proprietary drivers specific to the machine it was created on.

  3. The hardware requirements of the USB's operating system must be suitable for the student's equipment. A lighter flavor of Ubuntu might be more suitable if the students are using their own computers

  4. The operating system must be reproducible on each USB drive.

Creating a reproducible operating system image file

A full install of Ubuntu to USB (or internal drive) can be modified to suit the course requirements, including any extra programs, hardware drivers, etc required. The USB can be created using boot partitions that will allow booting in both BIOS and UEFI modes as shown here: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step.

Step by step method for creating proprietary USB image

The creator of mkusb has been perfecting the use of image files for creating Full installs of Ubuntu on USB. Download Image file is 1.5GB, (It is15GB once extracted to USB).

  • Download https://phillw.net/isos/linux-tools/uefi-n-bios/dd_unb_ubuntu-20.04_15GB_2020-09-07_with-proposed.img.xz. MD5Sum can be found here: https://phillw.net/isos/linux-tools/uefi-n-bios/md5sum.txt.asc

  • Decompress file using 7Zip if necessary.

  • Flash to USB using Rufus, Etcher, Image Writer, etc.

  • Password is "changeme", boot the USB and Change it.

  • Modify the OS as required for the course, changing splash screens, wall paper, tool bars, browsers, home pages, and adding programs, contacts, drivers, networks, etc.

  • A new image can then be created using Gnome-Disks, Rufus, Clonezilla or other cloning software.

  • The new image can be flashed to USB using Rufus, Etcher or Image Writer in Windows and mkusb, Etcher or Gnome-Disks in Linux. Etcher can install to multiple USB drives at the same time, limited only by the number of USB ports on the computer or hubs.

Note that the USB's produced in this way will all have identical UUID's. these can be quickly changed using GParted. UUID's shown in fstab should be changed to suit.

2
  • is it possible for me to boot this into any computer without having to install EFI Boot or any other program into the computer? So for example, if I want to use one of the computers of the school library, in which the installation process has never been done, can I just boot into the USB in which Ubuntu is installed, just by utilizing the default boot manager that comes in every single computer (like on MacOs or Windows). – Simon Botero aristizabal Oct 11 '20 at 18:06
  • @Simon Botero aristizabal : This Ubuntu installation should run off of any X86-64 64bit computer that meets Ubuntu's minimum hardware requirements: help.ubuntu.com/community/Installation/SystemRequirements. This should be well within the requirements set by the school for it's computer Science classes. There are versions of Ubuntu that will work on Raspberry computers also. – C.S.Cameron Oct 12 '20 at 2:26
3

Installed Ubuntu system

I refer to the answer by C.S.Cameron as a good candidate for this task. (This assumes that we are talking about 'IBM compatible PCs' with Intel or AMD processors and 64-bit architecture. As described by Melebius, you need other software for computers with ARM processors.)

Portability may be an issue and it depends on the computers, where the Ubuntu system is to be used. If a computer needs a proprietary driver (which is not FOSS and cannot be included in a free Linux distro), it should be installed into the system when running in that computer, so you cannot expect a 'one size fits all solution'.

But an installed system (that can boot in both UEFI and BIOS mode) in a fast USB 3 drive is portable between many computers and should be fairly easy to tweak with some proprietary driver for graphics and/or wifi when necessary.

Ubuntu OEM system

You may want to create a master system from the compressed image file and add some program packages, and then create an image to distribute.

A more advanced method would be to create an Ubuntu OEM system and make it boot both in UEFI mode and BIOS mode (and include the program packages that you want), and then create an image to distribute. This way there will be a wizard method to get different computer IDs (for the network) and user IDs in each final installed system.

In this case you (or one of your students) must do the work to make the system on the USB drive independent. The following links and links from them may help.

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

help.ubuntu.com/community/Installation/UEFI-and-BIOS

Persistent live Ubuntu system

If you need not add/modify the system too much, it might also work with a persistent live system, for example created with mkusb, and this solution might be easier to implement.

3

Unfortunately, this is not possible unless you define a meaningful set of supported hardware. The main reason is the hardware on which you might want to run it, can be way too variable.

While C.S.Cameron’s answer probably covers all the x86 PCs, there are other platforms, mainly ARM, which require different binaries. ARM processors can be found on Raspberry Pi’s, Chromebooks, some Windows tablets, and future Macs, for example.

While you can potentially cover all peripheral hardware with one universal installation, you cannot cover different CPU platforms. Different CPU platforms can run the same source code but it must be specifically translated to their respective machine code.

Moreover, different computers use different bootloaders. Even when staying on x86, the way to boot an external USB drive differs among various BIOS/firmware implementations.

3
  • 2
    Taking a quick Google, it appears that most Universities require their students to own either a PC or Mac. In many computer Science classes Macs are not supported. student.engr.ucr.edu/computer-requirement – C.S.Cameron Sep 30 '20 at 9:10
  • 1
    @C.S.Cameron Yes, this was a case of my university, too. However, I’d state that explicitly to be correct. – Melebius Sep 30 '20 at 9:12
  • 2
    Thank you, I have edited to note X86. – C.S.Cameron Sep 30 '20 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.