MX live USB GRUB boot rescue menu - standalone customized version

Message
Author
User avatar
andrewjoseph
Posts: 17
Joined: Mon Jul 05, 2021 12:43 pm

MX live USB GRUB boot rescue menu - standalone customized version

#1 Post by andrewjoseph »

Hi all,

Congrats for making the brilliant MX USB GRUB boot rescue menu, really a godsend for unbootable OSes.

I want to make a EFI and BIOS bootable multiboot USB with MX GRUB rescue menus, rEFInd, MX KDE , Linux mint Cinnamon, Linux Mint Mate, MX XFCE 32-bit, Peppermint OS, Windows installer, Android x86 (64 bit) , Ubuntu Mate and Rescatux. It's for my friend (a computer technician). We want people to try out and choose their fit before installation.

This is what I did :
1) Create a FAT32 partition named "ESP", a /boot folder in it and

Code: Select all

 sudo grub-install --target=i386-pc --boot-directory=/media/andrew/ESP/boot /dev/sdb 
2) Copy /EFI and /boot folders from LM ISO (good for secure boot)
3) Copy all folders from MX KDE ISO (not replacing existing files)
4) Copy rEFInd into /EFI folder (name it refindx64.efi)
5) Make an exFAT partition and extract Windows ISO there
6) Make an extended partition with logical partitions (ext2) for Android and other Linuxes.
7) Edit /boot/grub/grub.cfg to add entries for all these :

Code: Select all

#------------------------------------------------------------------
# file: /boot/grub/grub.cfg for the Live version of MX
#
# This file can get updated automatically on a LiveUSB via the save
# feature in the text menus.  It is possible to break these updates
# by editing this file.
#------------------------------------------------------------------

set timeout=60
set gfxmode=1024x768
set gfxpayload="1440x960;1440x900;1368x912;1366x768;1280x800;1280x720;1280x1024;1200x800;1024x768;auto"

set default=1

set WindowsInstallUUID="<UUID>"
set MainUUID="<UUID>"

search --no-floppy --set=root --fs-uuid $MainUUID

# load defaults
#
if [ -s $prefix/config/defaults.cfg ]; then
source $prefix/config/defaults.cfg
fi

menuentry "Linux Mint Cinnamon - good for beginners - looks just like Windows" {
insmod ext2
search --no-floppy --set=root --fs-uuid <UUID>
configfile /boot/grub/grub.cfg
}

if [ "${grub_platform}" = "pc" ]; then

# For Legacy BIOS systems
menuentry "Windows installation (Legacy BIOS mode)" {
insmod exfat
insmod ntldr
search --no-floppy --set=root --fs-uuid $WindowsInstallUUID
ntldr /bootmgr
}

else

# For EFI systems
menuentry "Windows installation (EFI mode)" {
insmod exfat
insmod chain
search --no-floppy --set=root --fs-uuid $WindowsInstallUUID
chainloader /efi/boot/bootx64.efi
}

menuentry "rEFInd boot manager" {
search --no-floppy --set=root --fs-uuid $MainUUID
insmod chain
chainloader /EFI/BOOT/refindx64.efi
}

fi

menuentry "Android-x86 (64 bit version) - Disable secure boot" {
insmod ext2
search --no-floppy --set=root --fs-uuid <UUID>
configfile /boot/grub/grub.cfg
}

menuentry "Linux and Windows Rescue USB (Rescatux) - DANGEROUS - be careful" {
insmod ext2
search --no-floppy --set=root --fs-uuid <UUID>
configfile /boot/grub/grub.cfg
}

submenu "Other Linux distros >>>>>>>>>>>" {

menuentry "Linux Mint MATE (good for low-spec devices)" {
insmod ext2
search --no-floppy --set=root --fs-uuid <UUID>
configfile /boot/grub/grub.cfg
}

menuentry " MX-19.4 kde x64 (March 31, 2021) - 10 min easy install - No secure boot" {
search --no-floppy --set=root --fs-uuid $MainUUID
linux /antiX/vmlinuz quiet splasht nosplash
initrd /antiX/initrd.gz
}

menuentry "MX Linux XFCE 32 bit - 10 min easy install - No secure boot" {
insmod ext2
search --no-floppy --set=root --fs-uuid <UUID>
configfile /boot/grub/grub.cfg
}

menuentry "Peppermint GNU/Linux (good for very low-spec devices) - 64bit" {
insmod ext2
search --no-floppy --set=root --fs-uuid <UUID>
configfile /boot/grub/grub.cfg
}

menuentry "Ubuntu MATE" {
insmod ext2
search --no-floppy --set=root --fs-uuid <UUID>
configfile /boot/grub/grub.cfg
}

submenu ">>> Advanced Options for MX-19.4 kde x64 <<<" {

menuentry " MX-19.4 kde x64 Customize Boot (text menus)" {
search --no-floppy --set=root --fs-uuid $MainUUID
linux /antiX/vmlinuz quiet splasht nosplash menus
initrd /antiX/initrd.gz
}

menuentry " MX-19.4 kde x64 Failsafe" {
search --no-floppy --set=root --fs-uuid $MainUUID
linux /antiX/vmlinuz quiet splasht nosplash nomodeset failsafe
initrd /antiX/initrd.gz
}

menuentry " MX-19.4 kde x64 (1024x768)" {
search --no-floppy --set=root --fs-uuid $MainUUID
linux /antiX/vmlinuz quiet splasht nosplash
initrd /antiX/initrd.gz
}

menuentry " Power Off" --hotkey=P {
halt
}

menuentry " Reboot"  --hotkey=R {
reboot
}

if [ -f /boot/grub/theme/help.txt ]; then
menuentry " Help" --hotkey=H {
cat /boot/grub/theme/help.txt
echo -n "Press <Enter> to continue "
read xxx_help
}
fi
}
}


# load boot menus
#
if [  -f  $prefix/config/bootmenu.cfg ]; then
source $prefix/config/bootmenu.cfg
fi
8) All set to boot......

But, the MX GRUB theme is not OK with chainloading Windows Installation media (distorted manufacturer logo in EFI systems).

So, I really need to use some other GRUB theme (something black and white, like LM's is preferred)

But, I don't know how to remove MX GRUB theme from my grub.cfg and /boot/grub/config/*.cfg without breaking anything and keeping MX boot rescue menus

User avatar
andrewjoseph
Posts: 17
Joined: Mon Jul 05, 2021 12:43 pm

Re: MX live USB GRUB boot rescue menu - standalone customized version

#2 Post by andrewjoseph »

deleted
Last edited by andrewjoseph on Tue Jul 06, 2021 6:29 am, edited 1 time in total.

User avatar
Eadwine Rose
Administrator
Posts: 14452
Joined: Wed Jul 12, 2006 2:10 am

Re: MX live USB GRUB boot rescue menu - standalone customized version

#3 Post by Eadwine Rose »

Don't bump topics please. People do have lives outside of this forum.
MX-23.6_x64 July 31 2023 * 6.1.0-34amd64 ext4 Xfce 4.20.0 * 8-core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 535.216.01 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 870EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
dolphin_oracle
Developer
Posts: 22051
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX live USB GRUB boot rescue menu - standalone customized version

#4 Post by dolphin_oracle »

you probably just need to change the resolution, not the theme.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
andrewjoseph
Posts: 17
Joined: Mon Jul 05, 2021 12:43 pm

Re: MX live USB GRUB boot rescue menu - standalone customized version

#5 Post by andrewjoseph »

@dolphin_oracle How can I change it ?
I want this USB to be used on any random machine coming to my friend's repair shop (will that require other steps?)
He is a Windows man who knows only GUI, and it would be good if everything works out of the box (on BIOS/EFI/SecureBoot etc.,)

User avatar
dolphin_oracle
Developer
Posts: 22051
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX live USB GRUB boot rescue menu - standalone customized version

#6 Post by dolphin_oracle »

andrewjoseph wrote: Tue Jul 06, 2021 11:23 am @dolphin_oracle How can I change it ?
I want this USB to be used on any random machine coming to my friend's repair shop (will that require other steps?)
He is a Windows man who knows only GUI, and it would be good if everything works out of the box (on BIOS/EFI/SecureBoot etc.,)
the easiest way is to actually not use a theme, and unset the gfxmode option (comment it out).

we set the gfxmode option to something convenient for the grub theme.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
andrewjoseph
Posts: 17
Joined: Mon Jul 05, 2021 12:43 pm

Re: MX live USB GRUB boot rescue menu - standalone customized version

#7 Post by andrewjoseph »

I'm not so familiar in GRUB theming. Please forgive my ignorance.
the easiest way is to actually not use a theme, and unset the gfxmode option (comment it out).
Does that mean to comment out

Code: Select all

# set gfxmode=1024x768
# set gfxpayload="1440x960;1440x900;1368x912;1366x768;1280x800;1280x720;1280x1024;1200x800;1024x768;auto"
and no other changes ?

User avatar
andrewjoseph
Posts: 17
Joined: Mon Jul 05, 2021 12:43 pm

Re: MX live USB GRUB boot rescue menu - standalone customized version

#8 Post by andrewjoseph »

I would like the widest possible hardware support out of the box.
the easiest way is to actually not use a theme
How to do that ?
I see some theme-related things in /boot/grub/config/*.cfg
Any changes needed there ?

Can in use this in the starting of grub.cfg (from Linux Mint's grub.cfg), or is there a better option ?

Code: Select all

if loadfont /boot/grub/font.pf2 ; then
	set gfxmode=auto
	insmod efi_gop
	insmod efi_uga
	insmod gfxterm
	terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
Anyway, I'm happy that the developer himself answers my questions.
Thank you for making the best live USB ever.

User avatar
nXecure
Posts: 93
Joined: Sat Jun 12, 2021 3:41 am

Re: MX live USB GRUB boot rescue menu - standalone customized version

#9 Post by nXecure »

rename the theme folder (/boot/grub/theme/) to something else (like theme-backup) and that should be enough. then it will be a very plain grub live boot.
antiX Live system enthusiast.
General Live Boot Parameters for antiX/MX.

User avatar
andrewjoseph
Posts: 17
Joined: Mon Jul 05, 2021 12:43 pm

Re: MX live USB GRUB boot rescue menu - standalone customized version

#10 Post by andrewjoseph »

nXecure wrote: Tue Jul 06, 2021 12:22 pm rename the theme folder (/boot/grub/theme/) to something else (like theme-backup) and that should be enough. then it will be a very plain grub live boot.
Will that break anything ? (especially, the boot rescue menus shouldn't lose functionality)
the easiest way is to actually not use a theme
And will it have maximum out of the box hardware support (without any modifications for specific hardware) ?

Post Reply

Return to “General”