Forum

Please or Register to create posts and topics.

menuentry Arch to GRUB

I realize this is not really your topic, but maybe you can help?
I've tried different options and I can't boot ISO from GRUB menu provided that ISO is on disk with Easy2Boot (in standard _ISO/LINUX directory).
If I copy the ISO to the disk with Linux, it loads normally, if with E2B, it doesn't want to (different errors, but the maximum I achieved is that it starts loading and then the screen turns off and nothing happens).

This parameters:

menuentry 'Arch' {

load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod msdospart
insmod ntfs
insmod ext2
insmod loopback
root_uuid=94B012C9B012B22A
search -s root -u $root_uuid
set imgdevpath='/dev/disk/by-uuid/94B012C9B012B22A'
set isofile='/_ISO/LINUX/ArchLinux-2024.12.01-x86_64.iso'
loopback loop $isofile
linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

PS. I have already contacted the specialized forums, there also could not help.

Hi, sorry but your message is not very clear

I copied the arch ISO to my E2B USB drive, defragged the file (made it contiguous) and then ran Virtual Box in Legacy/BIOS mode and booted to E2B menu. The arch ISO then booted just fine.

Are you asking me how to legacy boot from this ISO under grub (rather than grub4dos)?

The /boot/grub/loopback.cfg file inside the ISO has

menuentry "Arch Linux install medium (x86_64, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' {
set gfxpayload=keep
linux /arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
initrd /arch/boot/x86_64/initramfs-linux.img
}

So I would be tempted to use a similar menu for grub.

UUID is shown in E2b  menu when highlighted as '2024-12-01-05-48-32-00'

Your menu does not seem to have the =UUID=  part in it?

HTH

Quote from SteveSi on 2025-01-05, 10:01 AM

Hi, sorry but your message is not very clear

I have:
Arch installed
GRUB2 installed

I want to add the ISO (which is on the disk Xe2b:\_ISO\LINUX\Arch.iso) to the GRUB2 menu.

Again, I apologize, so this is off topic.

menuentry "Arch with known UUID" {
set imgdevpath="/dev/disk/by-uuid/14FA69A3FA6981BA"
    set isofile='/_ISO/LINUX/archlinux-2024.12.01-x86_64.iso'
    loopback loop $isofile
    linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
    initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}
menuentry "Arch with only known ISO filename" {
    set isofile='/_ISO/LINUX/archlinux-2024.12.01-x86_64.iso'
search --no-floppy --set=archiso_img_dev --file "${isofile}"
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
set imgdevpath="/dev/disk/by-uuid/${archiso_img_dev_uuid}"
    loopback loop $isofile
    linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
    initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

Or using UUID...

menuentry "Arch Linux install medium using UUID=" {
set gfxpayload=keep
set iso_path=/_ISO/LINUX/archlinux-2024.12.01-x86_64.iso
search --no-floppy --set=archiso_img_dev --file "${iso_path}"
probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
loopback loop $iso_path
linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

P.S. grub2 menus are in my eBook #4 on agFM which is based on grub 😉

https://easy2boot.xyz/ebooks/

Quote from SteveSi on 2025-01-05, 12:06 PM

Or using UUID...

All the variants give the same error:

File .......... not found

The server is not specified

First you need to load the kernel.

 

Proof

https://youtu.be/fWBfT-BlL68

I tested all three menu entries using grub2 which is used by grubfm.

Maybe your version of grub2 has a problem?

It does not seem to be an English language version?

Or maybe filesystem is not understood by your grub2? Is it NTFS? Do you need to add insmod NTFS or similar to understand NTFS filesystem?

 

Quote from SteveSi on 2025-01-05, 5:09 PM

I tested all three menu entries using grub2 which is used by grubfm.

Maybe your version of grub2 has a problem?

It does not seem to be an English language version?

Or maybe filesystem is not understood by your grub2? Is it NTFS? Do you need to add insmod NTFS or similar to understand NTFS filesystem?

 

This is Russian.

Yes, NTFS.

Yes, already tried insmod ntfs, it doesn't help.

And as it was explained to me in the specialized forum, the ntfs module has been in the kernel for a long time.

I don't know what to think ...

I also have ArchCraft and it loads with these parameters

menuentry "ArchCraft" --class 'archcraft' {
set root=(hd4,1)
set isofile="/_ISO/LINUX/ArchCraft-2024.10.22-x86_64.iso"
set dri="free"
search --no-floppy -f --set=root $isofile
probe -u $root --set=craft
set craftiso="/dev/disk/by-uuid/$craft"
loopback loop $isofile
linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=$craftiso img_loop=$isofile driver=$dri quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n
initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

Even the disk is specified incorrectly, I have E2B with ISOs files this (hd1,1), but it boots.

Other builds are not:

ALCI-Calamares-2024.07.17-x86_64.iso
ALG-Plasma-2024.08-x86_64.iso
ArchBang-2412-x86_64.iso
ArchLinux-2024.12.01-x86_64.iso
ArchLinuxGUI-plasma-2024.04-x86_64.iso
ArcoPlasma-v25.01.01-x86_64.iso

I am confused ...

Well in grub2 menu you can exit to command line and type grub2 commands directly.

You can type ls for instance to list devices or

ls (hd0,1)/

To list files on boot device first partition which will presumably by the e2b drive?

Can you be clear? What device are you booting grub2 from? If not booting from the same drive that contains the iso, then the device number of the e2b usb drive will vary depending on how grub2 enumerates it. It may be hd1 or hd2 or hd3 or hd4 or hd5 etc

Use ls in grub2 to find out where the iso is located.

Then set that device as the root in your grub2 menu.

Are you experienced in grub2 or just a beginner? I assumed you know how to use grub2 and debug and type commands etc?

If you craft menu works, then all you have to do is copy it, but change the lines starting with linux and initrd to be the same as I have used, with relevant $ variable names used.

It sounds like you are not booting from the same drive as the iso, so you need to set the root device first which is what your craft menu does.

Quote from SteveSi on 2025-01-05, 6:24 PM

Well in grub2 menu you can exit to command line and type grub2 commands directly.

You can type ls for instance to list devices or

ls (hd0,1)/

To list files on boot device first partition which will presumably by the e2b drive?

Can you be clear? What device are you booting grub2 from? If not booting from the same drive that contains the iso, then the device number of the e2b usb drive will vary depending on how grub2 enumerates it. It may be hd1 or hd2 or hd3 or hd4 or hd5 etc

Use ls in grub2 to find out where the iso is located.

Then set that device as the root in your grub2 menu.

Are you experienced in grub2 or just a beginner? I assumed you know how to use grub2 and debug and type commands etc?

That's exactly how I looked at the disk numbering. That's why it's strange that ArchCraft even has the wrong disk in its parameters, but it boots, while Arch and other builds don't want to boot in any way, as I showed you in the video.

I'm not a professional, but linux basics are understood.

GRUB2 load the one installed on my existing system - Arch Linux. And in it I checked with the command ls(hdX,X)/ to find out the E2B numbering.

 

The set root line in your craft menu is irrelevant and so is not used. It can be deleted if you want.

The craft  grub2 code finds the iso and then sets the root to the same drive that the iso was on.

So that same code can be used for archlinux, but you need to change the linux and initrd lines.

I can't waste time writing menus for you if you don't understand grub2. You posted on a forum about grub4dos and e2b but your issue has nothing to do with either!

I suspect your archlinux original menu did not work because the uuid is wrong! Compare it with the one in my menu which has

14FA69A3FA6981BA

 

Quote from SteveSi on 2025-01-05, 6:53 PM

The set root line in your craft menu is irrelevant and so is not used. It can be deleted if you want.

The craft  grub2 code finds the iso and then sets the root to the same drive that the iso was on.

So that same code can be used for archlinux, but you need to change the linux and initrd lines.

I can't waste time writing menus for you if you don't understand grub2. You posted on a forum about grub4dos and e2b but your issue has nothing to do with either!

I suspect your archlinux original menu did not work because the uuid is wrong! Compare it with the one in my menu which has

14FA69A3FA6981BA

 

I've done that before, here's an example of it not working either.

Here I substituted the Craft parameters and left the kernel and iniramfs from your Arch example. It tries to load, but the screen goes into standby and nothing happens.

https://youtu.be/km3RmR6iwFc

ArchCraft with completely the same parameters loads.

https://youtu.be/Jl6_OCNF34Y

And I also showed you the console output with the UUID. It is correct.

 

I realize this is not forum related, so I apologized at the beginning of the thread.

Sorry again.

I can't see the complete menus from the video

Can you just paste here both menus, the one that works and the archlinux one that does not work please

You do know you can add debug lines to grub2 menu menus?

E.g.

ls

read

echo $iso_file $root

read

So you can see what the variable have been set to?

BlagoYar has reacted to this post.
BlagoYar
Quote from SteveSi on 2025-01-05, 7:42 PM

I can't see the complete menus from the video

Can you just paste here both menus, the one that works and the archlinux one that does not work please

You do know you can add debug lines to grub2 menu menus?

E.g.

ls

read

echo $iso_file $root

read

So you can see what the variable have been set to?

 

menuentry "Arch Linux with ArchCraft Parameters" {
set iso_path="/_ISO/LINUX/ArchLinux-2024.12.01-x86_64.iso"
set dri="free"
search --no-floppy -f --set=root $iso_path
probe -u $root --set=archiso_img_dev_uuid
set craftiso="/dev/disk/by-uuid/$archiso_img_dev_uuid"
loopback loop $iso_path
linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

 

menuentry "Arch Linux with ArchCraft Parameters" {
set iso_path="/_ISO/LINUX/ArchCraft-2024.10.22-x86_64.iso"
set dri="free"
search --no-floppy -f --set=root $iso_path
probe -u $root --set=archiso_img_dev_uuid
set craftiso="/dev/disk/by-uuid/$archiso_img_dev_uuid"
loopback loop $iso_path
linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

Command "echo $iso_file $root" displays the right file/disk/partition when searching

 

 

The archlinux menu works for me (after minor correction of filename because my ISO is all lowercase letters).

set dri and set craftiso is not used or needed. I also removed "  " from linux line.

I have added some debug lines so you can see the variables before they are used.

https://1drv.ms/i/s!AqlrQcdsFA-K-w-Oq8BzJvp8fbu4?e=x615BV

menuentry "Arch Linux with ArchCraft Parameters" {
set iso_path="/_ISO/LINUX/archlinux-2024.12.01-x86_64.iso"
search --no-floppy -f --set=root $iso_path
probe -u $root --set=archiso_img_dev_uuid
loopback loop $iso_path
ls
echo
ls (loop)/
echo
ls /
echo
echo archiso_img_dev_uuid=${archiso_img_dev_uuid} iso_path=${iso_path} root=${root}
read
linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=UUID=${archiso_img_dev_uuid} img_loop=${iso_path}
initrd (loop)/arch/boot/x86_64/initramfs-linux.img

read
}

#if your results looks the same, then maybe your hardware is just not compatible with archlinux ?

BlagoYar has reacted to this post.
BlagoYar
Quote from SteveSi on 2025-01-05, 10:28 PM

The archlinux menu works for me (after minor correction of filename because my ISO is all lowercase letters).

set dri and set craftiso is not used or needed. I also removed "  " from linux line.

I have added some debug lines so you can see the variables before they are used.

https://1drv.ms/i/s!AqlrQcdsFA-K-w-Oq8BzJvp8fbu4?e=x615BV

menuentry "Arch Linux with ArchCraft Parameters" {
set iso_path="/_ISO/LINUX/archlinux-2024.12.01-x86_64.iso"
search --no-floppy -f --set=root $iso_path
probe -u $root --set=archiso_img_dev_uuid
loopback loop $iso_path
ls
echo
ls (loop)/
echo
ls /
echo
echo archiso_img_dev_uuid=${archiso_img_dev_uuid} iso_path=${iso_path} root=${root}
read
linux (loop)/arch/boot/x86_64/vmlinuz-linux archisobasedir=arch img_dev=UUID=${archiso_img_dev_uuid} img_loop=${iso_path}
initrd (loop)/arch/boot/x86_64/initramfs-linux.img

read
}

#if your results looks the same, then maybe your hardware is just not compatible with archlinux ?

Yes, trying, but the same thing - the screen goes into standby mode (probably need to find out additional parameters for my nvidia video card). Although there is already progress, ArcoPlasma and ALG-PLasma (to RAM) is loaded with the parameters. In principle, this is enough for me.

Thank you so much for helping!

I apologize again.

UPD. Yes, I took the parameters from the cfg file inside ArchCraft ISO nvidia nvidia-drm.modeset=1 nouveau.modeset=0 module_blacklist=nouveau and Archlinux loaded. Hooray!

 

Can you show a few pieces for example from this book?

Quote from SteveSi on 2025-01-05, 2:02 PM

P.S. grub2 menus are in my eBook #4 on agFM which is based on grub 😉

https://easy2boot.xyz/ebooks/

 

nvidia graphics adaptors and linux issues are common.

All my eBooks have a list of contents.

BlagoYar has reacted to this post.
BlagoYar

Multi-buy discount 10%

eBooks (in PDF format)

Easy-to-read eBooks are available in PDF format (each eBook is over 100 pages) – rated 4.5/5 stars.
Learn the secrets of Legacy and UEFI USB booting and then make your perfect multiboot USB drive.
E2B eBook #1 includes instructions on how to remove the E2B 5-second start-up delay blue screen.

E2B is unique in that it uses partition images which allows you to directly boot from Secure Boot images (no need to disable Secure Boot or run MOK manager or modify your UEFI BIOS).

Most eBooks are over 100 pages long, contain original content (not AI generated!) and step-by-step exercises which are suitable for both the beginner or the more experienced user.
Customer reviews are located at bottom of each eBook product page and multi-buy discounts are available when you buy more than one eBook. Please also visit RMPrepUSB.com and the E2B Forum.
Subscribe to my blog for the latest news, tips, USB boot articles and free eBook updates.