Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Boot with Grub via rEFInd any other partitions and iso's
#1
Hello everyone!



If anyone has rEFInd in bootloader (Apple machines) i will share with you the way i boot any installed linux partitions.

So rEFInd can boot any grub and will detect for you any grub installment in the EFI partitions.



[Image: mEiaEa2.jpeg]


I have 2 partitions which i installed grub at the beginning of my harddisks : sda1 and sdb1.



In sda1 i boot all my installed linux system and with sdb1 i boot any iso's with grub via rEFInd.

So in sda1 in grub.cfg more precise in /boot/grub/grub.cfg I have enteries for any linux grub of each distro i installed.
The reason I'm using this method is to see every grub theme coming with every distribution installed and also the most important to bypass os_prober which is very slow in configuring grub AND also rEFInd will not boot a custom kernel for instance linux-xanmod-edge. I do not install os_prober on any of my partitions with grub or is disabled in /etc/default/grub.
Basically with this method you boot grub from of any partition with one grub of one of the partition you designated!



Examples are below:



menuentry 'Arcolinux-KDE'  {

    insmod part_gpt

    insmod ext4

    search --no-floppy --fs-uuid --set=root  14ba9346-3ba1-42e8-a951-48d4f0b1f4c3

    configfile /boot/grub/grub.cfg

}

menuentry 'Peux OS KDE'  {

    insmod part_gpt

    insmod ext4

    search --no-floppy --fs-uuid --set=root  a3093ccb-0eb4-40a5-9100-163d5cafb388

    configfile /boot/grub/grub.cfg

}



menuentry 'XeroLinux-KDE'  {

    insmod part_gpt

    insmod xfs

    search --no-floppy --fs-uuid --set=root  c48eee6e-438a-4590-af4a-a245113f995a

    configfile /boot/grub/grub.cfg

}



menuentry 'Arcolinuxb-plasma build 05/22'  {

    insmod part_gpt

    insmod ext4

    search --no-floppy --fs-uuid --set=root  fb25812d-d003-4258-a15c-5060588edc60

    configfile /boot/grub/grub.cfg

}



menuentry 'Carli11-Xfce4'  {

    insmod part_gpt

    insmod ext4

    search --no-floppy --fs-uuid --set=root 9cc1626f-2cf5-42f3-80cd-35863a02ac9f

    configfile /boot/grub/grub.cfg

}



menuentry 'Arch-Budgie'  {

    insmod part_gpt

    insmod xfs

    search --no-floppy --fs-uuid --set=root 7a423f61-4132-46d7-8bf3-8a099b930181

    configfile /boot/grub/grub.cfg

}

Note: All the info of uuid you may find v easily with the command: lsblk -f -m


For booting isos I use the boot from partition /dev/sdb4 where my grub is install mounting /dev/sdb1 on boot.... All the iso's I copied on /boot/ folder which basically do not affect /dev/sdb1 size cause it take space from /dev/sdb4. All those iso's in this particular example are arch base distros :

menuentry "Arcolinux-Plasma built04/09" --class arch {

  set isoname="arcolinuxs-v22.05.01-x86_64.iso"

  set isofile="/boot/${isoname}"

  loopback loop $isofile

  linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=/dev/sdb4 img_loop=$isofile archisobasedir=arch earlymodules=loop cow_spacesize=10G driver=free nouveau.modeset=1 i915.modeset=1 nvme_load=yes

  initrd  (loop)/arch/boot/x86_64/initramfs-linux.img

  

    }



menuentry "Peux OS KDE install medium (x86_64, UEFI)" --class arch {

  set isoname="peux_os_kde-stable_22.04-x86_64.iso"

  set isofile="/boot/${isoname}"

  loopback loop $isofile

  linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=/dev/sdb4 img_loop=$isofile  archisobasedir=arch earlymodules=loop cow_spacesize=10G archisolabel=PEUX_OS_KDE driver=free nouveau.modeset=1 i915.modeset=1 nvme_load=yes

  initrd  (loop)/arch/boot/x86_64/initramfs-linux.img

  

    }

menuentry "ArcolinuxB-Plasma" --class arch {

  set isoname="arcolinuxb-plasma-v22.05.01-x86_64.iso"

  set isofile="/boot/${isoname}"

  loopback loop $isofile

  linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=/dev/sdb4 img_loop=$isofile archisobasedir=arch earlymodules=loop cow_spacesize=10G nvidia-drm.modeset=1 i915.modeset=1

  initrd  (loop)/arch/boot/x86_64/initramfs-linux.img

  

    }

If you want to boot an iso's with a different type of kernel or if you want to boot with different options just adjust the kernel name that is iso's path arch/boot/x86_64 or choose different options of booting.

If I have v complicated loader done for iso distribution (Deepin, Cutefish...) too load I flush it on USB and
I boot grub on any of my partition i press C  I see grub prompt , I look any msdos partition listed set the root on grub on it and then boot:
grub> ls
grub> set root (hdxy, msdoshdxy)
grub> chainloader /path/to/bootx64.efi
grub> boot

Hope this info will help!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation How To Auto-mount Partitions On Startup Using Gnome Disks DarkXero 3 3,338 01-04-2023, 12:24 AM
Last Post: DarkXero
  Grub issue not booting ? DarkXero 0 6,893 08-25-2022, 09:00 PM
Last Post: DarkXero
Information TimeShift AutoSnap & GRUB-BTRFS DarkXero 0 1,125 11-23-2021, 10:16 PM
Last Post: DarkXero

Forum Jump:


Users browsing this thread: 1 Guest(s)