[HowTo] Write Manjaro ISO to USB - bootable USB - no wasted space

Manjaro ISO

From time to time the question is raised on how an ISO is written to USB - especially large capacity USB.

Why can't I use the remaining space on my 32GB USB?

This is because Manjaro ISO is a ISO9660 cd-rom file system and such filesystem is immutable - you cannot change it. As such a 2GB ISO makes it impossible to use the excess space for anything - it just sits there unused.

So what can we do?

The choices

  1. ventoy
  2. Manjaro on-a-stick
  3. Multi Boot USB

1. ventoy

ventoy is a set of small binaries compiled from various open source projects - most notably grub and exfat.

It is also available for Windows from the ventoy web

It installs bootloader for efi and mbr and formats the remaining part of the device using exfat.

Copy your ISO files to the partition and boot the your system from the stick. ventoy locates all ISO files and presents them the same manner as below script.

Then you select the ISO to boot. It is even simpler than below method.

Install the package from the repo

pamac install ventoy

When done run the script to display your options

ventoy

Locate your usb stick

lsblk

Then initialize the stick (one time operation)

sudo ventoy -i /dev/sdy

When done the disk is available in your file manager - copy your ISO files to the stick.

:exclamation: Eject the stick using the eject button in your file manager and wait. Depending on the number of ISO, the speed and quality of your USB disk it will take a long time to complete. Have patience ... patience - only when the USB disappears from your file manager you can remove it.

You can use this method for Windows ISO too

2. Manjaro on a stick

One way of doing this is creating a Manjaro installation on USB with an added script for booting ISO directly from Grub.

Later I will describe a stand-alone solution based on the same script used in above article.

3. Multi Boot USB

With the script it is insanely easy to create a stick that boots a variety of ISOs. And Arch based ISOs work extremely well - including Manjaro.

You can download the collection of scripts as an archive or your can clone from Github - what ever you prefer. This guide uses git.

Install git - if you don't have it

❯ sudo pacman -Syu git

Clone the repo

❯ git clone https://github.com/aguslr/multibootusb
Cloning into 'multibootusb'...
...

Navigate into the repo folder

❯ cd multibootusb

To get an idea of what the script is doing

❯ ./makeUSB.sh -h
Script to prepare multiboot USB drive
Usage: makeUSB.sh [options] device [fs-type] [data-size]

 device                         Device to modify (e.g. /dev/sdb)
 fs-type                        Filesystem type for the data partition [ext3|ext4|vfat|ntfs]
 data-size                      Data partition size (e.g. 5G)
  -b,  --hybrid                 Create a hybrid MBR
  -c,  --clone                  Clone Git repository on the device
  -e,  --efi                    Enable EFI compatibility
  -i,  --interactive            Launch gdisk to create a hybrid MBR
  -h,  --help                   Display this message
  -s,  --subdirectory <NAME>    Specify a data subdirectory (default: "boot")

The default fs-type is vfat.

The data-size is not defined. The data-size option is only useful if you want to set aside space for a persistent storage partition. The storage space for ISO files is then limited to the specified size of e.g. 5G.

When you use the data-size option - the remainder of the USB is left untouched. To be able to actually use the space you will need to manually create a partition using the remaining space. One example is a LUKS encrypted container for your sensitive data.

Remove USB and list devices

❯ lsblk -la 

Insert USB and do it again - note the added device and create the USB - using vfat makes the device visible in Windows too.

The following commands will assume your device is /dev/sdy - replace the device name with the device name from your system.

NOTE: The script prints each command to the console before executing - so you can follow what the script is currently doing.

The following creates a hybrid USB using vfat

❯ sudo ./makeUSB.sh -b -e /dev/sdy vfat

To create an USB only for Linux use ext4

❯ sudo ./makeUSB.sh -b -e /dev/sdy ext4

Download a Manjaro ISO, open the device in your file manager and copy a Manjaro ISO to the folder /boot/isos on the USB. Use the eject function of your file manager. You can also do it from terminal.

IMPORTANT: Do not remove the device until all buffers are flushed to disk. If you want to make sure the ISO is written correct - checksum verify the resulting ISO on the USB stick.

❯ mkdir ~/usb-multiboot
❯ sudo mount /dev/sdy3 ~/usb-multiboot
❯ cp ~/Downloads/manjaro*.iso ~/usb-multiboot/boot/isos
❯ sync
❯ sudo umount ~/usb-multiboot
❯ sync
  • Boot your system from the USB
  • Select Multiboot >
  • Wait while configuration is read
  • The more ISOs the longer read time

Tips

The stick presumably supports more than 100 different distributions - so the Multiboot > menu takes a while to load - because of the dynamic nature of including the ISOs.

To speed up the initial USB Multiboot configuration - you can remove folders from /boot/grub/mbusb.d/ you don't intend to use.

Issues

If you encounter any issues with the script or the configuration files for booting an ISO - please create an issue at the project's Github page.

Revisions

2020-05-09T07:15:00Z

  • added ventoy
27 Likes

1 issue with multibootusb is that you can't install distros. It gives disk error. But you can use it as a live distro of course.

I have tested the setup and while I can't speak for other distributions - I can say a Manjaro ISO installs correct when launched from an USB created with the multibootusb scripts.

My guess is that the ISO - in your case - is not complete - this can easily happen if you are too eager to pull the stick.

Always ensure data has been flushed to disk - if you don't it will create weird issues.

You could run a checksum verification on the ISO after copying to the stick. This will ensure errors are catched at an early state.

1 Like

Thank you for this tutorial. I had success on my first try but forgot to indicate data-size. Another try gave me what I wanted - 6G of isos and 10G avail for data.
Used:

sudo ./makeUSB.sh -b -c -e 6G /dev/sdb vfat  

Cheers!

1 Like

Now realized that multibootusb that I used was different than yours.

Forum kindly sponsored by