What is a boot media device?

A boot media device is a type of storage device that contains bootable data to start up a computer system. When powered on, a computer looks for a boot device to load its operating system and other essential software. Some common examples of boot media devices include hard drives, USB flash drives, CDs, and DVDs.

What does a boot device do?

The primary function of a boot device is to load the operating system kernel and bootloader programs so the computer can launch its operating system. Without a boot device, a computer cannot start as it has no instructions on where to find the operating system files.

Here is an overview of the boot process using a boot device:

  1. When first powered on, the computer runs a Power-On Self Test (POST) to ensure its hardware components are working properly.
  2. After passing POST, the Basic Input/Output System (BIOS) or Unified Extensible Firmware Interface (UEFI) firmware searches for a valid boot device.
  3. The firmware checks the configured boot order to see if the first boot device contains a bootloader program.
  4. If found, the bootloader is executed. Common bootloaders include GNU GRand Unified Bootloader (GRUB) or Windows Boot Manager.
  5. The bootloader then loads the kernel and critical drivers from the /boot partition on the boot device.
  6. The kernel initializes the operating system’s core components and hardware.
  7. The boot process finishes by launching the operating system’s graphical interface or console.

So in summary, the boot device contains the bootloader and files needed for an operating system to load. Without it, a computer is unable to progress past its initial POST.

Common types of boot media

There are several storage devices and media that can serve as a computer’s primary boot device:

Hard disk drives (HDDs)

The most common boot device is a hard disk drive or HDD. HDDs have large storage capacities, are affordable, and provide good performance. The bootloader and operating system files are installed to specific partitions on an HDD. They also persist even after rebooting, allowing the OS to be regularly loaded from the HDD.

Solid state drives (SSDs)

SSDs are a type of flash memory drive with no moving parts. Like HDDs, operating systems can be installed and booted from SSDs. Because SSDs have much faster read/write speeds than HDDs, they significantly reduce OS boot time.

USB flash drives

USB flash drives can be configured as bootable devices by installing an OS image and bootloader files to them. Their portability makes them handy for installing or troubleshooting operating systems on different computers.

Optical discs (CDs/DVDs/Blu-rays)

Optical discs like CDs, DVDs, and Blu-rays can also be made bootable. They are commonly used to install new operating systems or run diagnostic tools. Bootable discs contain the installer and a temporary OS environment that loads from the CD/DVD drive.

Network boot

Through technologies like PXE and iSCSI boot, servers on a network can host boot images that client computers can access and start up from over the network. This allows organizations to deploy standardized OS installations on a large number of machines.

BIOS/UEFI Boot Menu

The BIOS/UEFI firmware includes a boot menu option that lets you select a temporary boot device. This allows picking between multiple boot media options for a one-time boot.

Making a device bootable

A storage device needs to contain a few essential components to make it a bootable medium for a PC:

  • Bootloader: Such as GRUB or NTLDR, this program locates the OS kernel and starts the boot process.
  • OS kernel: The core file that initializes the operating system.
  • Device drivers: Hardware drivers the OS needs to access the boot device and other components.
  • Filesystem: An organized structure to store the OS system files.

To make a device bootable, an OS installer or disk imaging tool is typically used. These tools copy over the bootloader, OS files, drivers, and configured partitions to the drive.

For example, to make a USB flash drive bootable, you can use utilities on Windows, Mac, or Linux that copy the necessary boot files to the drive. The USB then becomes capable of booting that operating system.

How does the BIOS boot sequence work?

When a computer first powers on, the BIOS firmware initializes the hardware components and looks for bootable devices. But how does it know where to search and in what order?

This boot sequence is configurable in your BIOS settings, under the boot or startup tab. A list of bootable devices detected by the BIOS will be shown, ordered by the configured boot priority. This typically defaults to:

  1. Internal hard drives
  2. CD/DVD drive
  3. USB drives
  4. Network boot protocols

The BIOS will try booting from the first item on this list. If no bootable media is found there, it continues down the list until a valid boot device is detected.

Being able to adjust boot order is helpful for selecting between multiple operating systems or bootable devices plugged into your computer. The first device on the list becomes the primary boot source for startup.

How are boot devices configured on Linux?

On Linux-based operating systems, the GRUB bootloader is typically used to manage boot devices and configurations. Its main configuration file is /boot/grub/grub.cfg.

When installing Linux, GRUB is automatically set up to boot the OS from the primary hard drive. The grub.cfg file specifies the drive’s partitions and kernel location to load on start up.

You can edit this file to change the default boot device, add new OS entries, modify boot parameters, etc. However, it is recommended to instead edit the /etc/default/grub file and run update-grub. This rebuilds grub.cfg with your changes.

Some common examples of changing Linux boot devices:

  • Edit the GRUB_DEFAULT variable to select a different drive/partition or OS stanza to boot by default.
  • Add extra menu entries pointing to additional boot partitions.
  • Change the boot drive from (hdX,Y) to a UUID reference that persists if drive letters change.

Using the GRUB boot menu, you can also temporarily override the boot device for a single startup.

Using boot devices for system recovery

A key use case for boot media is recovery when a computer’s OS becomes corrupted or unbootable.

For example, a system repair disc like the Windows recovery environment can be used to boot a computer and diagnose startup issues. You can access system recovery tools without loading the installed OS.

Bootable media is also indispensible for IT support and administration. Technicians often carry USB drives or CDs with bootable disk images to troubleshoot computers. Being able to boot to external media allows fixing issues even if the internal OS is damaged.

Some examples of bootable recovery tools include:

  • Windows installation media for the System Recovery Options.
  • Linux live CD/USB distributions for rescue mode and disk repair.
  • Hiren’s BootCD with various diagnostics and hard drive utilities.
  • Hardware manufacturer pre-boot tools for system testing.

Booting from external media enables powerful recovery options that help recover data and repair drives. They provide access to system tools outside of the installed OS environment.

Using PXE network booting

Preboot eXecution Environment (PXE) offers another medium for booting besides local drives. PXE uses a client/server architecture to allow PCs to boot over the network.

Here is how PXE network booting works:

  1. Client sends DHCP request to server to get assigned IP address
  2. DHCP server sees request is from PXE client, and sends boot image location
  3. Client downloads boot image files from tftp server
  4. Boot image starts and loads operating system

PXE boot has multiple benefits for businesses:

  • Streamlined OS deployments across many client machines
  • Remote installation of Windows, Linux, or custom images
  • Booting diskless workstations (thin clients)
  • Running maintenance tasks on machines without local boot

Overall, PXE network booting enables centralized management and delivery of boot images across an organization.

Booting from iSCSI SANs

Another enterprise-focused boot technology is iSCSI boot. This allows booting client machines from an iSCSI storage area network (SAN).

With iSCSI boot, the SAN provides an iSCSI target that computers can access at boot time. This iSCSI target emulates a local boot device by serving an OS image to initialize the clients.

Benefits of booting from iSCSI SANs include:

  • Centralized boot images for multiple servers
  • High availability from redundant SANs
  • Scalable deployment of new machines
  • Easy disaster recovery of boot volumes

Overall, iSCSI boot helps organizations streamline maintenance and reduce costs for large server deployments.

Booting from the cloud

Cloud platforms now provide virtualized boot devices as a service. Cloud boot devices work similarly to booting from local drives or networks.

For example, Amazon Elastic Block Store (EBS) can be used to create boot volumes for EC2 instances. Microsoft Azure also lets you attach virtualized boot diagnostics disks.

Benefits of booting from cloud devices include:

  • Faster instance deployment time
  • Persistence of boot images across instances
  • Launching different OS types from the same image
  • Booting into a pre-loaded configuration

Cloud boot devices help automate and streamline launching virtual machines in the cloud.

Conclusion

In summary, a boot media device contains the OS bootloader and files needed to initialize a computer system. Common physical boot media includes hard drives, USB drives, CD/DVDs, etc. These can be made bootable using disk imaging tools.

At startup, the computer’s BIOS loads the bootloader from configured boot devices in a set order. This kicks off the boot process to launch the operating system.

Beyond physical media, technologies like PXE, iSCSI, and cloud boot devices provide ways to boot over networks and virtualized infrastructure. Boot devices remain essential components for reliably starting computers and recovering systems when problems occur.