A POSIX shell script to create bootable USB devices and memory cards
Update the program help to match
Follow manpage guidelines better
Increment version to 1.1.2



You can also use your local clone with git send-email.


A POSIX shell script to create bootable USB devices and memory cards while avoiding accidental formatting of your disks. Its characteristics are:

  • Guided selection of a device to make bootable.
  • Only shows removable devices to avoid formatting your internal disks.
  • Asks to confirm the size of the device to avoid formatting the wrong external USB disk by mistake (e.g. your backup disk).
  • Automatically runs sudo or doas to run dd as the superuser if needed.
  • Images are written using dd.
  • Minimal dependencies.
  • Short and readable code.

I had been using bootiso for a while (thanks bootiso developers!) but found it had too many dependencies and features for my needs so I took inspiration from it and wrote this.


  • A POSIX system with standard utilities (awk, dd, grep, head, printf, read, sed and sh) either from GNU coreutils or busybox.
  • sync either from GNU coreutils or busybox.
  • lsblk from util-linux.

All of them are installed by default on most desktop Linux systems.


Run bootsh passing the image as an argument and follow the prompts. An example bootsh session:

$ bootsh image.iso
NAME    VENDOR   MODEL                SIZE TRAN
sdb     Seagate  BUP_RD               4.6T usb
sdc     SMI      USB_DISK             3.8G usb
mmcblk0                              59.5G
Enter the NAME of one of the above removable devices or press Ctrl+C to exit:

Selected removable device sda with capacity 3.8G
Enter the device capacity (3.8G) to continue or press Ctrl+C to exit:

Writing image image.iso to device /dev/sdc
[sudo] password for user:
Done! You may remove device /dev/sdc


You can install bootsh and its manpage using the provided Makefile. To install system-wide run the following as root:

make install

You can also install them in your home directory using:

env PREFIX=~/.local make install


Copyright 2021-2022 Sotiris Papatheodorou

This program is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

     ooooo  ooooo
     |X  |  |X  |
 ____/X _|__/X  |
/      /        |
====== ==========