Posted on
Operating Systems

Installation Media Preparation: ISO Downloads and Bootable USBs

Author
  • User
    Linux Bash
    Posts by this author
    Posts by this author

Installation Media Preparation: ISO Downloads and Bootable USBs for Linux

When preparing to install a Linux operating system, the first step begins long before you reboot your computer—you must download the appropriate installation media and create a bootable drive. Whether you're a seasoned Linux enthusiast or a first-time installer, understanding how to properly download ISO files and create bootable USBs is essential. This guide will walk through the process of obtaining the necessary ISO files and using them to create bootable USB drives using Linux Bash commands.

Step 1: Choose Your Linux Distribution

The Linux landscape is vast, with many distributions (distros) tailored for different needs such as user-friendliness (Ubuntu, Linux Mint), security (Tails, QubesOS), or customization (Arch, Gentoo). Each distro provides an ISO image, essentially a snapshot of the necessary software to run the system.

Step 2: Downloading the ISO File

Once you've selected your distro, visit the official website and navigate to its download section. This will usually provide options based on different needs like stable releases, testing releases, and sometimes minimal installations. Make sure to choose the version that suits your system’s architecture (typically 32-bit or 64-bit):

For demonstration, let’s say we are downloading Ubuntu. We would use the following commands in the terminal:

wget https://releases.ubuntu.com/22.04/ubuntu-22.04-desktop-amd64.iso

Replace the URL with the link to the ISO file from your selected distro’s download page.

Step 3: Verify the ISO (Optional but Recommended)

After downloading, it's a good security practice to verify your ISO to ensure it's not been tampered with. Most Linux distros provide checksums like SHA256. Using the command line, you can validate your download with a simple comparison:

echo "expected-checksum-string  ubuntu-22.04-desktop-amd64.iso" | sha256sum -c

Ensuring the expected-checksum-string matches the one provided on the download page of your chosen distro.

Step 4: Prepare the USB Drive

Insert a USB drive that is at least 4GB in size. Note: This process will erase its content, so back up your data!

First, identify your USB by listing all disk partitions:

lsblk

Look for your USB drive which might typically be listed as /dev/sdb or /dev/sdc (it varies), and note the device identifier.

Step 5: Creating a Bootable USB

We will use a tool called dd, a powerful Unix utility known for its efficiency in copying and converting files. Be extremely careful with this command as selecting the wrong disk could wipe data from your computer.

Here is how to use it:

sudo dd if=path_to_your_iso/ubuntu-22.04-desktop-amd64.iso of=/dev/sdX bs=4M status=progress oflag=sync

Make sure to replace /dev/sdX with your actual USB drive location and path_to_your_iso with the actual path where your ISO file is stored. The bs=4M sets the block size to 4MB, which helps in speeding up the process. status=progress will show the progress of the process.

Conclusion

Once the dd process completes, you have a USB drive ready to boot into a Linux installation. Restart your computer and enter the boot menu (often accessed using keys like F12, F2, ESC depending on your motherboard), and select your USB drive to begin the installation process.

Creating a bootable USB from an ISO file in Linux is a valuable skill, whether you're deploying multiple systems, running a home server, or simply experimenting with different Linux distros. By following these steps, you can ensure a smooth, secure start to your Linux installation journey. Happy installing!