How to create multiboot USB with Linux - LinuxConfig.org

Create a bootable usb device containing multiple Linux distributions.
This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-create-multiboot-usb-with-linux

I got stuck at this step:

$ sudo grub2-install --target=x86_64-efi --recheck --removable --efi-directory="/media/efi" --boot-directory="/media/data/boot"

grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.

I am using Fedora 29, and grub2-efi is already installed. What am I missing?

Thanks for pointing it out. You should also install the grub2-efi-modules package.
Probably this package was already installed on my system when I wrote the article, so I took it for granted. I will fix this and include it in the tutorial.

Thanks. Installing “grub2-efi-x64-modules” fixed it.
However, after I booted, it reached to a grub prompt only and the menu did not appear. I did add three iso’s and searched and guessed their initial ram disk file. Is something missing in the grub.cfg?

Would you mind sharing your grub.cfg file?

Sure; here it is. And I noticed my error was missing the closing curly bracket. So I got the menu after adding that. But still none of the iso images worked since I got a vmlinuz error “…file ‘/isolinux/vmlinuz’ not found … you need to load the kernel first.” Now I need to check vmlinuz location in the iso image and update the file accordingly.

menuentry "Rescatux 0.51b3" {
    isofile="/boot/iso/rescatux-0.51b3.iso"
    loopback loop "${isofile}"
    linux (loop)/isolinux/vmlinuz iso-scan/filename="${isofile}" inst.stage2=hd:LABEL=Rescatux quiet
    initrd (loop)/live/initrd1.img

menuentry "System Rescue CD 5.3.2" {
    isofile="/boot/iso/systemrescuecd-x86-5.3.2.iso"
    loopback loop "${isofile}"
    linux (loop)/isolinux/vmlinuz iso-scan/filename="${isofile}" inst.stage2=hd:LABEL=SystemRescueCD quiet
    initrd (loop)/isolinux/initram.igz

menuentry "Trinity Rescue Kit 3.4 build 372" {
    isofile="/boot/iso/trinity-rescue-kit.3.4-build-372.iso"
    loopback loop "${isofile}"
    linux (loop)/isolinux/vmlinuz iso-scan/filename="${isofile}" inst.stage2=hd:LABEL=Trinity_Rescue_Kit quiet
    initrd (loop)/initrd.trk

Rescatux and SystemRescueCD both have a /boot/grub/ directory with a config file in it. So it indicated the kernel and initial ramdisk locations. The TrinityRescueKit had the images and config files in the root directory.

Your tutorial was very well explained. Thanks.

Thank you, I’m glad you found the tutorial useful. So, are you able to boot now?

No. After selecting from Grub menu, I’m still not able to boot any of the images.
The errors are sometimes “…you need to load the kernel first”, or kernel panic. It seems the images don’t know the root directory.

This is the current grub.cfg file:

menuentry "Rescatux 0.51b3" {
    isofile="/boot/iso/rescatux-0.51b3.iso"
    loopback loop "${isofile}"
    linux (loop)/live/vmlinuz1 iso-scan/filename="${isofile}" inst.stage2=hd:LABEL=Rescatux quiet
    initrd (loop)/live/initrd1.img
}

menuentry "System Rescue CD 5.3.2" {
    isofile="/boot/iso/systemrescuecd-x86-5.3.2.iso"
    loopback loop "${isofile}"
    linux (loop)/isolinux/rescue64 iso-scan/filename="${isofile}" inst.stage2=hd:LABEL=SystemRescueCD quiet
    initrd (loop)/isolinux/initram.igz
}

menuentry "Trinity Rescue Kit 3.4 build 372" {
    isofile="/boot/iso/trinity-rescue-kit.3.4-build-372.iso"
    loopback loop "${isofile}"
    linux (loop)/kernel.trk iso-scan/filename="${isofile}" inst.stage2=hd:LABEL=Trinity_Rescue_Kit quiet
    initrd (loop)/initrd.trk
}

menuentry "CorePlus" {
    set isofile="/boot/iso/CorePlus-current.iso"
    loopback loop $isofile
    linux (loop)/vmlinuz iso-scan/filename=$isofile inst.stage2=hd:LABEL=CorePlus quiet
    initrd (loop)/boot/core.gz
}

menuentry "Sparky Linux" {
    set isofile="/boot/iso/sparkylinux-4.9.2-x86_64-minimalgui.iso"
    loopback loop $isofile
    linux (loop)/live/vmlinuz iso-scan/filename=$isofile inst.stage2=hd:LABEL=CorePlus quiet
    initrd (loop)/live/initrd.img
}

Sorry for the late response, but I’ve been quite busy lately. For starters here is a working configuration for
Rescatux:

menuentry "Rescatux 0.51b3" {
    isofile="/boot/isos/rescatux-0.51b3.iso"
    loopback loop "${isofile}"
    linux (loop)/live/vmlinuz1 findiso="${isofile}" boot=live config quiet splash selinux=1 security=selinux enforcing=0 locales=en_US.UTF-8 live-config.nox11autologin
    initrd (loop)/live/initrd1.img
}

Basically what I replaced was “isoscan/filename” with “findiso”. The first is often used in Rhel family of distributions, and the second on Debian and Debian-based ones (Ubuntu, however seems to use the first one, so no guarantees). Please notice also that the inst.stage2 option is specific to Red hat distributions, is not a generic one: if you want more information about it, you can take a look here Chapter 23. Boot Options Red Hat Enterprise Linux 7 | Red Hat Customer Portal. I will test the others as soon as I can.

Thanks for this guide.

Prefer having variable set isoPath=/boot/iso defined before any menuentry and reuse it in the isofile variable like isoFile=$isoPath/rescatux-0.51b3.iso such that all the menu entries refer single ISO path except where not necessary.

I have tried in Ubuntu 18.04 and Fedora 30.Ubuntu failed to instal the module. Fedora gave success message but still getting the upper error message.
Please advise

Are you talking about the grub2-efi-modules package? what you mean with “upper error”?

submenu "fail hall" {





    menuentry "Clonezilla live (Default settings, VGA 800x600) 2.6.4-10-i686" {
    search --label boot --set=root
    ###search --set -f /live/vmlinuz
    loopback loop "/iso/clonezilla-live-2.6.4-10-i686.iso"
    linux (loop)/live/vmlinuz img_label=boot img_loop="/iso/clonezilla-live-2.6.4-10-i686.iso" boot=live union=overlay username=user config components noswap edd=on nomodeset enforcing=0 locales= keyboard-layouts= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=788 ip= net.ifnames=0 i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1
    initrd (loop)/live/initrd.img
    }



    menuentry "system rescue cd forum 5 data2" {
    loopback loop "/iso/systemrescuecd-6.0.4.iso"
    linux (loop)/sysresccd/boot/x86_64/vmlinuz nomodeset docache setkmap=us isoloop="/iso/systemrescuecd-6.0.4.iso" archisolabel=DATA2
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }


    menuentry "system rescue cd forum 4" {
    loopback loop "/iso/systemrescuecd-6.0.4.iso"
    linux (loop)/sysresccd/boot/x86_64/vmlinuz nomodeset docache setkmap=us isoloop="/iso/systemrescuecd-6.0.4.iso"
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }


    menuentry "system rescue cd forum 3" {
    isofile="/iso/systemrescuecd-6.0.4.iso"
    loopback loop "${isofile}"
    linux (loop)/sysresccd/boot/x86_64/vmlinuz isoloop=systemrescuecd-6.0.4.iso
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }





    menuentry "system rescue cd forum 2" {
    isofile="/iso/systemrescuecd-6.0.4.iso"
    search --no-floppy --fs-uuid --set 1989b953-cbca-40fb-affa-7f911272da2e
    loopback loop "${isofile}"
    linux (loop)/isolinux/isolinux.bin isoloop=systemrescuecd-6.0.4.iso
    initrd (loop)sysresccd/boot/x86_64/sysresccd.img
    }






    menuentry "system rescue cd forum 1" {
    isofile="/iso/systemrescuecd-6.0.4.iso"
    loopback loop "${isofile}"
    linux (loop)/sysresccd/boot/x86_64/vmlinuz usbstick docache
    initrd (loop)/sysresccd/boot/amd_ucode.img
    }









    menuentry "3 system rescue cd default options amd_ucode.img" {
    set gfxpayload=keep        
    isofile="/iso/systemrescuecd-6.0.4.iso"
    loopback loop "${isofile}"
    linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archisolabel=SYSRCD604
    initrd (loop)/sysresccd/boot/amd_ucode.img
    }


    menuentry "2.3 data2 system rescue cd default options x86_64" {
    set gfxpayload=keep        
    isofile="/iso/systemrescuecd-6.0.4.iso"
    loopback loop "${isofile}"
    linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archisolabel=DATA2
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }



    menuentry "2.2 sem label system rescue cd default options x86_64" {
    set gfxpayload=keep        
    isofile="/iso/systemrescuecd-6.0.4.iso"
    loopback loop "${isofile}"
    linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }




    menuentry "2system rescue cd default options x86_64" {
    set gfxpayload=keep        
    isofile="/iso/systemrescuecd-6.0.4.iso"
    loopback loop "${isofile}"
    linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archisolabel=SYSRCD604
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }


    menuentry "system rescue cd default options" {
    set gfxpayload=keep        
    isofile="/iso/systemrescuecd-6.0.4.iso"
    loopback loop "${isofile}"
    linux (loop)/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archisolabel=SYSRCD604
    initrd (loop)/sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
    }

#fail nao encontra img

    menuentry "original Boot SystemRescueCd using default options" {
    set gfxpayload=keep
    linux /sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archisolabel=SYSRCD604
    initrd /sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
    }









    
    menuentry "5supergrub2diskx86_64-efi" {
    search --no-floppy --label BOOT2 --fs-uuid --set 3E28-BCA3
    chainloader /boot/supergrub2-2.04s2-beta2-x86_64_efi-STANDALONE.EFI

#fail
}

    menuentry "4supergrub2diskx86_64-efi" {
    search --no-floppy --label DATA2 --fs-uuid --set 1989b953-cbca-40fb-affa-7f911272da2e
    chainloader /boot/supergrub2-2.04s2-beta2-x86_64_efi-STANDALONE.EFI

#fail
}

    menuentry "2supergrub2diskx86_64-efi" {
    search --no-floppy --label DATA2 --fs-uuid --set=root 1989b953-cbca-40fb-affa-7f911272da2e
    chainloader /boot/supergrub2-2.04s2-beta2-x86_64_efi-STANDALONE.EFI

#fail
}

    menuentry "1supergrub2diski386-efi" {
    search --no-floppy --label DATA2 --fs-uuid --set=root 1989b953-cbca-40fb-affa-7f911272da2e
    chainloader /boot/supergrub2-2.04s2-beta2-i386_efi-STANDALONE.EFI

#fail
}

menuentry “supergrub2disk.2.04s2-beta2” {
set isofile=“supergrub2-2.04s2-beta2-multiarch-USB.img”
loopback loop (hd0,1)/{isofile} linux (loop,1)/boot/vmlinuz-3.16.0-4-amd64 root=/dev/sda1 loop=/{isofile} ro
initrd (loop,1)/boot/initrd.img-3.16.0-4-amd64

menuentry “Super GRUB2 Try 1” {
search --no-floppy --label boot --fs-uuid --set=root
fbba43ca-826c-482e-b7ea-9aeb9b5605f8
set isofile=/iso/super_grub2_disk_hybrid_2.04s1.iso
loopback loop $isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile
quiet splash locale=en
_US bootkbd=us console-setup/layoutcode=us noeject –
initrd (loop)/casper/initrd.lz
}

    menuentry "Super GRUB2 Try 2" {
            search --no-floppy --label boot --fs-uuid --set=root
    fbba43ca-826c-482e-b7ea-9aeb9b5605f8
            set isofile=/iso/super_grub2_disk_hybrid_2.04s1.iso
            loopback loop $isofile
            linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile
    quiet splash locale=en
    _US bootkbd=us console-setup/layoutcode=us noeject --
            initrd (loop)/casper/initrd.lz
    }

    menuentry "Super GRUB2 Try 3" {
            savedefault
            search --no-floppy --fs-uuid --set=root
    fbba43ca-826c-482e-b7ea-9aeb9b5605f8
            set isofile=/iso/super_grub2_disk_hybrid_2.04s1.iso
            insmod memdisk
            linux16 /usr/lib/syslinux/memdisk iso bigraw
            initrd16 (root)$isofile
    }

menuentry “supergrub2diskbios” {
search --no-floppy --label boot --fs-uuid --set=root
1989b953-cbca-40fb-affa-7f911272da2e
set isofile=/iso/super_grub2_disk_hybrid_2.04s1.iso
loopback loop $isofile
configfile (loop)/boot/grub/grub.cfg
}

    menuentry "supergrub2diskx86_64-efi" {
    search --no-floppy --label boot --fs-uuid --set=root 1989b953-cbca-40fb-affa-7f911272da2e
    chainloader /iso/supergrub2-2.04s2-beta2-x86_64_efi-STANDALONE.EFI
    }


    menuentry "supergrub2diski386-efi" {
    search --no-floppy --label boot --fs-uuid --set=root 1989b953-cbca-40fb-affa-7f911272da2e
    chainloader /iso/supergrub2-2.04s2-beta2-i386_efi-STANDALONE.EFI
    }

a partir daqui de baixo para cima

menuentry “forumde8 clonezilla-live-2.6.4-10-amd64.iso Jedi-Ritter System” {
loopback loop (hd0,msdos1)/iso/clonezilla-live-2.6.4-10-i686.iso
linux (loop)/live/vmlinuz findiso=/iso/clonezilla-live-2.6.4-10-i686.iso toram=filesystem.squashfs boot=live union=overlay username=user config components noswap edd=on nomodeset noprompt nosplash locales=de_DE.UTF-8 keyboard-layouts=de
ocs_live_run=“ocs-live-general” ocs_live_extra_param="" ocs_live_batch=no gfxpayload=1024x768x16,1024x768 ip=frommedia i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.blacklist=yes
initrd (loop)/live/initrd.img
}

menuentry “isobooster1 editado com initrd do pendrive Trinity Rescue Kit ${VER}” {
loopback loop /iso/trinity-rescue-kit.3.4-build-372.iso
echo “Loading kernel…”
linux (loop)/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 vga=1 vollabel=boot fromiso=iso/trinity-rescue-kit.3.4-build-372.iso –
echo “Loading initrd…”

initrd (loop)/initrd.trk

initrd /boot/initrd.trk
}

menuentry “isobooster2 editado com initrd do pendrive Trinity Rescue Kit ${VER} runing from RAM” {
loopback loop /iso/trinity-rescue-kit.3.4-build-372.iso
echo “Loading kernel…”
linux (loop)/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkinmem vollabel=boot fromiso=iso/trinity-rescue-kit.3.4-build-372.iso –
echo “Loading initrd…”

initrd (loop)/initrd.trk

initrd /boot/initrd.trk
}

menuentry “isobooster1 editado com initrd da iso Trinity Rescue Kit ${VER}” {
loopback loop /iso/trinity-rescue-kit.3.4-build-372.iso
echo “Loading kernel…”
linux (loop)/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 vga=1 vollabel=boot fromiso=iso/trinity-rescue-kit.3.4-build-372.iso –
echo “Loading initrd…”
initrd (loop)/initrd.trk

initrd /boot/trinity/initrd-mod-${VER}.gz

}

menuentry “isobooster2 editado com initrd da iso Trinity Rescue Kit ${VER} runing from RAM” {
loopback loop /iso/trinity-rescue-kit.3.4-build-372.iso
echo “Loading kernel…”
linux (loop)/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkinmem vollabel=boot fromiso=iso/trinity-rescue-kit.3.4-build-372.iso –
echo “Loading initrd…”
initrd (loop)/initrd.trk

initrd /boot/trinity/initrd-mod-${VER}.gz

}

menuentry “tentativa com vollabel boot Trinity Rescue Kit trinity-rescue-kit.3.4-build-372.iso ramdisk_size=65536 /dev/ram0” {
set iso="/iso/trinity-rescue-kit.3.4-build-372.iso"
loopback loop $iso
linux (loop)/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkmenu vollabel=boot
initrd (loop)/initrd.trk
}

menuentry “tentativa com vollabel trk Trinity Rescue Kit trinity-rescue-kit.3.4-build-372.iso ramdisk_size=65536 /dev/ram0” {
set iso="/iso/trinity-rescue-kit.3.4-build-372.iso"
loopback loop $iso
linux (loop)/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkmenu vollabel=TRK_3.4
initrd (loop)/initrd.trk
}

menuentry “fedoraforum Trinity Rescue Kit 3.4” {
set ISO_FILE="/iso/trinity-rescue-kit.3.4-build-372.iso"
loopback loop “$ISO_FILE”
gfxpayload=800x600x16
linux (loop)/kernel.trk iso-scan/filename="$ISO_FILE" ramdisk_size=131072 splash=verbose pci=conf1 trkmenu root=/dev/ram0
initrd (loop)/initrd.trk
}

menuentry “frances [ RESCUE ] Trinity Rescue Kit 3.4” {
insmod ext2
insmod loopback
insmod iso9660
set isofile="/iso/trinity-rescue-kit.3.4-build-372.iso"
search --set -f $isofile
loopback loop $isofile
linux (loop)/kernel.trk findiso=$isofile vollabel=trinity ramdisk_size=65536 root=/dev/ram0 gfxpayload=800x600x16,800x600 splash=verbose pci=conf1 trkinmem keyb_fr sshd smbguest
initrd (loop)/initrd.trk
}

menuentry “trinity-rescue-kit.3.4-build-372.iso(/deb/sda13)” {
set root=’(hd0,msdos13)’
set isofile="/iso/trinity-rescue-kit.3.4-build-372.iso"
loopback loop (hd0,msdos13)$isofile
linux (loop)/kernel.trk findiso=$isofile ramdisk_size=49152 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkinmem
initrd (loop)/initrd.trk
}

menuentry “Trinity Rescue Kit 3.4” {
linux16 /boot/memdisk iso
initrd16 /iso/trinity-rescue-kit.3.4-build-372.iso
}

menuentry “foi mais longe Trinity Rescue Kit trinity-rescue-kit.3.4-build-372.iso ramdisk_size=65536 /dev/ram0” {
set iso="/iso/trinity-rescue-kit.3.4-build-372.iso"
loopback loop $iso
linux (loop)/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkmenu
initrd (loop)/initrd.trk
}

menuentry “slitaz slitaz-4.0-loram.iso 1” {
loopback loop /iso/slitaz-4.0-loram.iso
gfxpayload=800x600
linux (loop)/boot/vmlinuz-2.6.37-slitaz isofrom=/dev/disk/by-uuid/1989b953-cbca-40fb-affa-7f911272da2e/boot/iso/slitaz-3.0-xvesa.iso boot=live noeject noprompt
initrd (loop)/boot/rootfs1.gz
}

menuentry “slitaz slitaz-4.0-loram.iso 2” {
loopback loop /iso/slitaz-4.0-loram.iso
gfxpayload=800x600
linux (loop)/boot/vmlinuz-2.6.37-slitaz isofrom=/dev/disk/by-uuid/1989b953-cbca-40fb-affa-7f911272da2e/boot/iso/slitaz-3.0-xvesa.iso boot=live noeject noprompt
initrd (loop)/boot/rootfs2.gz
}

menuentry “slitaz slitaz-4.0-loram.iso 3” {
loopback loop /iso/slitaz-4.0-loram.iso
gfxpayload=800x600
linux (loop)/boot/vmlinuz-2.6.37-slitaz isofrom=/dev/disk/by-uuid/1989b953-cbca-40fb-affa-7f911272da2e/boot/iso/slitaz-3.0-xvesa.iso boot=live noeject noprompt
initrd (loop)/boot/rootfs3.gz
}

menuentry “slitaz slitaz-4.0-loram-cdrom.iso bzimage2” {
loopback loop /iso/slitaz-4.0-loram-cdrom.iso
gfxpayload=800x600
linux (loop)/boot/bzImage isofrom=/dev/disk/by-uuid/1989b953-cbca-40fb-affa-7f911272da2e/boot/iso/slitaz-4.0-loram-cdrom.iso boot=live noeject noprompt loram=LABEL=boot,fs root=/dev/null vga=normal autologin
initrd (loop)/boot/rootfs.gz
}

    menuentry "slitaz slitaz-4.0-loram-cdrom.iso bzimage" {
    loopback loop /iso/slitaz-4.0-loram-cdrom.iso
    gfxpayload=800x600
    linux (loop)/boot/bzImage isofrom=/dev/disk/by-uuid/1989b953-cbca-40fb-affa-7f911272da2e/boot/iso/slitaz-4.0-loram-cdrom.iso boot=live noeject noprompt
    initrd (loop)/boot/rootfs.gz
    }




    menuentry "slitaz slitaz-4.0-loram-cdrom.iso" {
    loopback loop /iso/slitaz-4.0-loram-cdrom.iso
    gfxpayload=800x600
    linux (loop)/boot/vmlinuz-2.6.37-slitaz isofrom=/dev/disk/by-uuid/1989b953-cbca-40fb-affa-7f911272da2e/boot/iso/slitaz-4.0-loram-cdrom.iso boot=live noeject noprompt
    initrd (loop)/boot/rootfs.gz
    }

menuentry “HBCD1 Windows 7 BIOS MBR” {
insmod part_msdos
insmod ntldr
insmod ntfs
ntldr (hd0,msdos6)/bootmgr
}

menuentry “HBCD3 Windows 7 BIOS MBR” {
insmod ntfs
insmod ntldr
insmod part_msdos
ntldr (hd0,msdos6)/bootmgr
}
menuentry “HBCD4 Windows 7 BIOS MBR” {
insmod ntfs
insmod ntldr
insmod part_msdos
ntldr (hd1,msdos6)/bootmgr
#reporta falha no boot pelo windows 10 instalado
}

menuentry "boot grldr or ntldr " {
insmod ntldr
ntldr /grldr

}

menuentry “Hiren’s BootCD iso withowt memdisk” {
insmod iso9660
insmod ntldr
set iso_path="/Hiren’s.BootCD.15.iso"
loopback loop $iso_path
ntldr (loop)/HBCD/grldr

}

menuentry "UBCD.. boot grldr or ntldr " {
insmod ntfs
insmod ntldr
insmod part_msdos
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root 6365C38A6966FAB1
ntldr /boot/grub/grldr

}

menuentry "UBCD 2.. boot grldr or ntldr " {
insmod ntfs
insmod ntldr
insmod part_msdos
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root 6365C38A6966FAB1
configfile /boot/grub/grldr
ntldr /boot/grub/menu.lst

}



menuentry "UBCD 2.. boot grldr or ntldr " {
insmod ntfs
insmod ntldr
insmod part_msdos
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root 6365C38A6966FAB1
configfile /boot/grub/grldr
ntldr /boot/grub/menu.lst

}


menuentry "UBCD 3.. boot grldr or ntldr " {
insmod ntfs
insmod ntldr
insmod part_msdos
insmod search_fs_uuid
search --no-floppy --fs-uuid --set=root 6365C38A6966FAB1
ntldr /boot/grub/grldr --config-file=/boot/grub/menu.lst

}


menuentry "UBCD4.. Hiren's BootCD iso withowt memdisk" {
insmod iso9660
insmod ntldr
set iso_path="/boot-isos/ubcd538.iso"
loopback loop $iso_path
ntldr (loop)/boot/grub/grldr

}

menuentry “UBCD with MEMDISK” {
linux16 /memdisk iso raw
initrd /ubcd502.iso
}
menuentry “UBCD with grub4dos” {
linux16 /grub.exe --config-file=“map (rd) (hd32); map --hook; root (hd32); chainloader (hd32);”
initrd /boot-isos/ubcd538.iso
}

menuentry “UBCD 5.11” {
linux16 /boot-isos/memdisk iso
initrd16 /boot-isos/ubcd538.iso
}

menuentry “ubcd2…Windows” {
insmod chain
insmod fat32
set root=(hd0,7)
chainloader +1
}

menuentry “ubcd3…Windows 98” {
insmod chain
insmod fat32
set root=(hd0,7)
chainloader (hd0,7)+1
}

menuentry “ubcd4…Windows 98” {
insmod chain
insmod part_msdos
insmod fat
set root=’(hd0,msdos7)’
search --no-floppy --label --set 1B9E-72B4
drivemap -s (hd0) $(root)
chainloader +1

nao aparece

}

menuentry “ubcd4…Windows 98” {
insmod chain
insmod part_msdos
insmod fat
set root=’(hd0,msdos7)’
search --no-floppy --label --set 1B9E-72B4
drivemap -s (hd0) $(root)
chainloader +1

nao aparece

}

menuentry “ubcd535.iso” {
set isofile="/boot-isos/ubcd538.iso"
menulst=“find --set-root $isofile; map $isofile (hd32); map --hook; root (hd32); chainloader (hd32)”
linux16 (hd0,5)/boot/grub/grub.exe --config-file=$menulst

nao aparece

}

###/boot/grub/grldr

menuentry “grldr Utimate Boot CD 535” {
linux16 /boot/grub/grldr iso
initrd16 /iso/ubcd538.iso
}

menuentry “Utimate Boot CD 535” {
linux16 /boot/memdisk iso
initrd16 /iso/ubcd538.iso
}

menuentry “Ultimate Boot CD” {
set iso="/iso/ubcd538.iso"
loopback loop $iso
linux (loop)/bootlinux
initrd (loop)/initrd.gz
}

menuentry “10…Hiren’s BootCD 15.2” {
search --no-floppy --fs-uuid --set=root 45efc4d8-c144-4926-a22c-fab99a05619c
loopback loop “/boot-isos/Hiren’s.BootCD.15.2.iso”
set root=(loop)
ntldr (loop)/HBCD/grldr
}

    menuentry "9..Hiren's BootCD 15.2" {
    ntldr (hd0,msdos8)/HBCD/grldr
    }


    menuentry "8..HBCD" {  
        linux16 /grub.exe --config-file="find --set-root /HBCD/menu.lst; configfile /HBCD/menu.lst"  
    }


    menuentry "7 HIRENS TOOLS" {
    linux16 (hd0,msdos8)/grub.exe --config-file="find --set-root (hd0,msdos8)/HBCD/menu.lst; configfile (hd0,msdos8)/HBCD/menu.lst"
    } 

menuentry “6 Hiren’s boot CD using grub.exe” {
insmod ntfs
set root="(hd0,5)"
set dosGRUBPath="$grub4dosPath";
set hbcdPath="$toolPath/HBCD";
set menuLstPath="$hbcdPath/menu.lst";
set isofile="/boot-isos/Hiren’s.BootCD.15.2.iso"
set gfxpayload=1024x768x32,1024x768
linux16 “$dosGRUBPath” --config-file=“find --set-root $menuLstPath; configfile $menuLstPath”
}

    menuentry "5 HIRENS TOOLS" {
    linux16 (hd0,msdos8)/grub.exe --config-file="find --set-root /HBCD/menu.lst; configfile /HBCD/menu.lst"
    } 




    menuentry "3scancomuuid..HIRENS TOOLS" {
    search --no-floppy --label "HBCD 15.2" --fs-uuid --set=root 1BFF183535AE4AC6
    linux16 /grub.exe --config-file="find --set-root /HBCD/menu.lst; configfile /HBCD/menu.lst"
    } 




    menuentry "2scancomuuid..HIRENS TOOLS" {
    search --no-floppy --label boot --fs-uuid --set=root 1BFF183535AE4AC6
    linux16 /grub.exe --config-file="find --set-root /HBCD/menu.lst; configfile /HBCD/menu.lst"
    } 


    menuentry "HIRENS TOOLS" {
    linux16 /grub.exe --config-file="find --set-root /HBCD/menu.lst; configfile /HBCD/menu.lst"
    } 



    menuentry "trinity rescue kit.. Syslinux root drive" {

    set root=(hd0,8)

    chainloader +1

    }





submenu "trinitywikiordi" {

    insmod extcmd
    probe -f -s fstype "($root)"
    if test "$fstype" == "iso9660"; then
    probe -l -s fs_opt_id "($root)"
    fs_opt_id="vollabel=$fs_opt_id"
    else
    probe -u -s fs_opt_id "($root)"
    fs_opt_id="voluuid=$fs_opt_id"
    fi
    unset fstype

    menuentry --class="trk" "TRK 3.4 build 372-2 - SCSI drivers, text menu, autoserver from RAM (256Mb min)" "$fs_opt_id" {
    set fs_opt_id="$2"
    echo "Loading linux kernel..."
    linux /kernel.trk ramdisk_size=65536 root=/dev/ram0 $fs_opt_id vga=788 splash=verbose pci=conf1 scsidrv trkinmem trkmenu rootpass=trk setkmap=fr setlocale=fr_FR.UTF-8 autoserver
    echo "Loading initial ramdisk..."
    initrd /initrd.trk
    }

    menuentry --class="trk" "TRK 3.4 build 372-2 - SCSI drivers, text menu, autoserver" "$fs_opt_id" {
    set fs_opt_id="$2"
    echo "Loading linux kernel..."
    linux /kernel.trk ramdisk_size=65536 root=/dev/ram0 $fs_opt_id vga=788 splash=verbose pci=conf1 scsidrv trkmenu rootpass=trk setkmap=fr setlocale=fr_FR.UTF-8 autoserver
    echo "Loading initial ramdisk..."
    initrd /initrd.trk
    }

}

menuentry "trinity rescue kit simples" {
linux	(hd0,8)/kernel.trk
initrd	(hd0,8)/initrd.trk
}

menuentry “[9] Trinity Rescue Kit” --hotkey=9 {
linux (hd0,8)/trk3/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkmenu vollabel=TRK_3.4
initrd (hd0,8)/trk3/initrd.trk
}

submenu "trinitywikiordi" {

    insmod extcmd
    probe -f -s fstype "($root)"
    if test "$fstype" == "iso9660"; then
    probe -l -s fs_opt_id "($root)"
    fs_opt_id="vollabel=$fs_opt_id"
    else
    probe -u -s fs_opt_id "($root)"
    fs_opt_id="voluuid=$fs_opt_id"
    fi
    unset fstype

    menuentry --class="trk" "TRK 3.4 build 372-2 - SCSI drivers, text menu, autoserver from RAM (256Mb min)" "$fs_opt_id" {
    set fs_opt_id="$2"
    echo "Loading linux kernel..."
    linux /kernel.trk ramdisk_size=65536 root=/dev/ram0 $fs_opt_id vga=788 splash=verbose pci=conf1 scsidrv trkinmem trkmenu rootpass=trk setkmap=fr setlocale=fr_FR.UTF-8 autoserver
    echo "Loading initial ramdisk..."
    initrd /initrd.trk
    }

    menuentry --class="trk" "TRK 3.4 build 372-2 - SCSI drivers, text menu, autoserver" "$fs_opt_id" {
    set fs_opt_id="$2"
    echo "Loading linux kernel..."
    linux /kernel.trk ramdisk_size=65536 root=/dev/ram0 $fs_opt_id vga=788 splash=verbose pci=conf1 scsidrv trkmenu rootpass=trk setkmap=fr setlocale=fr_FR.UTF-8 autoserver
    echo "Loading initial ramdisk..."
    initrd /initrd.trk
    }

}

menuentry “sem copiar os nucleos [9] Trinity Rescue Kit” --hotkey=9 {
linux (hd0,8)/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkmenu vollabel=TRK_3.4
initrd (hd0,8)/initrd.trk
}

menuentry "trinity rescue kit simples" {
linux	(hd0,8)/kernel.trk
initrd	(hd0,8)/initrd.trk
}

menuentry “[9] Trinity Rescue Kit” --hotkey=9 {
linux (hd0,8)/trk3/kernel.trk ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkmenu vollabel=TRK_3.4
initrd (hd0,8)/trk3/initrd.trk
}

menuentry “13… Slitaz 4.0 Live” {
linux (hd0,9)/boot/bzImage
initrd (hd0,9)/boot/rootfs.gz

cat rootfs4.gz rootfs3.gz rootfs2.gz rootfs1.gz > rootfs.gz

###para unificar os rootfs
}

menuentry “12… SliTaz GNU/Linux (cooking) (Kernel vmlinuz-2.6.37-slitaz)” {
linux (hd0,9)/boot/vmlinuz-2.6.37-slitaz root=/dev/sdb9
}

menuentry “11… SliTaz” {
linux (hd0,9)/boot/vmlinuz-2.6.37-slitaz
initrd (hd0,9)/boot/rootfs4.gz (hd0,9)/boot/rootfs3.gz (hd0,9)/boot/rootfs2.gz (hd0,9)/boot/rootfs1.gz
}

menuentry “10… SliTaz” {
insmod ext3
set root=(hd0,9)
linux /boot/vmlinuz-2.6.37-slitaz
initrd /boot/rootfs4.gz /boot/rootfs3.gz /boot/rootfs2.gz /boot/rootfs1.gz rw root=/dev/null autologin
}

menuentry “9… SliTaz” {
insmod ext3
set root=(hd0,9)
linux /boot/bzImage
initrd /boot/rootfs4.gz,/boot/rootfs3.gz,/boot/rootfs2.gz,/boot/rootfs1.gz rw root=/dev/null autologin
}

menuentry “6 menu label slitaz live” {
linux (hd0,9)/boot/isolinux/ifmem.c32
}

menuentry "5 slitaz.. Syslinux root drive" {
set root=(hd0,9)
chainloader (hd0,9)/boot/isolinux/isolinux.bin
}


menuentry "4 slitaz.. Syslinux root drive" {
set root=(hd0,9)
chainloader +1
}

menuentry “3 slitaz… menuentry” {
###set root=(hd0,9)
syslinux_source (hd0,9)/boot/isolinux/isolinux.bin
syslinux_configfile (hd0,9)/boot/isolinux/isolinux.cfg
}

menuentry “slitaz… menuentry” {
set root=(hd0,9)
syslinux_source /boot/isolinux/isolinux.bin
syslinux_configfile /boot/isolinux/isolinux.cfg
}

menuentry ‘Slitaz 4.0 Live’ {
linux (hd0,9)/boot/bzImage
initrd (hd0,9)/boot/rootfs4.gz
}

    menuentry "ubuntu-mate-18.04.3-desktop-amd64.iso" {
    loopback loop (hd0,5)/boot-isos/ubuntu-mate-18.04.3-desktop-amd64.iso
    linux (loop)/casper/vmlinuz iso-scan/filename=/boot-isos/ubuntu-mate-18.04.3-desktop-amd64.iso noeject

#boot=casper is needed
initrd (loop)/casper/initrd
}

menuentry “6 hbcd… Windows Boot UEFI loader” {
search --fs-uuid --no-floppy --set=root 123456A78BCDEF9G
chainloader (${root})/EFI/Boot/bootx64.efi
}

menuentry “5 winstaller…Windows Boot UEFI loader” {
search --fs-uuid --no-floppy --set=root 123A45B67C890DE1
chainloader (${root})/EFI/Boot/bootx64.efi
}

menuentry “4 hbcd caminho corrigido bootmgr.efi… Windows 10” {
search --fs-uuid 123456A78BCDEF9G --set=root --file /bootmgr.efi
chainloader /bootmgr.efi
###falha pre boot
}

menuentry “3 hbcd uefi caminho corrigido bootx64.efi… Windows 10” {
search --set=root --fs-uuid 123456A78BCDEF9G --file /EFI/Boot/bootx64.efi
chainloader /EFI/Boot/bootx64.efi
###configurar uefi
}

menuentry “2 windows installer bootmgr.efi… Windows 10” {
search --set=root --fs-uuid 123A45B67C890DE1 --file /bootmgr.efi
chainloader /bootmgr.efi
###falha pre boot
}

menuentry “1 windows installer bootx64.efi… Windows 10” {
search --set=root --fs-uuid 123A45B67C890DE1 --file /efi/boot/bootx64.efi
chainloader /efi/boot/bootx64.efi
###configurar uefi
}

    menuentry "ubuntu-mate-18.04.3-desktop-amd64.iso" {
    loopback loop (hd0,5)/boot-isos/ubuntu-mate-18.04.3-desktop-amd64.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot-isos/ubuntu-mate-18.04.3-desktop-amd64.iso noeject
    initrd (loop)/casper/initrd

###uefi boot does not work
}

    menuentry "rescatux-0.72-beta6.iso (live iso)" {
    isofile="/boot-isos/rescatux-0.72-beta6.iso"
    loopback loop "${isofile}"
    linux (loop)/live/vmlinuz1 findiso="${isofile}" boot=live config selinux=1 security=selinux enforcing=0 locales=en_US.UTF-8 liveid=/LIVEID/F85AF358/F9F05AF4/B6098139/9BA688BB
    initrd (loop)/live/initrd1.img

###uefi boot does not work
}

###failhall###
}

###working configs

###################################################################################################

menuentry "supergrub2diskbios live iso" {
search --no-floppy --label boot --fs-uuid --set=root ab1234c5-6d78-9e10-f11g-1213hi1415jk
set isofile=/boot-isos/super_grub2_disk_hybrid_2.04s1.iso
loopback loop $isofile
configfile (loop)/boot/grub/grub.cfg
}

###################################################################################################

    menuentry "clonezilla-live-2.6.4-10-amd64.iso" {
    search --no-floppy --label boot --fs-uuid --set=root ab1234c5-6d78-9e10-f11g-1213hi1415jk
    loopback loop "/boot-isos/clonezilla-live-2.6.4-10-amd64.iso"
    linux (loop)/live/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_keymap=\"\" ocs_live_batch=\"no\" ocs_lang=\"\" gfxpayload=800x600x16, 800x600  toram=filesystem.squashfs ip=frommedia nosplash findiso=/boot-isos/clonezilla-live-2.6.4-10-i686.iso
    initrd (loop)/live/initrd.img 
    }



    menuentry "clonezilla-live-2.6.4-10-i686.iso" {
    search --no-floppy --label boot --fs-uuid --set=root ab1234c5-6d78-9e10-f11g-1213hi1415jk
    loopback loop "/boot-isos/clonezilla-live-2.6.4-10-i686.iso"
    linux (loop)/live/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_keymap=\"\" ocs_live_batch=\"no\" ocs_lang=\"\" gfxpayload=800x600x16, 800x600  toram=filesystem.squashfs ip=frommedia nosplash findiso=/boot-isos/clonezilla-live-2.6.4-10-i686.iso
    initrd (loop)/live/initrd.img 
    }



    menuentry "hirens boot cd 15.2 hd entry" {
    insmod ntfs
    insmod ntldr
    insmod part_msdos
    insmod search_fs_uuid
    search --no-floppy --fs-uuid --set=root A123-45BC
    ntldr /HBCD/grldr
    }


    menuentry "hirens boot cd pe x64 1.0.1 hd entry" {
    insmod ntfs
    insmod ntldr
    insmod part_msdos
    insmod search_fs_uuid
    search --no-floppy --fs-uuid --set=root 123456A78BCDEF9G
    ntldr /bootmgr
    }



    menuentry "rescatux-0.72-beta6.iso" {
    loopback loop "/boot-isos/rescatux-0.72-beta6.iso"
    linux (loop)/live/vmlinuz1 findiso="/boot-isos/rescatux-0.72-beta6.iso" boot=live config selinux=1 security=selinux enforcing=0 locales=en_US.UTF-8 liveid=/LIVEID/F85AF358/F9F05AF4/B6098139/9BA688BB
    initrd (loop)/live/initrd1.img
    }



    menuentry "slitaz 5 rolling" {
    loopback loop /boot-isos/slitaz-rolling.iso
    linux (loop)/boot/bzImage isofrom=/dev/disk/by-uuid/ab1234c5-6d78-9e10-f11g-1213hi1415jk/boot-isos/slitaz-rolling.iso boot=live noeject noprompt
    initrd (loop)/boot/rootfs4.gz (loop)/boot/rootfs3.gz (loop)/boot/rootfs2.gz (loop)/boot/rootfs1.gz
    }



    menuentry "systemrescuecd (isoloop) diskmode" {
    load_video
    insmod gzio
    insmod part_gpt
    insmod part_msdos
    insmod ext2
    search --no-floppy --label boot --set=root
    loopback loop "/boot-isos/systemrescuecd-6.0.4.iso"
    echo   'Loading kernel ...'
    linux  (loop)/sysresccd/boot/x86_64/vmlinuz img_label=boot img_loop="/boot-isos/systemrescuecd-6.0.4.iso" archisobasedir=sysresccd setkmap=us
    echo   'Loading initramfs ...'
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }


    menuentry "systemrescuecd (isoloop) rammode" {
    load_video
    insmod gzio
    insmod part_gpt
    insmod part_msdos
    insmod ext2
    search --no-floppy --label boot --set=root
    loopback loop "/boot-isos/systemrescuecd-6.0.4.iso"
    echo   'Loading kernel ...'
    linux  (loop)/sysresccd/boot/x86_64/vmlinuz img_label=boot img_loop="/boot-isos/systemrescuecd-6.0.4.iso" archisobasedir=sysresccd copytoram setkmap=us
    echo   'Loading initramfs ...'
    initrd (loop)/sysresccd/boot/x86_64/sysresccd.img
    }


    menuentry "trinity rescue kit 3.4-build-372 hd entry" {
    set root=(hd0,8)
    syslinux_source /isolinux.bin
    syslinux_configfile /isolinux.cfg
    }


    menuentry "ubuntu-mate-18.04.3-desktop-amd64.iso" {
    search --no-floppy --label boot --fs-uuid --set=root ab1234c5-6d78-9e10-f11g-1213hi1415jk
    loopback loop /boot-isos/ubuntu-mate-18.04.3-desktop-amd64.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot-isos/ubuntu-mate-18.04.3-desktop-amd64.iso noeject
    initrd (loop)/casper/initrd
    }


    menuentry "ubuntu-mate-18.04.3-desktop-i386.iso" {
    search --no-floppy --label boot --fs-uuid --set=root ab1234c5-6d78-9e10-f11g-1213hi1415jk
    loopback loop /boot-isos/ubuntu-mate-18.04.3-desktop-i386.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot-isos/ubuntu-mate-18.04.3-desktop-i386.iso noeject
    initrd (loop)/casper/initrd
    }


    menuentry "ultimate boot cd 5.3.8 chainloader" {
    search --set -f "/ldlinux.sys"
    drivemap -s (hd0) $root
    chainloader +1
    }


    menuentry "windows 10 x64 ptbr installer hd entry" {
    insmod ntfs
    insmod ntldr
    insmod part_msdos
    insmod search_fs_uuid
    search --no-floppy --fs-uuid --set=root 123A45B67C891DE2
    ntldr /bootmgr
    }

###working configs###

1 Like

Hi, I’m new to Linux, so maybe the following is kind of a newbie question.
When I run the command “sudo mkdir /media/{efi,data}” my system responds with “Cannot create directory… no such file or directory” (I get the german phrase, but I think this is the correct english wording).
I then tried the commands separately first for media, then for the subfolders and everything was created correctly, but on my SSD (/dev/sda) not on my USB stick (/dev/sdb). (At least this is what my brain thinks I’ve been doing.)
I think this is wrong, isn’t it? How can I manage to create the folders in the right place?
Thanks in advance for any helpful hints.

Hi,

Most likely your system did not have the /media directory available yet. So from this reason it is not possible to create the efi and data directory within the no-existing /media directory. Fortunately you can use -p option with the mkdir command to also create a parent directory. Try this:

$ sudo mkdir -p /media/{efi,data}

For more inforamtion visit our linux commands guide.

Hope this helps

Lubos

1 Like

Hi Lubos and thanks for the quick response. Yes, this helped creating the parent directory plus the two subfolders. Unfortunately they are still created on /dev/sda and not on /dev/sdb. Do I somehow have to switch between those devices within the terminal before entering the command to create the folders?
Greetings
Bernie

Hi Burn.E,

You have to mount your USB drive into your system before you are able to write into the filesystem of the drive. The directories you created are the mount points where you will mount. The actual mounting achieved with the next commands of the tutorial’s Create the mountpoints and mount the partitions step:

# Create the mountpoints 
$ sudo mkdir /media/{efi,data} <--this is where you create the mount points
# Mount the EFI partition 
$ sudo mount /dev/sdb1 /media/efi <--this is where you mount the first...
# Mount the data partition 
$ sudo mount /dev/sdb2 /media/data <--and the 2nd partition

After doing so you’ll see the two filesystems as one, thus you can manipulate the USB drive’s contents as they where on your SSD. You don’t actually need an “efi” and “data” directory on your USB drive, nor you will have them after unmounting the drive from the system.

Sandmann

1 Like

Hi Sandman,
thanks a lot for your help here. I’ll immediately try to finish this guide.
It seems I have to dig deeper into this whole file system thing, which is completely new to me since I’m used to see disk space as “letters” in the file manager. :slight_smile:
Greeting
Bernie

Update: I noticed why my first tries went wrong. I forgot to do the whole thing having root permissions. Shame on me. Now I’m stuck a few steps down the guide. I’ll tinker around a bit with the grub.cfg before I come back to bug you again.