help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booting several ISOs with GRUB2 on Fedora 34


From: Steve
Subject: Re: Booting several ISOs with GRUB2 on Fedora 34
Date: Sun, 16 May 2021 09:26:51 +0100

   1. menuentry "Debian 10.9 with XFCE" {
   2.   insmod part_gpt
   3.   insmod ext2
   4.   insmod search_fs_uuid search --no-floppy --set=partition --fs-uuid
   3748ef02-5461-4c66-96a8-14fa03aad3f7
   5.   set isofile="/iso/debian-live-10.9.0-amd64-xfce.iso"
   6.   loopback loop ($partition)$isofile
   7.   linux (loop)/live/vmlinuz-4.19.0-16-amd64 boot=live
   findiso=($isofile)
   8.   initrd (loop)/live/initrd-4.19.0-16-amd64
   9. }


line 4 seems to be missing a new line - it should be two lines
insmod search_fs_uuid
search --no-floppy --set=partition --fs-uuid
3748ef02-5461-4c66-96a8-14fa03aad3f7

This sets the variable $partition to whatever partition has that particular
uuid
so your ISO needs to be on that partition

line 7 seems wrong, it should be  findiso=$isofile

you can easily debug by adding echo and read lines

e.g.
echo  ($partition)$isofile
read

will display the full path
echo  linux (loop)/live/vmlinuz-4.19.0-16-amd64 boot=live
findiso=($isofile)
read

will display the linux line with parameters

the 'read' command will just wait for you to press a key
we can also use the ls command to list files

so we have

menuentry "Debian 10.9 with XFCE" {
  insmod part_gpt
  insmod ext2
  insmod search_fs_uuid
  search --no-floppy --set=partition --fs-uuid
3748ef02-5461-4c66-96a8-14fa03aad3f7
  set isofile="/iso/debian-live-10.9.0-amd64-xfce.iso"
echo    loop ($partition)$isofile
read
ls ($partition)
loopback loop ($partition)$isofile
echo  linux (loop)/live/vmlinuz-4.19.0-16-amd64 boot=live findiso=$isofile
read
ls ($partition)/
read
  linux (loop)/live/vmlinuz-4.19.0-16-amd64 boot=live findiso=$isofile
  initrd (loop)/live/initrd-4.19.0-16-amd64
}


if the uuid is not correct, you might have better luck just finding the iso
file using

   search --no-floppy --set=partition --file $isofile

e.g.

  menuentry "Debian 10.9 with XFCE" {
  insmod part_gpt
  insmod ext2
  insmod search_fs_uuid
  set isofile="/iso/debian-live-10.9.0-amd64-xfce.iso"
  search --no-floppy --set=partition --file $isofile
echo    loop ($partition)$isofile
read
ls ($partition)
loopback loop ($partition)$isofile
echo  linux (loop)/live/vmlinuz-4.19.0-16-amd64 boot=live findiso=$isofile
read
ls ($partition)/
read
  linux (loop)/live/vmlinuz-4.19.0-16-amd64 boot=live findiso=$isofile
  initrd (loop)/live/initrd-4.19.0-16-amd64
}

  hth




On Sun, 16 May 2021 at 09:01, Patrick Frank <foss@neue-dateien.de> wrote:

> On 5/16/21 9:00 AM, Andrei Borzenkov wrote:
>
> > To open file you need device and
> > filename on this device.
>
> Ok, I changed that part but the errors persisted:
> "no server specified"
> "load kernel first"
>
> > All three of your configurations refer to file
> > on default device which is $root.
>
> I tried to set root but then my main os was no longer bootable.
> Very strange.
>
> So my current version of the custom config part is:
> https://paste.centos.org/view/bf07c3b7
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]