Boot Linux from the ISO file

AIO Boot supports booting most Linux distributions from ISO files. Just copy the ISO file to a folder and boot it from Grub2.

AIO Boot

AIO Boot supports booting Linux as well as other utilities from ISO, WIM, VHD, IMG and IMA files.

  1. Just copy the ISO, WIM, VHD, IMG and IMA files to the /AIO/Files directory or its subfolders.
  2. From the main menu of Grub2, press the j key for quick access to the “Boot from ISO, WIM, IMG, VHD and IMA files” menu.
  3. Grub2 will list the files that it supports, and then you just select them to boot. The script only lists the files in the /AIO/Files directory and its subfolders. It will be very slow if you list all directories on your computer. For files outside of this folder, you can boot them through the Grub2 File Manager.

For Linux ISO files, the script will automatically detect which distributions it supports. List tested (incomplete):

  • 4MParted.
  • Arch Linux.
  • Bitdefender.
  • CentOS.
  • Clonezilla.
  • Debian Live.
  • Fedora.
  • Gentoo.
  • Gparted.
  • Kali Linux.
  • Linux Lite.
  • Linux Mint.
  • Manjaro.
  • MiniTool Partition Wizard 9.1.
  • Slackware Live Edition.
  • Ubuntu.
  • WifiSlax 4.12.
  • WifiSlax64.
  • antiX.
  • gNewSense.
  • openSuse.

If not detected, the script will give you the option to boot the file with Grub4dos and MemDisk (which does not support UEFI). I used wimboot to boot WinPE 7/8/8.1/10 (.wim) and NTBOOT to boot WinPE XP (.wim) and VHD (.vhd, .vhdx) through Grub4dos. You are also provided with a menu to open files with Loopback.

Boot Linux from ISO file

However, some machines can not boot Linux from the ISO file, it needs to extract. Use AIOCreator.exe to integrate, this tool always uses extraction method if possible. It also supports creating persistent mode for supported Linux distributions. Only use ISO when you can not run AIOCreator.exe, which is useful if you are using a Linux environment.

loopback.cfg

If your ISO file contains the file /boot/grub/loopback.cfg, this ISO file is designed to allow it to boot from an ISO file.

What is a loopback.cfg? A loopback.cfg is basically just a grub.cfg that’s designed to be used to boot a live distribution from an iso file on a filesystem rather than an actual physical CD.

Read more about loopback.cfg here.

How to boot Linux from ISO file using loopback.cfg?

There are many Linux distributions that support loopback.cfg to use Grub2 to boot itself through an ISO file. The most popular are Ubuntu and Ubuntu-based distributions such as Linux Mint … recently, Debian 9 and Manjaro 17 also supported. All of these distributions can use the following menu:

menuentry "TITLE" {
	iso_path=PATH
	export iso_path
	search --set=root --file $iso_path
	loopback loop $iso_path
	root=(loop)
	configfile /boot/grub/loopback.cfg
	loopback --delete loop
}
  • TITLE: Grub2 menu name.
  • PATH: the path to your ISO file.
  • /boot/grub/loopback.cfg: the path to the loopback.cfg file in the ISO file.

You can add this menu to Grub2 of AIO Boot or Ubuntu, Linux Mint… The Grub2 menu of AIO Boot is located at /AIO/Menu/Main.cfg. Here are some Linux distributions that support loopback.cfg.

Ubuntu

Includes Kubuntu, Edubuntu, Xubuntu, Mythbuntu, UbuntuStudio, Lubuntu, Ubuntu GNOME, Ubuntu Kylin, Ubuntu MATE and Ubuntu Budgie. And the distributions are based on Ubuntu.

menuentry "Ubuntu 16.04 64-bit" {
	iso_path="/ubuntu-16.04.3-desktop-amd64.iso"
	export iso_path
	search --set=root --file $iso_path
	loopback loop $iso_path
	root=(loop)
	configfile /boot/grub/loopback.cfg
	loopback --delete loop
}

Linux Mint

menuentry "Linux Mint 18.2 64-bit" {
	iso_path="/linuxmint-18.2-cinnamon-64bit.iso"
	export iso_path
	search --set=root --file $iso_path
	loopback loop $iso_path
	root=(loop)
	configfile /boot/grub/loopback.cfg
	loopback --delete loop
}

Debian 9

menuentry "Debian 9.2.0 XFCE 64-bit" {
	iso_path="/debian-live-9.2.0-amd64-xfce.iso"
	export iso_path
	search --set=root --file $iso_path
	loopback loop $iso_path
	root=(loop)
	configfile /boot/grub/loopback.cfg
	loopback --delete loop
}

Manjaro 17

Starting from Manjaro 17.0.6, I have reported the issue of previous versions here. Manjaro is based on Arch Linux, you need to specify the partition that contains the ISO file.

menuentry "Manjaro XFCE 17.0.6 64-bit" {
	iso_path="/manjaro-xfce-17.0.6-stable-x86_64.iso"
	export iso_path
	search --set=root --file $iso_path
	probe -u -s rootuuid $root
	export rootuuid
	loopback loop $iso_path
	root=(loop)
	configfile /boot/grub/loopback.cfg
	loopback --delete loop
}

 

3 thoughts on “Boot Linux from the ISO file”

  1. hi,
    great software, i’ve a question:
    how can i point the iso_path to another drive and directory, where all my iso’s are stored?
    Is it possible to use this drive and directory for the autoiso feaature?

    greets

    1. Hi,

      If you want to point iso_path to another path, just change the path of iso_path. If you want to point iso_path to another drive, you can use the search command.
      set iso_path=""
      search -s root -f $iso_path

      Autoiso feaature: you can try File Manager in latest version.

Leave a Reply

Your email address will not be published. Required fields are marked *