How To Install Ubuntu From Usb

How To Install Ubuntu From Usb

Reading time1 min
#Linux#OpenSource#Technology#Ubuntu#Installation#USB

Installing Ubuntu from USB: Fast, Repeatable, and Hardware-Agnostic

By 2024, deploying Ubuntu via USB has become the standard—DVD drives are nearly extinct in datacenter and office hardware. PXE/network-based installations remain powerful but require more infrastructure than many scenarios justify. Here’s the workflow I use for provisioning desktops, troubleshooting laptops with borked partitions, or quickly standing up sandbox environments.


Pre-Deployment Checklist

A mistake here can lead to accidental data loss. Validate the following before proceeding:

  • USB Flash Drive: 4 GB minimum. USB 3.0 strongly recommended—write speeds matter.
  • Ubuntu ISO: Always fetch the latest LTS (currently 22.04.4 as of this writing) unless you need bleeding-edge kernels. Download verified images directly:
    https://ubuntu.com/download/desktop
    Side note: SHA256 hash validation is non-optional in secure environments.
  • Image writing utility:
    • Windows: Rufus
    • macOS: balenaEtcher or dd
    • Linux: dd, or for GNOME-based systems, Startup Disk Creator
  • Target machine, data fully backed up.
  • BIOS/UEFI credentials (if Secure Boot or admin features are enabled).

1. Prepare the USB: Write the ISO

The practical differences between image writers usually boil down to how they handle partition schemes and UEFI bootloaders. For UEFI-only laptops, always select GPT. Legacy hardware? Use MBR.
Here’s the routine for the three main OSes:

Windows (Rufus)

  1. Insert USB, launch Rufus (v4.3 recommended as of 2024).
  2. Device: select USB target.
  3. Boot selection: select Ubuntu ISO.
  4. Partition scheme: GPT (UEFI) for modern machines. MBR for legacy BIOS; don’t guess—check your system.
  5. File system: Leave default (FAT32).
  6. Click Start. Confirm data will be wiped.

macOS (balenaEtcher or dd)

  • Graphical:
    1. Open balenaEtcher, select ISO, choose USB, press Flash.
  • Terminal:
    Find USB with diskutil list.
    Unmount:
    diskutil unmountDisk /dev/diskN
    sudo dd if=~/Downloads/ubuntu-22.04.4-desktop-amd64.iso of=/dev/rdiskN bs=4m
    sudo sync
    
    Replace N with the correct disk number. Forgetting rdisk instead of disk slows writes >10x.

Linux

  • Same approach as macOS but with device names from lsblk or fdisk -l:
    sudo dd if=./ubuntu-22.04.4-desktop-amd64.iso of=/dev/sdX bs=4M status=progress
    sync
    
    of must point to the root device, not a partition (e.g., /dev/sdb, not /dev/sdb1). Gotcha: Using the wrong device wipes the wrong disk. Triple-check before pressing enter.

2. Boot: USB First

Modern systems support F12 (Dell), F10 (HP), or ESC (Lenovo) to select the boot override menu, but referencing your motherboard manual is advised.

  • Insert the bootable USB.
  • Reboot, open BIOS/UEFI boot menu.
  • Select the USB drive.
    If it fails to display, check for Secure Boot restrictions (“Secure Boot violation” is a common error), or try another USB port/controller.

3. Installation: Partitioning and Pitfalls

Once at the GRUB prompt, choose Try Ubuntu if you need diagnostics or hardware validation; otherwise proceed with Install Ubuntu.

Key setup steps:

  • Keyboard Layout: Some laptops (e.g., Dell XPS series) default to international layouts—verify this to avoid login issues later.
  • Networking: For Wi-Fi hardware, carry a USB Ethernet adapter. Out-of-tree Wi-Fi chipsets (e.g., Realtek RTL8821CE) sometimes won’t work in live mode until post-install kernel update.
  • Installation type:
    • Erase disk and install Ubuntu: wipes all existing data—no undo.
    • Install alongside existing OS: auto-shrinks partitions, but review the plan—occasionally, dual-boot “auto” tools misdetect encrypted Windows setups.
    • Something else: advanced/manual mode. Here’s where you set up LVM, full-disk encryption, or custom mount points (/var on a separate partition, for stateful apps).
  • LUKS Encryption / LVM: Recommended for laptops or mobile devices with sensitive data.

Timezone, username, password: Standard prompts. For multi-user machines, lock down sudo access—rookie mistake is to leave the primary account password as “ubuntu”.


4. Finalization and First Boot

At “Installation Complete”, remove the USB (failure to do so occasionally boots you back to live ISO).
On boot, check for the following:

  • Grub menu appears as expected. If not, UEFI/Legacy boot setting mismatch likely.
  • Networking functional. If not, check dmesg for firmware or driver errors.
  • System logs (journalctl -b) free of severe errors.

5. Additional Notes & Gotchas

  • UEFI NVRAM quirks: Some Lenovo ThinkPads occasionally require explicitly setting the UEFI boot order after install—use efibootmgr from live media if Ubuntu isn’t detected.
  • Secure Boot: To install unsigned drivers (e.g., proprietary NVIDIA), Secure Boot may need temporary disabling.
  • USB write errors: The classic Input/output error during dd can indicate a failing USB stick—always verify writes via cmp or attempt to boot before proceeding to wipe the target disk.
  • Non-obvious tip: On unreliable older PCs, mixing Ventoy as a multi-ISO loader with standard “dd” written sticks sometimes recovers failed boots.

Table: Quick Reference OS/Tool Matrix

Host OSRecommended USB ToolUEFI SupportNotes
WindowsRufusYes (GPT/MBR)Customizable settings
macOSbalenaEtcher, ddYesdd: advanced, beware typos
Linuxdd, Startup DiskYesdd: fastest, minimal overhead

Wrapping Up

Physical USB installs remain the most direct approach for most workstation and laptop deployments. The described workflow is robust, repeatable, and compatible across virtually all hardware not subject to vendor lockdown (e.g., ARM Macs—unsupported).
Always check post-install logs; don’t stop at seeing a login screen. Issues like missing firmware or misconfigured partitions often don’t appear until the first kernel update. For heavily customized environments or automated mass deployment, consider progressing to tools like PXE/netboot or image-based solutions (FOG/Clonezilla) as logical next steps.

Have a unique hardware scenario? Sometimes the “standard” workflow diverges due to quirky BIOS implementations or edge-case SSDs—document those gotchas and re-test your USB workflow with every new LTS release.


Quick sanity check:

lsblk
sudo fdisk -l
journalctl -b | grep error

These verify you’re not about to overwrite the wrong disk, and that post-install state is healthy. If something looks off, pause and inspect before proceeding.