In order to install the operating system, most of us (including me) often create a bootable USB device from the ISO file. To achieve this, there are many free applications available in Linux. Even in the past we wrote a few utility introduction of this article.
Everyone uses different applications, each application have their own characteristics and functions. In these applications, some applications are in CLI program, some applications are the GUI.
Today we will discuss the utility called BootISO of similar tools. It is a simple bash script that allows users to create a bootable USB device from the ISO file.
Many Linux administrators dd
command to open create a bootable ISO, it is a well-known native method, but at the same time, it is also a very dangerous command. Therefore, be careful when you use dd
the time to perform some action command.
Suggested Reading:
◈ Etcher: create a bootable USB drive from an ISO image in a simple way the SD card & ◈ to create a bootable USB drive from an ISO mirror dd command on LinuxWhat is BootISO
BootISO is a simple bash script that allows users to securely create a bootable USB device from an ISO file, which is written in bash.
It does not provide any graphical user interface but offers a number of options, allowing beginners to Linux smoothly up to create a bootable USB device. Because it is an intelligent tool that can automatically select the USB devices connected to the system.
When the system has multiple USB devices are connected, it will print out the list. When you manually select another hard disk instead of USB, in this case, it will exit safely, and does not write anything on the hard disk.
This script will check the dependencies and prompts the user to install, it works with all package manager, such as apt-get, yum, dnf, pacman and zypper.
BootISO function
◈ check whether it is the right choice of ISO mime type. If not, then quit. ◈ If you select any other disk other than the USB device (local hard disk), BootISO will automatically exit. ◈ When you have multiple drives, BootISO allows users to select the USB drive you want to use. ◈ before erasing the partition and USB devices, BootISO will prompt the user for confirmation. ◈ BootISO will properly handle any errors from a command, and exits. ◈ BootISO quit when they encounter problems will call a cleanup routine.How to install BootISO in Linux
There are several methods available to install BootISO in Linux, but I recommend that you use the following method to install.
$ curl -L https://git.io/bootiso -O
$ chmod +x bootiso
$ sudo mv bootiso /usr/local/bin/
Once BootISO has been installed, run the following command to list the available USB devices.
$ bootiso -l
Listing USB drives available in your system:
NAME HOTPLUG SIZE STATE TYPE
sdd 1 32G running disk
If you only have a USB device, simply run the following command to create a bootable USB device from an ISO file.
$ bootiso /path/to/iso file
$ bootiso /opt/iso_images/archlinux-2018.05.01-x86_64.iso
Granting root privileges for bootiso.
Listing USB drives available in your system:
NAME HOTPLUG SIZE STATE TYPE
sdd 1 32G running disk
Autoselecting `sdd' (only USB device candidate)
The selected device `/dev/sdd' is connected through USB.
Created ISO mount point at `/tmp/iso.vXo'
`bootiso' is about to wipe out the content of device `/dev/sdd'.
Are you sure you want to proceed? (y/n)>y
Erasing contents of /dev/sdd...
Creating FAT32 partition on `/dev/sdd1'...
Created USB device mount point at `/tmp/usb.0j5'
Copying files from ISO to USB device with `rsync'
Synchronizing writes on device `/dev/sdd'
`bootiso' took 250 seconds to write ISO to USB device with `rsync' method.
ISO succesfully unmounted.
USB device succesfully unmounted.
USB device succesfully ejected.
You can safely remove it !
When you have multiple USB devices, you can use the --device
option to specify the name of your device.
$ bootiso -d /dev/sde /opt/iso_images/archlinux-2018.05.01-x86_64.iso
By default, BootISO use the rsync
command to execute all of the action, if you want to use the dd
command replace it, use the following format.
$ bootiso --dd -d /dev/sde /opt/iso_images/archlinux-2018.05.01-x86_64.iso
If you want to skip the mime type checking, BootISO utility with the following options.
$ bootiso --no-mime-check -d /dev/sde /opt/iso_images/archlinux-2018.05.01-x86_64.iso
Add the following option to skip the confirmation BootISO in front of the user to erase and partition the USB device.
$ bootiso -y -d /dev/sde /opt/iso_images/archlinux-2018.05.01-x86_64.iso
Together -y
with the option to enable automatic selection of USB devices.
$ bootiso -y -a /opt/iso_images/archlinux-2018.05.01-x86_64.iso
To know more BootISO options, run the following command.
$ bootiso -h
Create a bootable USB from any ISO securely.
Usage: bootiso [...]
Options
-h, --help, help Display this help message and exit.
-v, --version Display version and exit.
-d, --device Select block file as USB device.
If is not connected through USB, `bootiso' will fail and exit.
Device block files are usually situated in /dev/sXX or /dev/hXX.
You will be prompted to select a device if you don't use this option.
-b, --bootloader Install a bootloader with syslinux (safe mode) for non-hybrid ISOs. Does not work with `--dd' option.
-y, --assume-yes `bootiso' won't prompt the user for confirmation before erasing and partitioning USB device.
Use at your own risks.
-a, --autoselect Enable autoselecting USB devices in conjunction with -y option.
Autoselect will automatically select a USB drive device if there is exactly one connected to the system.
Enabled by default when neither -d nor --no-usb-check options are given.
-J, --no-eject Do not eject device after unmounting.
-l, --list-usb-drives List available USB drives.
-M, --no-mime-check `bootiso' won't assert that selected ISO file has the right mime-type.
-s, --strict-mime-check Disallow loose application/octet-stream mime type in ISO file.
-- POSIX end of options.
--dd Use `dd' utility instead of mounting + `rsync'.
Does not allow bootloader installation with syslinux.
--no-usb-check `bootiso' won't assert that selected device is a USB (connected through USB bus).
Use at your own risks.
Readme
Bootiso v2.5.2.
Author: Jules Samuel Randolph
Bugs and new features: https://github.com/jsamr/bootiso/issues
If you like bootiso, please help the community by making it visible:
* star the project at https://github.com/jsamr/bootiso
* upvote those SE post: https://goo.gl/BNRmvm https://goo.gl/YDBvFe
Author: Prakash Subramanian topics: lujun9972 Translator: robsean proofread: wxy
This article from the LCTT original compiler, Linux China is proud