Skip to content

lilyinstarlight/mkusb

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

mkusb

mkusb is a shell script to create ISO multiboot USB flash drives that support both legacy and EFI boot.

NOTE: This project is unrelated to the project at https://help.ubuntu.com/community/mkusb

Requirements

  • grub
  • dosfstools
  • dialog (optional; required if not specifying device on command line)
  • syslinux (optional; only required for FreeDOS)
  • sane environment (util-linux, coreutils, etc.)

Usage

Edit a distros file and an optional label definition and multiple iso definitions in the following format:

label <filesystem label>
iso <iso name> <kernel> <initrd> <boot flags>
iso <iso name> <kernel> <initrd> <boot flags>
...

The boot flags are parsed for %variable% expressions and fills them out to GRUB variables. Currently only %filename% and %label% are supported. Arguments with a space or characters parsed by the shell must be quoted. Most of these arguments can be found by mounting the ISO file and checking the boot parameters in it. Because the distros file is just a shell script, more advanced features can be added like conditionally adding ISO files based on the environment. An example distros file is provided in this repository.

Run the mkusb script in your shell:

$ sudo ./mkusb.sh [distros] [device] [efi partition] [live partition]

If the distros file is omitted, the script will default to a file called 'distros' in the current working directory. If device is omitted, you will be prompted to select from available removable devices. If the partitions are omitted, the device will be formatted to have one EFI system partition and one live images partition.

About

A shell script to create ISO multiboot USB flash drives that support both legacy and EFI boot

Resources

License

Stars

Watchers

Forks

Packages

No packages published