0

I am trying to set up a multiboot ISO USB-Drive and I get error messages when I start the ISO file.

As I see it, the loopback device is executed properly, otherwise no iso would start. However, the correct path cannot be found.
I do not understand why.
Maybe the loop device needs some more options or GUBB2 needs some modules.


1. The "KDE neon GNU/Linux (.iso)" boots without any problems.

2. The "Arch Linux (.iso)" gives the following error message:

Booting a command list
error: no such module.
Press any key to continue…

After pressing the Enter key the following happens

Waiting for boot device ...
Waiting 30 seconds for device /dev/disk/by-label/ARCH_202211 ...
ERROR: ’/dev/disk/by-label/ARCH_202211’ device didn't show up after 30 seconds...
Falling back to interactive prompt.

ArchLinux iso boot error

3. The "Windows 10 (.iso)" does not find the file.

Booting a command list
error:no such module.
error: file '/efi/boot/bootx64.efi' not found
Press any key to continue…

If I unpack the iso and copy it directly on the partition, windows boots without problems with this command (grub.cfg):

search.fs_uuid 2222-UUID-2222 root hd0,gpt1 
set prefix=($root)'/grub'
configfile $prefix/grub.cfg


menuentry 'Windows 10' {
    chainloader (${root})/efi/boot/bootx64.efi
}

enter image description here

My configuration

USB-Drive:

fdisk -l /dev/sdb && lsblk -pf /dev/sdb

Disk /dev/sdb: 7.48 GiB, 8021606400 bytes, 15667200 sectors
Disk model: USB storage device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0000-UUID-0000

Device      Start      End  Sectors  Size Type
/dev/sdb1    2048   206847   204800  100M EFI System
/dev/sdb2  206848 15667166 15460319  7.4G Microsoft basic data

NAME    FSTYPE  LABEL    UUID   FSAVAIL FSUSE% MOUNTPOINT
/dev/sdb
├─/dev/sdb1 vfat   EFI   1111-UUID-1111
└─/dev/sdb2 ntfs   BOOT  2222-UUID-2222

I installed the USB-Drive as described in the GNU GRUB manual

grub-install --efi-directory=/mnt/EFI --boot-directory=/mnt/BOOT --removable

grub.cfg:

search.fs_uuid 2222-UUID-2222 root hd0,gpt2 
set prefix=($root)'/grub'
configfile $prefix/grub.cfg


menuentry "KDE neon GNU/Linux ISO" {
    rmmod tpm
    set isofile="/KDEneon.iso"
    loopback loop (${root})/$isofile
    linux (loop)/casper/vmlinuz boot=casper apparmor=0 iso-scan/filename=$isofile noprompt noeject lang=en locale=de_DE.UTF-8
    initrd (loop)/casper/initrd
}

menuentry "Arch Linux ISO" {
    rmmod tpm
    set isofile="/ArchLinux.iso"
    loopback loop (${root})/$isofile
    search --no-floppy --set=root --label ARCH_202211
    linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch archisolabel=ARCH_202211 iso-scan/filename=$isofile noprompt noeject lang=en locale=de_DE.UTF-8
    initrd (loop)/arch/boot/intel-ucode.img (loop)/arch/boot/amd-ucode.img (${root})/arch/boot/x86_64/initramfs-linux.img
}

menuentry 'Windows 10 ISO' {
    rmmod tpm
    set isofile="/Windows10.iso"
    loopback loop (${root})/$isofile
    chainloader (loop)/efi/boot/bootx64.efi iso-scan/filename=$isofile noprompt noeject
}

menuentry 'Windows 10 Extracted' {
    chainloader (${root})/efi/boot/bootx64.efi
}

#menuentry 'memtest' {
#
#}

menuentry 'UEFI Settings' --class uefi {
    fwsetup
}

menuentry "Restart" --class reboot {
    reboot
}

menuentry "Power Off" --class halt {
    halt
}

--- EDIT ---

I installed the ArchLinux.iso with DD on the USB drive and this is what the drive looks like.

sudo dd if=/home/anonymus/Downloads/ArchLinux.iso of=/dev/sdb status=progress

fdisk -l /dev/sdb && lsblk -pf /dev/sdb && cat

Disk /dev/sdb: 7.48 GiB, 8021606400 bytes, 15667200 sectors
Disk model: USB storage device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0000-UUID-0000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1  *         64 1570815 1570752  767M  0 Empty
/dev/sdb2       1570816 1601535   30720   15M ef EFI (FAT-12/16/32)
NAME        FSTYPE  LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINT
/dev/sdb    iso9660 ARCH_202211 2022-11-01-13-53-46-00
├─/dev/sdb1 iso9660 ARCH_202211 2022-11-01-13-53-46-00                     0   100% /mnt/ARCH_202211
└─/dev/sdb2 vfat    ARCHISO_EFI 55DC-6BC5

Arch Linux grub.cfg

# Load partition table and file system modules
insmod part_gpt
insmod part_msdos
insmod fat
insmod iso9660

# Use graphics-mode output
insmod all_video
insmod font
if loadfont "${prefix}/fonts/unicode.pf2" ; then
    insmod gfxterm
    set gfxmode="auto"
    terminal_input console
    terminal_output gfxterm
fi

# Enable serial console
if serial --unit=0 --speed=115200; then
    terminal_input --append serial
    terminal_output --append serial
fi

# Set default menu entry
default=archlinux
timeout=15
timeout_style=menu

# GRUB init tune for accessibility
play 600 988 1 1319 4

# Menu entries

menuentry "Arch Linux install medium (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
    set gfxpayload=keep
    search --no-floppy --set=root --label ARCH_202211
    linux /arch/boot/x86_64/vmlinuz-linux archisobasedir=arch archisolabel=ARCH_202211
    initrd /arch/boot/intel-ucode.img /arch/boot/amd-ucode.img /arch/boot/x86_64/initramfs-linux.img
}

menuentry "Arch Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' {
    set gfxpayload=keep
    search --no-floppy --set=root --label ARCH_202211
    linux /arch/boot/x86_64/vmlinuz-linux archisobasedir=arch archisolabel=ARCH_202211 accessibility=on
    initrd /arch/boot/intel-ucode.img /arch/boot/amd-ucode.img /arch/boot/x86_64/initramfs-linux.img
}

if [ "${grub_platform}" == "efi" ]; then
    if [ "${grub_cpu}" == "x86_64" ]; then
        menuentry "UEFI Shell" {
            insmod chain
            search --no-floppy --set=root --label ARCH_202211
            chainloader /shellx64.efi
        }
    elif [ "${grub_cpu}" == "i386" ]; then
        menuentry "UEFI Shell" {
            insmod chain
            search --no-floppy --set=root --label ARCH_202211
            chainloader /shellia32.efi
        }
    fi

    menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
        fwsetup
    }
fi

menuentry "System shutdown" --class shutdown --class poweroff {
    echo "System shutting down..."
    halt
}

menuentry "System restart" --class reboot --class restart {
    echo "System rebooting..."
    reboot
}
8
  • 1
  • 1
    Windows does not support loopmount that most Linux ISO support. It is in the configuration of the ISO. I have never loopmounted Arch, but many other distributions. I find getting path and parameters correct as biggest issue. Often have to mount ISO and look at its own grub to see correct parameters. wiki.archlinux.org/title/Multiboot_USB_drive
    – oldfred
    Nov 17, 2022 at 3:37
  • @oldfred I didn't know that ".iso" files are so different, I thought they all start with the same parameters. Your information helped me. Now I just have to find the right options. I think the easiest way to do this is to write the "ArchLinux.iso" to a USB drive with "DD" then looking into the grub.cfg. Another possibility is to install a software like "mkusb" or "Super-Boot" mentioned by jsotola and read the grub.cfg. My goal is to learn "GRUB2" and create a custom multiboot USB drive with a nice theme that I want to build myself. Thank you very much,
    – Teso
    Nov 17, 2022 at 7:02
  • I use Kubuntu and just click on an ISO to mount it and then can view files. Makes it easy to see the internal grub.cfg. Ubuntu systems also have a loopmount version of grub which I have experimented with, but have not changed to use. DD just makes a hybrid DVD/flash drive version of an installer.
    – oldfred
    Nov 17, 2022 at 13:47
  • @oldfred - Yes I mounted the .ISO's and opened the grub.cfg, however the menuenties do not work. - I currently also use Kubuntu but I want to try the "KDE neon", because I like the KDE Plasma Desktop the most of all desktops. Since "neon" is a KDE' operating system, I think KDE knows best how to build a Linux so that the Plasma Desktop works without problems and you get the Plasma updates the fastest. I also use a lot of KDE programs, because they are very nicely designed, well organized and standardized.
    – Teso
    Nov 18, 2022 at 19:44

0

You must log in to answer this question.

Browse other questions tagged .